This function calculates sample size based on a desired standard error of the mean, to a specified confidence, for a given mean and standard deviation.
Arguments
- n
Sample size. This value can be missing if sample size is desired, or specified to calculate the maximum sd for given
mean
,precision
, and `ci.- mean
Mean prameter value. User value is mandatory.
- sd
Standard deviation of parameter values. If present, the function will return
n. If missing and
n` is specified, will return the maximum sd as detailed above.- precision
Desired width of the standard error of the mean (SEM). Default is 0.2, i.e. 20% or 10% below and 10% above the mean. If missing, and
mean
,sd
andn
are specified,precision
will be calculated.- ci
Confidence for the desired width of the SEM. Default is 0.95.