I've recently started using PROC BGLIMM for modelling Binary Repeated Measures Models with Random Effects. I must say it is a wonderful breath of fresh air for Bayesian Models. After reading the BGLIMM documentation, I have the following questions:
Please find below my SAS script for this example:
proc bglimm data=data_in nmc=3000 seed=901214 Statistics=sum Stats=int diag=autocorr;
class home trt_assign participant_id session_instance_new cohort;
model home(event = "1") = trt_assign calcage baseline_measurement / dist=binary link=logit;
random time/ type=ar(1) subject=participant_id;
random intercept/ subject=cohort;
run;
Thanks again in advance!
Of course, it is the perfectly obvious (hah! 🤔) NUTS option in either the RANDOM statement (for G side effects) or the REPEATED statement (for R side effects)..
SteveDenham
Of course, it is the perfectly obvious (hah! 🤔) NUTS option in either the RANDOM statement (for G side effects) or the REPEATED statement (for R side effects)..
SteveDenham
Hi Steve.
Thank you for responding to my question.
For completeness, to specify the HMC sampler in BGLIMM with the default settings, simply include the "nuts" syntax in the random/repeat statements. The SAS script would thus run as follows:
proc bglimm data=data_in nmc=3000 seed=901214 Statistics=sum Stats=int diag=autocorr;
class home trt_assign participant_id session_instance_new cohort;
model home(event = "1") = trt_assign calcage baseline_measurement / dist=binary link=logit;
random time/ type=ar(1) subject=participant_id nuts;
random intercept/ subject=cohort nuts;
run;
I believe that is correct. The code as presented will give the estimates conditional on the random effects. Should you want the marginal estimates averaged over time, you could replace the first RANDOM statement with a REPEATED statement.
SteveDenham
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.