Performs a sensitivity analysis when planning sample size from the Accuracy in Parameter Estimation (AIPE) Perspective for the (unstandardized) contrast in randomized ANCOVA design.
ss.aipe.c.ancova.sensitivity(true.error.var.ancova = NULL,
est.error.var.ancova = NULL, true.error.var.anova = NULL,
est.error.var.anova = NULL, rho, est.rho = NULL, G = 10000,
mu.y, sigma.y, mu.x, sigma.x, c.weights, width,
conf.level = 0.95, assurance = NULL, certainty=NULL)
the observed (unstandardized) contrast
the standard error of the observed (unstandardized) contrast
the standard error of the observed (unstandardized) contrast calculated by ignoring the covariate
the ratio of contrast's full standard error over the restricted one in each iteration
full confidence interval width
Type I error happens in each iteration
Type I error happens in the upper end in each iteration
Type I error happens in the lower end in each iteration
percentage of Type I error happened in the entire simulation
percentage of Type I error happened in the upper end in the entire simulation
percentage of Type I error happened in the lower end in the entire simulation
percentage of obtained widths that are narrower than the desired width
mean width of the obtained full confidence intervals
median width of the obtained full confidence intervals
the mean of the ratios of contrast's full standard error over the restricted one
population (unstandardized) contrast
contrast weights
the response's population mean of each group
the population mean of the covariate
the population standard deviation of the covariate
sample size per group
the desired confidence interval coverage, (i.e., 1 - Type I error rate)
specified assurance
population correlation coefficient of the response and the covariate
estimated correlation coefficient of the response and the covariate
population error variance of the ANOVA model
estimated error variance of the ANOVA model
population error variance of the ANCOVA model
estimated error variance of the ANCOVA model
population error variance of the ANOVA model (i.e., excluding the covariate)
estimated error variance of the ANOVA model (i.e., excluding the covariate)
population correlation coefficient of the response and the covariate
estimated correlation coefficient of the response and the covariate
number of generations (i.e., replications) of the simulation
vector that contains the response's population mean of each group
the population standard deviation of the response
the population mean of the covariate
the population standard deviation of the covariate
the contrast weights
the desired full width of the obtained confidence interval
the desired confidence interval coverage, (i.e., 1 - Type I error rate)
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)
an alias for assurance
Keke Lai (University of Notre Dame; Lai.15@ND.Edu)
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.
if (FALSE) {
ss.aipe.c.ancova.sensitivity(true.error.var.ancova=30,
est.error.var.ancova=30, rho=.2, mu.y=c(10,12,15,13), mu.x=2,
G=1000, sigma.x=1.3, sigma.y=2, c.weights=c(1,0,-1,0), width=3)
ss.aipe.c.ancova.sensitivity(true.error.var.anova=36,
est.error.var.anova=36, rho=.2, est.rho=.2, G=1000,
mu.y=c(10,12,15,13), mu.x=2, sigma.x=1.3, sigma.y=6,
c.weights=c(1,0,-1,0), width=3, assurance=NULL)
}
Run the code above in your browser using DataLab