Description Usage Arguments Details Value Author(s) Examples

View source: R/ss.aipe.c.ancova.sensitivity.R

Performs a sensitivity analysis when planning sample size from the Accuracy in Parameter Estimation (AIPE) Perspective for the (unstandardized) contrast in randomized ANCOVA design.

1 2 3 4 5 |

`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 |

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.

`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 |

`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 |

Keke Lai (University of Notre Dame; [email protected])

1 2 3 4 5 6 7 8 9 10 11 | ```
## Not run:
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)
## End(Not run)
``` |

MBESS documentation built on Jan. 11, 2018, 1:08 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.