Description Usage Arguments Details Value Note Author(s) References See Also Examples
Calculate sample sizes for two-sample differences in normal means when standardized difference is estimated from existing data
1 2 3 4 | ss.fromdata.neff(thetahat, m0, m1, ss.ratio = 1, thetaB = 0,
sig.level = 0.05, real.power = 0.8, nominal.power = NULL,
alternative = c("two.sided", "one.sided"),
MINN0 = 2, MAXN0 = Inf, subdivisions = 1000)
|
thetahat |
estimated standardized difference in means |
m0 |
sample size from control group of existing data |
m1 |
sample size from treatment group of existing data |
ss.ratio |
n1/n0, where n0 (n1) is sample size of control (treatment) group for proposed study |
thetaB |
boundary value between null and alternative hypotheses for one-sided tests (see details) |
sig.level |
significance level (Type I error) |
real.power |
minimum power that you want the sample size to achieve, only .8 or .9 allowed |
nominal.power |
see details |
alternative |
One- or two-sided test |
MINN0 |
minimum sample size for control group |
MAXN0 |
maximum sample size for control group |
subdivisions |
number of subdivisions for numerical integration |
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 with the same variance.
The standardized difference in means (thetahat
) is estimated from existing data that is assumed to also follow the
same normal distribution. The method is inherently conservative, so that with a nominal power of .76 the real power
will be about .80, and a nominal power of .88 the real power will be about .90. Other values of nominal power are
allowed, but only real powers of .80 or .90 are allowed.
The one-sided tests are designed to test either
H0: theta <= thetaB vs.
H1: theta > thetaB or to test
H0: theta >= thetaB vs.
H1: theta < thetaB.
The choice of hypotheses is determined by the value of thetahat
;
if thetahat
> thetaB
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.neff
calls uniroot.integer
, a function written for this package that
finds the nearest integer to the root.
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.nvar
,
ss.fromdata.pois
,
ss.nonadh
,
uniroot.integer
1 | ss.fromdata.neff(.588,23,25)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.