swGlmSiz | R Documentation |
swGlmSiz
is a wrapper function for swGlmPwr
. For a given design, number of clusters, power and fixed and random effect parameters, swGlmSiz
computes the number of individuals per cluster needed to achieve the desired power.
swGlmSiz(power, alpha=0.05, ...)
power |
numeric (scalar) Desired power. Must be between |
alpha |
numeric (scalar): Two-sided statistical significance level. |
... |
Arguments to be passed to |
swGlmSiz
calls swGlmPwr
iteratively to find the number of participants per cluster-period needed to achieve power
power. Note that all warnings and messages normally generated by swGlmPwr
are turned off. Also, the argument retDATA
is set to FALSE
. It is recommended that after using swGlmSiz
, the user call swGlmPwr
with the recommended sample size to view any warning messages and/or to get the data normally returned when retDATA
is TRUE
.
An error in swGlmPwr
causes swGlmSiz
to terminate and the error message from swGlmPwr
is printed.
numeric (list): swGlmSiz
returns a list of the following:
n |
scalar: number of individuals per cluster-period required to achieve the desired power. |
power |
scalar: exact power, as computed by |
Avi Kenny, James P Hughes
swGlmSiz(power = 0.8, design = swDsn(clusters=c(4,4,4,4)),distn = "binomial",
fixed.intercept = log(0.1/0.9), fixed.treatment.effect = log(0.9),
fixed.time.effect=0, tau = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.