On 16-01-22 07:18 AM, zozi9126 wrote:
> Dear ggplot2 mailing list members!
>
> I'm Zoltan Radai (PhD student at the University of Debrecen, Hungary), I
> hope You don't find my question trivial, but - though I've checked a
> fair share of the tutorials, descriptions and mailing / forum threads -
> I did not find answer to my question elsewhere. Namely, I'd like to use
> qplot for plotting predictions of a glmer model in the following way:
>
> qplot(x, predict(model1, type="response"), data=data,
> geom=c("point","smooth"), method="glmer", family="poisson", formula=y~x)
>
> An error message warns that - quite obviously - I did not specified
> random effects. My question is pretty simple: how can I specify random
> terms in qplot?
>
> Thanks in advance!
> ZR
I think you're pushing the limits of what geom_smooth()
can do internally, and that you'll be better off doing the glmer
fit externally, making a prediction data frame, and then adding it
to the plot: e.g. check out
https://rawgit.com/bbolker/mixedmodels-misc/master/ecostats_chap.html#prediction-1
> --
> --
> You received this message because you are subscribed to the ggplot2
> mailing list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google
> Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
ggplot2+u...@googlegroups.com
> <mailto:
ggplot2+u...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.