Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

NNTintervalsProspective

NNTintervalsProspective


Description

Produce Bayesian and classical intervals for NNT from observations in a prospective study. Useful for "anticipated results" when designing a study, The setting: patients will be tested immediately, and followed to determine the BestToTreat/BestToWait classification. as well as analyzing study results. There were (or will be) Npositives patients with a positive test, Nnegatives with a negative test. The observed NNTs in each group were (or will be) NNTpos and NNTneg.

Usage

NNTintervalsProspective(Npositives, Nnegatives, NtruePositives, NtrueNegatives,
  prev = 0.15, alpha = 0.025, prior = c(1/2, 1/2))

Arguments

Npositives

Total number of observed positives.

Nnegatives

Total number of observed negatives.

NtruePositives

Observed or anticipated number of "BestToTreat" among the positives.

NtrueNegatives

Observed or anticipated number of "BestToWait" among the negatives.

prev

= 0.15 Prevalence of "BestToTreat" characteristic.

alpha

= 0.025 Significance level (one side).

prior

Beta parameters for prior. Default is the Jeffreys prior = c(1/2,1/2). Jaynes prior = c(0,0) won't work when #fp=1.

Value

The Bayesian predictive intervals for NNTpos and NNTneg. These are obtained from predictive intervals for PPV and NPV, based on Jeffreys' beta(1/2,1/2) prior.


NNTbiomarker

Calculate Design Parameters for Biomarker Validation Studies

v0.29.11
GPL-3
Authors
Roger Day
Initial release
2015-08-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.