Description Usage Arguments Details Value Note Author(s) References See Also Examples
Calculate sample sizes for two-sample differences in normal means when the standard deviation (or variance) is estimated from existing data.
1 2 3 4 |
delta |
clinically significant difference in means |
sdhat |
estimate of standard deviation from existing data (must supply either sdhat or vhat) |
vhat |
estimate of variance from existing data (must supply either sdhat or vhat) |
df |
degrees of freedom associated with standard deviation (or variance) estimate |
ss.ratio |
n1/n0, where n0 (n1) is sample size of control (treatment) group for proposed study |
var.ratio |
sigma1^2/sigma0^2, where sigma0 (sigma1) is standard deviation of control (treatment) group for proposed study |
deltaB |
boundary value between null and alternative hypotheses for one-sided tests (see details) |
sig.level |
significance level (Type I error) |
power |
minimum power that you want the sample size to achieve |
alternative |
One- or two-sided test |
Calculates the sample sizes for a study designed to test the difference between the means of two groups, where it is assumed that the responses from each group are distributed normally. The standard deviation (sdhat) or variance (vhat) is estimated from existing data that is assumed to also follow a normal distribution with variance the same as the control group of the proposed study. If sdhat (or vhat) is estimated from one group with a sample size of m, then df=m-1. If sdhat (or vhat) is estimated from two groups with sample sizes of m0 and m1, then df=m0+m1-2.
The one-sided tests are designed to test either
H0: delta <= deltaB vs.
H1: delta > deltaB or to test
H0: delta >= deltaB vs.
H1: delta < deltaB.
The choice of hypotheses is determined by the value of delta
;
if delta
> deltaB
then the former hypotheses are tested, otherwise the latter are.
See Fay, Halloran and Follmann (2007) for details.
Object of class "power.htest", a list of the arguments (including the computed sample sizes) augmented with 'METHOD' and 'NOTE' elements. The values 'n0' and 'n1' are the samples sizes for the two groups, rounded up to the nearest integer.
The function ss.fromdata.nvar
calls find.calibrated.beta
, a function written for this package
that finds the calibrated beta value (see Fay, Halloran and Follmann, 2007).
Michael P. Fay
Fay, M.P., Halloran, M.E., and Follmann, D.A. (2007). 'Accounting for Variability in Sample Size Estimation with Applications to Nonadherence and Estimation of Variance and Effect Size' Biometrics 63: 465-474.
ss.fromdata.neff
,
ss.fromdata.pois
,
ss.nonadh
,
find.calibrated.beta
1 | ss.fromdata.nvar(.4,sdhat=.682,df=46)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.