ss.aipe.crd.es | R Documentation |
Find target sample sizes (the number of clusters, cluster size, or both) for the accuracy in standardized conditions means estimation in CRD. If users wish to seek for both types of sample sizes simultaneously, an additional constraint is required, such as a desired width or a desired budget. This function uses the likelihood-based confidence interval (Cheung, 2009) by the OpenMx
package (Boker et al., 2011). See further details at Pornprasertmanit and Schneider (2010, submitted).
ss.aipe.crd.es.nclus.fixedwidth(width, nindiv, es, estype = 1, iccy, prtreat,
r2between = 0, r2within = 0, numpredictor = 0, assurance=NULL,
conf.level = 0.95, nrep = 1000, iccz = NULL, seed = 123321, multicore = FALSE,
numProc=NULL, cluscost=NULL, indivcost=NULL, diffsize=NULL)
ss.aipe.crd.es.nindiv.fixedwidth(width, nclus, es, estype = 1, iccy, prtreat,
r2between = 0, r2within = 0, numpredictor = 0, assurance=NULL,
conf.level = 0.95, nrep = 1000, iccz = NULL, seed = 123321, multicore = FALSE,
numProc=NULL, cluscost=NULL, indivcost=NULL, diffsize=NULL)
ss.aipe.crd.es.nclus.fixedbudget(budget, nindiv, cluscost, indivcost, nrep=NULL,
prtreat=NULL, iccy=NULL, es=NULL, estype = 1, numpredictor = 0,
iccz=NULL, r2within=NULL, r2between=NULL, assurance=NULL,
seed=123321, multicore=FALSE, numProc=NULL, conf.level=0.95, diffsize=NULL)
ss.aipe.crd.es.nindiv.fixedbudget(budget, nclus, cluscost, indivcost, nrep=NULL,
prtreat=NULL, iccy=NULL, es=NULL, estype = 1, numpredictor = 0,
iccz=NULL, r2within=NULL, r2between=NULL, assurance=NULL,
seed=123321, multicore=FALSE, numProc=NULL, conf.level=0.95, diffsize=NULL)
ss.aipe.crd.es.both.fixedbudget(budget, cluscost=0, indivcost=1, es, estype = 1,
iccy, prtreat, r2between = 0, r2within = 0, numpredictor = 0, assurance=NULL,
conf.level = 0.95, nrep = 1000, iccz = NULL, seed = 123321, multicore = FALSE,
numProc=NULL, diffsize=NULL)
ss.aipe.crd.es.both.fixedwidth(width, cluscost=0, indivcost=1, es, estype = 1,
iccy, prtreat, r2between = 0, r2within = 0, numpredictor = 0, assurance=NULL,
conf.level = 0.95, nrep = 1000, iccz = NULL, seed = 123321, multicore = FALSE,
numProc=NULL, diffsize=NULL)
width |
The desired width of the confidence interval of the unstandardized means difference |
budget |
The desired amount of budget |
nclus |
The desired number of clusters |
nindiv |
The number of individuals in each cluster (cluster size) |
prtreat |
The proportion of treatment clusters |
cluscost |
The cost of collecting a new cluster regardless of the number of individuals collected in each cluster |
indivcost |
The cost of collecting a new individual |
iccy |
The intraclass correlation of the dependent variable |
es |
The amount of effect size |
estype |
The type of effect size. There are only three possible options: 0 = the effect size using total standard deviation, 1 = the effect size using the individual-level standard deviation (level 1), 2 = the effect size using the cluster-level standard deviation (level 2) |
numpredictor |
If 1, a single covariate is included into the model. If 0, the no-covariate model is used. This function cannot handle multiple covariates. Therefore, only the values of 0 and 1 are allowed. |
iccz |
The intraclass correlation of the covariate (used when |
r2within |
The proportion of variance explained in the within level (used when |
r2between |
The proportion of variance explained in the between level (used when |
assurance |
The degree of assurance, which is the value with which confidence can be placed that describes the likelihood of obtaining a confidence interval less than the value specified (e.g, .80, .90, .95) |
nrep |
The number of replications used in a priori Monte Carlo simulation |
seed |
A desired seed number |
multicore |
Use multiple processors within a computer. Specify as |
numProc |
The number of processors to be used when |
conf.level |
The desired level of confidence for the confidence interval |
diffsize |
Difference cluster size specification. The difference in cluster sizes can be specified in two ways. First, users may specify cluster size as integers, which can be negative or positive. The resulting cluster sizes will be based on the estimated cluster size adding by the specified vectors. For example, if the cluster size is 25, the number of clusters is 10, and the specified different cluster size is |
Here are the functions' descriptions:
ss.aipe.crd.es.nclus.fixedwidth
Find the number of clusters given a specified width of the confidence interval and the cluster size
ss.aipe.crd.es.nindiv.fixedwidth
Find the cluster size given a specified width of the confidence interval and the number of clusters
ss.aipe.crd.es.nclus.fixedbudget
Find the number of clusters given a budget and the cluster size
ss.aipe.crd.es.nindiv.fixedbudget
Find the cluster size given a budget and the number of clusters
ss.aipe.crd.es.both.fixedbudget
Find the sample size combinations (the number of clusters and that cluster size) providing the narrowest confidence interval given the fixed budget
ss.aipe.crd.es.both.fixedwidth
Find the sample size combinations (the number of clusters and that cluster size) providing the lowest cost given the specified width of the confidence interval
The ss.aipe.crd.es.nclus.fixedwidth
and ss.aipe.crd.es.nclus.fixedbudget
functions provide the number of clusters. The ss.aipe.crd.es.nindiv.fixedwidth
and ss.aipe.crd.es.nindiv.fixedbudget
functions provide the cluster size. The ss.aipe.crd.es.both.fixedbudget
and ss.aipe.crd.es.both.fixedwidth
provide the number of clusters and the cluster size, respectively.
Sunthud Pornprasertmanit (psunthud@gmail.com)
Boker, S., M., N., Maes, H., Wilde, M., Spiegel, M., Brick, T., et al. (2011). OpenMx: An open source extended structural equation modeling framework. Psychometrika, 76, 306-317.
Cheung, M. W.-L. (2009). Constructing approximate confidence intervals for parameters with structural constructing approximate confidence intervals for parameters with structural equation models. Structural Equation Modeling, 16, 267-294.
Pornprasertmanit, S., & Schneider, W. J. (2010). Efficient sample size for power and desired accuracy in Cohen's d estimation in two-group cluster randomized design (Master Thesis). Illinois State University, Normal, IL.
Pornprasertmanic, S., & Schneider, W. J. (2014). Accuracy in parameter estimation in cluster randomized designs. Psychological Methods, 19, 356–379.
## Not run:
# Examples for each function
ss.aipe.crd.es.nclus.fixedwidth(width=0.3, nindiv=20, es=0.5, estype=1, iccy=0.25, prtreat=0.5,
nrep=20)
ss.aipe.crd.es.nindiv.fixedwidth(width=0.3, 250, es=0.5, estype=1, iccy=0.25, prtreat=0.5,
nrep=20)
ss.aipe.crd.es.nclus.fixedbudget(budget=1000, nindiv=20, cluscost=0, indivcost=1, nrep=20,
prtreat=0.5, iccy=0.25, es=0.5)
ss.aipe.crd.es.nindiv.fixedbudget(budget=1000, nclus=200, cluscost=0, indivcost=1, nrep=20,
prtreat=0.5, iccy=0.25, es=0.5)
ss.aipe.crd.es.both.fixedbudget(budget=1000, cluscost=5, indivcost=1, es=0.5, estype=1,
iccy=0.25, prtreat=0.5, nrep=20)
ss.aipe.crd.es.both.fixedwidth(width=0.5, cluscost=5, indivcost=1, es=0.5, estype=1, iccy=0.25,
prtreat=0.5, nrep=20)
# Examples for different cluster size
ss.aipe.crd.es.nclus.fixedwidth(width=0.3, nindiv=20, es=0.5, estype=1, iccy=0.25, prtreat=0.5,
nrep=20, diffsize = c(-2, 1, 0, 2, -1, 3, -3, 0, 0))
ss.aipe.crd.es.nclus.fixedwidth(width=0.3, nindiv=20, es=0.5, estype=1, iccy=0.25, prtreat=0.5,
nrep=20, diffsize = c(0.6, 1.2, 0.8, 1.4, 1, 1, 1.1, 0.9))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.