I am trying to calculate the sample size for a mixed linear regression model. The dependent variable is continuous and the model includes 2 further continuous variables. The random intercept is based on a grouping variable (5 levels reflecting sites where the subjects have been enrolled). I would like to calculate the proper sample size based on given Y (better if %change of Y rather than mean(SD), since I have this data from literature), given X (each unit change of it) using the mixed linear regression model I have already used but solving by N (alpha= 0.05 and beta= 0.20).
Is it possible using R?