Sensitivity analysis for sample size planning for the (unstandardized) contrast in randomized ANCOVA from the Accuracy in Parameter Estimation (AIPE) Perspective
Sensitivity analysis for sample size planning for the (unstandardized) contrast in randomized ANCOVA from the Accuracy in Parameter Estimation (AIPE) Perspective
Performs a sensitivity analysis when planning sample size from the Accuracy in Parameter Estimation (AIPE) Perspective for the (unstandardized) contrast in randomized ANCOVA design.
true.error.var.ancova: population error variance of the ANCOVA model
est.error.var.ancova: estimated error variance of the ANCOVA model
true.error.var.anova: population error variance of the ANOVA model (i.e., excluding the covariate)
est.error.var.anova: estimated error variance of the ANOVA model (i.e., excluding the covariate)
rho: population correlation coefficient of the response and the covariate
est.rho: estimated correlation coefficient of the response and the covariate
G: number of generations (i.e., replications) of the simulation
mu.y: vector that contains the response's population mean of each group
sigma.y: the population standard deviation of the response
mu.x: the population mean of the covariate
sigma.x: the population standard deviation of the covariate
c.weights: the contrast weights
width: the desired full width of the obtained confidence interval
conf.level: the desired confidence interval coverage, (i.e., 1 - Type I error rate)
assurance: parameter to ensure that the obtained confidence interval width is narrower than the desired width with a specified degree of certainty (must be NULL or between zero and unity)
certainty: an alias for assurance
Details
The arguments mu.y, mu.x, sigma.y, and sigma.x are used to generate random data in the simulations for the sensitivity analysis. The value of mu.y should be the same as the square root of true.error.var.anova
So far this function is based on one-covariate randomized ANCOVA design only. The argument mu.x should be a single number, because it is assumed that the population mean of the covariate is equal across groups in randomized ANCOVA.
Returns
Psi.obs: the observed (unstandardized) contrast
se.Psi: the standard error of the observed (unstandardized) contrast
se.Psi.restricted: the standard error of the observed (unstandardized) contrast calculated by ignoring the covariate
se.res.over.se.full: the ratio of contrast's full standard error over the restricted one in each iteration
width.obs: full confidence interval width
Type.I.Error: Type I error happens in each iteration
Type.I.Error.Upper: Type I error happens in the upper end in each iteration
Type.I.Error.Lower: Type I error happens in the lower end in each iteration
Type.I.Error: percentage of Type I error happened in the entire simulation
Type.I.Error.Upper: percentage of Type I error happened in the upper end in the entire simulation
Type.I.Error.Lower: percentage of Type I error happened in the lower end in the entire simulation
width.NARROWER.than.desired: percentage of obtained widths that are narrower than the desired width
Mean.width.obs: mean width of the obtained full confidence intervals
Median.width.obs: median width of the obtained full confidence intervals
Mean.se.res.vs.se.full: the mean of the ratios of contrast's full standard error over the restricted one
Psi.pop: population (unstandardized) contrast
Contrast.Weights: contrast weights
mu.y: the response's population mean of each group
mu.x: the population mean of the covariate
sigma.x: the population standard deviation of the covariate
Sample.Size.per.Group: sample size per group
conf.level: the desired confidence interval coverage, (i.e., 1 - Type I error rate)
assurance: specified assurance
rho: population correlation coefficient of the response and the covariate
est.rho: estimated correlation coefficient of the response and the covariate
true.error.var.ANOVA: population error variance of the ANOVA model
est.error.var.ANOVA: estimated error variance of the ANOVA model