Hi Mike,
1. Oh, yes, this is an excellent reparameterization trick! To achieve the same model, you must add TYPE=CS
random _residual_ / solution subject=study_id(postal_code) type=cs;
Here's a demo
data demo2;
call streaminit(87564);
mu = 5;
array aa[3] _temporary_ (1 0.5 0);
do b= 1 to 20;
var_b = rand("normal",0,2);
do c= 1 to 10;
var_c = rand("normal",0,1);
do a= 1 to 3;
y = mu + aa[a] + var_b + +var_c + rand("normal",0,1);
output;
end;
end;
end;
run;
proc glimmix data=demo2;
class a b c;
model y = a / solution ddfm=kr2;
random intercept / subject=b;
random a / subject=b;
random intercept / subject=c(b);
run;
proc glimmix data=demo2;
class a b c;
model y = a / solution ddfm=kr2;
random intercept / subject=b;
random a / subject=b;
random _residual_ / subject=c(b) type=cs;
run;
2. The original variable with multiple, non-ordered categorical outcomes strikes me as a multinomial variable, not a count variable; I don't think that the Poisson distribution was ever pertinent. When you compile the various outcomes into event/nonevent, you've created a variable with a binary (Bernoulli) distribution; your model now is a binary logistic regression. Using an offset with a binary distribution to accommodate varying exposures is not as straightforward as replacing "poisson" with "binary". One approach is to use the complementary log-log link; see https://www.r-bloggers.com/modelling-occurence-of-events-with-some-exposure/ and https://rpubs.com/bbolker/logregexp, or search on "logistic regression offset" for more hits.
3. Too bad. I notice that this approach is presented on p 3 of the Kiernan et al paper you link to in your response. But maybe once you fix the distribution specification, you might try it again with more success.
Let me know what works and doesn't!
... View more