[R] Plot GEE confindence interval band ggplot2
Luis Fernando García
|uy@g@rc|@ @end|ng |rom gm@||@com
Tue Jun 1 00:10:31 CEST 2021
Dear all,
I want to plot a Generalized Estimating Equation (GEE) model, with
interactions and the confidence interval using a similar style to ggplot2
. I have tried several packages but all of them produce errors. My idea
I wanted to know if anyone knows a graphical package which works with GEE
or simular solution
Dataset in this link:
https://docs.google.com/spreadsheets/d/1nXerN91Iehe9OM1VGDMS3jnbvvF1tWcuS9bGtlrj_Ss/edit?usp=sharing
Thanks!
code below:
library(geepack)
library(ggplot2)
library(visreg)
library(sjPlot)
#Copy dataset before following the code
dat <- read.delim("clipboard", dec=","); attach(dat)
head(dat)
str(dat)
names(dat)
m5<- geeglm(tim~Pa*Pt,id=Esp, Gamma(link=log), corstr="exchangeable")
anova(m5,test="Chisq")
visreg(m5, "Pt", by="Pa",band=T, overlay=TRUE)
plot_model(m5, type = "pred", terms = c("Pa","Pt"))
[[alternative HTML version deleted]]
More information about the R-help
mailing list