- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Is the Hamiltonian Monte Carlo or Gamerman's algorithm used for posterior sampling?
- If the default sampler uses Gamerman's algorithm, is there a way to specify that BGLIMM use the HMC sampler?
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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