Recent News...

Happy Holidays!

Happy Holidays from the MGH Biostatistics Center

Site Redesign

Welcome to our redesigned website!


You are here

A program to calculate the power or sample size for a random slopes model

by David A. Schoenfeld
Questions regarding this item should be sent to David Schoenfeld.

This program calculates the power or sample size for a random slopes model. This model assumes that each patient has a linear trajectory in with a slope and intercept that have a multivariate normal distribution. The fixed effects are time and a time treatment interaction. The time treatment interaction is the treatment effect as it measures the extent to which the mean slope is different in the two treatment groups. The program requires the variance covariance matrix for the random effects and the error variance of observations arround a patients trajectory.

The program is an m-file (Matlab/Octave) and will run under Octave which is a public domain m-file interpreter.

The program has also been ported to R.


2009 Feb 24; Matlab program updated.