View source: R/ss.aipe.sc.ancova.R

ss.aipe.sc.ancova | R Documentation |

Sample size planning from the accuracy in parameter estimation (AIPE) perspective for standardized ANCOVA contrasts.

```
ss.aipe.sc.ancova(Psi = NULL, sigma.anova = NULL, sigma.ancova = NULL,
psi = NULL, ratio = NULL, rho = NULL, divisor = "s.ancova",
c.weights, width, conf.level = 0.95, assurance = NULL, ...)
```

`Psi` |
the population unstandardized ANCOVA (adjusted) contrast |

`sigma.anova` |
the population error standard deviation of the ANOVA model |

`sigma.ancova` |
the population error standard deviation of the ANCOVA model |

`psi` |
the population standardized ANCOVA (adjusted) contrast |

`ratio` |
the ratio of |

`rho` |
the population correlation coefficient between the response and the covariate |

`divisor` |
which error standard deviation to be used in standardizing the contrast; the value can be
either |

`c.weights` |
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 |

`...` |
allows one to potentially include parameter values for inner functions |

The sample size planning method this function is based on is developed in the context of simple (i.e., one-response-one-covariate) ANCOVA model and randomized design (i.e., same population covariate mean across groups).

An ANCOVA contrast can be standardized in at least two ways: (a) divided by the error standard deviation of the ANOVA model, (b) divided by the error standard deviation of the ANCOVA model. This function can be used to analyze both types of standardized ANCOVA contrasts.

Not all of the arguments about the effect sizes need to be specified. If `divisor="s.ancova"`

is
used in the argument, then input either (a) `psi`

, or (b) `Psi`

and `s.ancova`

.
If `divisor="s.anova"`

is used in the argument, possible specifications
are (a) `Psi`

, `s.ancova`

, and `s.anova`

; (b) `psi`

, and `ratio`

;
(c) `psi`

, and `rho`

.

This function returns the sample size *per group*.

When `divisor="s.anova"`

and the argument `assurance`

is specified, the necessary
sample size *per group* returned by the function with `assurance`

specified is slightly underestimated.
The method to obtain exact sample size in the above situation has not been developed yet. A practical solution is
to use the sample size returned as the starting value to conduct a priori Montre Carlo simulations with
function `ss.aipe.sc.ancova.sensitivity`

, as discussed in Lai & Kelley (under review).

Keke Lai (University of California–Merced)

Kelley, K. (2007). Constructing confidence intervals for standardized effect sizes: Theory, application,
and implementation. *Journal of Statistical Software, 20* (8), 1–24.

Kelley, K., & Rausch, J. R. (2006). Sample size planning for the standardized mean difference:
Accuracy in Parameter Estimation via narrow confidence intervals. *Psychological Methods, 11* (4), 363–385.

Lai, K., & Kelley, K. (2012). Accuracy in parameter estimation for ANCOVA and ANOVA contrasts: Sample size planning via narrow confidence intervals.
*British Journal of Mathematical and Statistical Psychology, 65*, 350–370.

Steiger, J. H., & Fouladi, R. T. (1997). Noncentrality interval estimation and the evaluation of
statistical methods. In L. L. Harlow, S. A. Mulaik, & J.H. Steiger (Eds.), *What if there were
no significance tests?* (pp. 221–257). Mahwah, NJ: Lawrence Erlbaum.

`ss.aipe.sc`

, `ss.aipe.sc.ancova.sensitivity`

```
## Not run:
ss.aipe.sc.ancova(psi=.8, width=.5, c.weights=c(.5, .5, 0, -1))
ss.aipe.sc.ancova(psi=.8, ratio=.6, width=.5,
c.weights=c(.5, .5, 0, -1), divisor="s.anova")
ss.aipe.sc.ancova(psi=.5, rho=.4, width=.3,
c.weights=c(.5, .5, 0, -1), divisor="s.anova")
## End(Not run)
```

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.