samplesizeTable {cg} | R Documentation |
Estimate Required Sample Sizes
Description
Estimate the sample size required to detect a specified difference in a future study. The estimate is based on the variability in a data fit with the cg package.
Usage
samplesizeTable(fit, direction, mmdvec, power = 0.80,
alpha = 0.05, nmax = 1000, display = "print", ...)
Arguments
fit |
An object created by calling a
|
direction |
A |
mmdvec |
A |
power |
The power for the future study, set by default to be |
alpha |
The significance level or alpha for the future study, set by default
as |
nmax |
The maximum number of subjects per group. If more subjects are estimated to be required, than the exact number required is not reported, only the fact that more than the maximum number would be required. This is in place to prevent long and likely unnecessary calculations. |
display |
One of three valid values:
|
... |
Additional arguments, depending on the specific method written for the object. See the method-specific documentation for additional details. |
Value
A method-specific SampleSizeTable
object is returned.
See the specific methods for discussion of return values.
Note
Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.
Author(s)
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
See Also
samplesizeTable.cgOneFactorFit
Examples
#### One Factor data
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
analysisname="Canine",
endptname="Prostate Volume",
endptunits=expression(plain(cm)^3),
digits=1, logscale=TRUE, refgrp="CC")
canine.fit <- fit(canine.data)
canine.samplesize <- samplesizeTable(canine.fit, direction="increasing",
mmdvec=c(10, 25, 50, 75, 100))
samplesizeGraph(canine.samplesize)