Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/powslopes_new2.R View source: R/powslopes_new1.R
In the random slopes model each patient has a linear trajectory over time with a random intercept and slope. The intercepts are assumed to be the same for each of two treatment groups and the treatment effect is measured by the difference in average slopes.
1 | randomSlopesMatrix(visit, vs, sigma2, dropPerMonth,baselineTreatment=FALSE)
|
visit |
A vector of visit times or a list of two visit time vectors if the treatments have different visit times. |
vs |
The variance covariance matrix of the intercept and slope random effects. |
sigma2 |
The error variance. |
dropPerMonth |
Either a single number which is the attrition rate or a vector of attrition rates for each visit. Note this would have length one less than the number of visits since the attrition after the last visit would not be used. |
baselineTreatment |
A logical indicating whether their treatment is in the model as a main effect. In a random slopes model the effect or treatment is measured by the treatment-time interaction. |
This calculates the matrices for the random slopes model y_{t}=μ+β_1 t+ β_2 t*I(\rm{rx}=1)+u+b t+σ^2 ε, where u,b,ε are random variables. Note that a treatment main effect is not included in the model by default, because in a randomized study the treatments should be the same at the baseline visit. This practice may vary.
A list of xMatrix,vMatrix,attritionRates
for input into LPower
David A. Schoenfeld
Q Yi and T. Panzarella. Estimating sample size for tests on trends across repeated measurements with missing data based on the interaction term in a mixed model. Control Clin Trials, 23(5):481–96, 2002.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.