MBESS (version 4.4.3)

ss.aipe.pcm: 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 \(m\)th true change coefficient minus the \(m\)th 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.

References

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

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataCamp Workspace