Learn R Programming

DiagTest3Grp (version 1.6)

SampleSize.VUS: Sample size for volume under surface (VUS)

Description

Calculates the sample size required to estimate volume under surface (VUS) within a given margin of error when the diagnostic marker follows normal distributions in each diagnosis group.

Usage

SampleSize.VUS(mu.minus, mu0, mu.plus, s.minus, s0, s.plus, p = 0, q = 0, lam.minus = 1/3, lam0 = 1/3, lam.plus = 1/3, typeIerror = 0.05, margin = 0.05,subdivisions = 50000, ...)

Arguments

mu.minus
A numeric value, the sample mean estimate for the mean parameter of normal distribution in $D-$.
mu0
A numeric value, the sample mean estimate for the mean parameter of normal distribution in $D0$.
mu.plus
A numeric value, the sample mean estimate for the mean parameter of normal distribution in $D+$.
s.minus
A numeric value, the sample standard deviation (SD) estimate for the SD parameter of normal distribution in $D-$.
s0
A numeric value, the sample SD estimate for the SD parameter of normal distribution in $D0$.
s.plus
A numeric value, the sample SD estimate for the SD parameter of normal distribution in $D+$.
p
A numeric value, the minimum required specificity, $0
q
A numeric value, the minimum desired sensitivity,$0
lam.minus
A numeric value, the expected population proportion of the $D_-$ group, used for sample size calculation. Default, lam.minus=1/3. The proportions of the three ordinal groups (lam.minus, lam0, lam.plus) should sum to 1.
lam0
A numeric value, the expected population proportion of the $D_0$ group, used for sample size calculation. Default, lam0=1/3. The proportions of the three ordinal groups (lam.minus, lam0, lam.plus) should sum to 1.
lam.plus
A numeric value, the expected population proportion of the $D_+$ group, used for sample size calculation. Default, lam.plus=1/3.The proportions of the three ordinal groups (lam.minus, lam0, lam.plus) should sum to 1.
typeIerror
A numeric value, (1-typeIerror)*100% confidence interval (CI) in sample size calculation. Default typeIerror=0.05, i.e., calculate 95% CI.
margin
A numeric value, the margin of error on the VUS estimates in sample size calculation. Default, margin=0.05.
subdivisions
A numeric value, the number of subintervals for integration using adaptive quadrature in the R function integrate. Default, subdivisions=50000.
...
Other arguments that can be passed to the R function integrate, e.g., abs.tol, rel.tol, stop.on.error etc.

Value

Returns a numeric value indicating required sample size.

Details

The (1-typeIerror)% CI on VUS estimate under normality is $(VUS-Z_a*SE(VUS),VUS+Z_a*SE(VUS))$, then the sample size will be calculated such that : margin= $Z_a*SE(VUS)$ or half of the CI's length, where $Z_a$ is the normal quantile, $Z_a=1.95$ given default typeIerror a=0.05.

References

Xiong, C. and van Belle, G. and Miller, J.P. and Morris, J.C. (2006) Measuring and Estimating Diagnostic Accuracy When There Are Three Ordinal Diagnostic Groups. Statistics In Medicine 25 7 1251--1273.

See Also

Normal.VUS

Examples

Run this code

 mu.minus <- 6
 mu0 <- 8
 mu.plus <- 13.36


 s.minus <- 1
 s0 <- 1.2
 s.plus <- 1.4

 n <- SampleSize.VUS(mu.minus,mu0,mu.plus,s.minus,s0,s.plus,p=0,q=0,typeIerror=0.05) 

Run the code above in your browser using DataLab