Robert,
Robert Keefe wrote:> Hello All,
>
> Specifying 'type = "response"' when using predict() on a
> model fit using glm(...,family="binomial") returns fitted
> probabilities.
>
> Is it possible to get the same from a model object
> fit using glmmPQL() ?
>
glmmPQL returns an lmeObject which has no "family" information. You
will
have to do this operation yourself. As in:
R> x = glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
R+ family = binomial, data = bacteria) # from help page
iteration 1
iteration 2
iteration 3
iteration 4
iteration 5
iteration 6
R> y = predict(x)
R> str(y)
atomic [1:220] 4.05 4.05 2.44 2.44 2.25 ...
- attr(*, "label")= chr "Fitted values"
R> z = binomial()$linkinv(y) # default: link = "logit"
R> str(z)
num [1:220] 0.983 0.983 0.920 0.920 0.905 ...