Skip to content
Prev 8481 / 20628 Next

sas to R

Hi Steve,

That SAS code looks a little strange to me (I feel like it is missing
a distribution and some options on the random line).  It would
probably help if you could also describe in words what you are doing
or trying to do.

a rough pass at it would be:

glmer(y ~ trt + (trt | block) + (trt | trial), data = df, family = "binomial")

That will fit a logistic model, with a random intercept and trt effect
by block and by trial.  If they are nested, that is fine.  If they are
cross classified, that is fine too.  The random intercept and trt
effect will be correlated by default.

Cheers,

Josh
On Mon, Jun 25, 2012 at 7:50 AM, Steve Hong <emptican at gmail.com> wrote: