ss.aipe.pcm: Sample size planning for polynomial change models in...

View source: R/ss.aipe.pcm.R

ss.aipe.pcmR Documentation

Sample size planning for polynomial change models in longitudinal study

Description

This function plans sample size with respect to the group-by-time interaction in the context of a longitudinal design with two groups. It plans sample size from the accuracy in parameter estimation (AIPE) perspective, where the goal is to obtain a sufficiently narrow confidence interval for the fixed effect polynomial change coefficient parameter (e.g., linear, quadratic, etc.). The sample size returned can be one such that (a) the expected confidence interval width is sufficiently narrow, or (b) the observed confidence interval will be sufficiently narrow with a specified high degree of assurance (e.g., .99, .95, .90, etc.). This function accompanies Kelley and Rausch (2011).

Usage

ss.aipe.pcm(true.variance.trend, error.variance, 
variance.true.minus.estimated.trend = NULL, duration, frequency, 
width, conf.level = 0.95, trend = "linear", assurance = NULL)

Arguments

true.variance.trend

The variance of the individuals' true change coefficients (i.e., \sigma^2_{\upsilon_m} in Kelley & Rausch, 2011) for the polynomial trend (e.g., linear, quadratic, etc.) of interest.

error.variance

The true error variance (i.e., \sigma^2_{\epsilon} in Kelley & Rausch, 2011).

variance.true.minus.estimated.trend

The variance of the difference between the mth true change coefficient minus the mth estimated change coefficient (i.e., \sigma^2_{\hat{\pi}_{m} - \pi_{m}} from Equation 19 in Kelley & Rausch, 2011).

duration

The duration of the study.

frequency

The number of times measurement occurs within each unit of time.

width

width of the confidence interval

conf.level

The desired level of confidence for the confidence interval that will be computed at the completion of the study.

trend

The polynomial trend (1st-3rd) of interest specified as "linear", "quadratic", or "cubic".

assurance

Value with which confidence can be placed that describes the likelihood of obtaining a confidence interval less than the value specified (e.g, .80, .90, .95)

Value

Returns the necessary sample size for the combination of the desired goals and values of the population parameters for a specific design.

Note

Like in all formal sample size planning methods that require the value of one or more population parameter(s), if the population parameters are incorrectly specified, there is no guarantee that the sample size this function returns will be accurate. Of course, the further away from the true values, the further away the true sample size will tend to be.

The number of timepoints in a study (say M) is defined by f \times D + 1, where f is the frequency and D is the duration.

Author(s)

Ken Kelley (University of Notre Dame; KKelley@ND.Edu)

References

Kelley, K., & Rausch, J. R. (2011). Accuracy in parameter estimation for polynomial change models. Psychological Methods.

Examples

 
## Not run: 
# An example used in Kelley and Rausch for the expected confidence interval 
# width (returns 278). Thus, a necessary sample size of 278 is required when 
# the duration of the study will be 4 units and the frequency of measurement 
# occasions is 1 year in order for the expected confidence interval 
# width to be 0.025 units.  

ss.aipe.pcm(true.variance.trend=0.003, error.variance=0.0262, duration=4, 
frequency=1, width=0.025, conf.level=.95)

# Now, when incorporating an assurance parameter (returns 316). 
# Thus, a necessary sample size of 316 will ensure that the 95% confidence 
# interval will be sufficiently narrow (i.e., have a width less than .025 units) 
# at least 99% of the time.

ss.aipe.pcm(true.variance.trend=.003, error.variance=.0262, duration=4, 
frequency=1, width=.025, conf.level=.95, assurance=.99)

## End(Not run)

MBESS documentation built on Oct. 26, 2023, 9:07 a.m.