Here is the code for the model I will be running:
proc glimmix data=ecig method=quad oddsratio;
class ID Year(ref='2018');
model vape(Event='1')=Year /s dist=binary link=logit ddfm=none
chisq;
random intercept/subject=ID;
output out=glmxout predicted(blup ilink)=predprob;
run;
You can search on the web for papers on this field like Estimating power in (generalized) linear mixed models: An open introduction and tutorial in R | Beha.... R code is provided in the paper.
Another paper (Calculating power in analysis of variance. (apa.org)) found on the book Statistical Power Analysis for the Behavioral Sciences | Jacob Cohen | (taylorfrancis.com) also discusses the topic of power calculation in mixed effect models. Of closer revelance to your question is another paper cited in this book: Optimum Sample Size and Number of Levels in a One-Way Random-Effects Analysis of Variance: The Journ.... A table of optimum sample size or number of levels for the random effects model is included in the latter paper. I hope these information helps.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.