Sample size calculation
To calculate a sample size for a trial analysed using the model specified in (1), it is necessary to find the variance of the treatment effect estimated from the random slopes model. Again, from standard theory [The relevant entry of this variance–covariance matrix is the 3 × 3To get The Stata package slopepower implements this sample size calculation given an existing dataset [