Skip to content

Instantly share code, notes, and snippets.

@MJacobs1985
Last active February 21, 2022 12:23
Show Gist options
  • Select an option

  • Save MJacobs1985/793e867e8ca4dce31344dd2820edaa0a to your computer and use it in GitHub Desktop.

Select an option

Save MJacobs1985/793e867e8ca4dce31344dd2820edaa0a to your computer and use it in GitHub Desktop.
plot_model(fit.4, grid=T, type="diag")
plot_model(fit.1, grid=T, sort.est="sort.all", y.offset=1.0)
plot_model(fit.1, type="eff")
plot_model(fit.1, show.values = TRUE, value.offset = .3)
plot_model(fit.1, type="re")
plot_model(fit.1, type="std")
plot_model(fit.1, type="resid")
plot_model(fit.1, type="pred", grid=T, terms=c("curve_day [all]"))
tab_model(fit.1,
show.std=T,
show.r2=T,
show.aic=T,
show.aicc = T,
show.dev=T,
show.re.var=T)
resfit1<-augment(fit.1)
boxplot(resfit1$.resid~resfit1$newField)
ggplot(dfnew2, aes(as.factor(curve_day),
resid(fit.4),
group=as.factor(curve_day)))+
geom_boxplot()+
geom_hline(yintercept=0, col="red", linetype="dashed")+
xlab("Time")+
ylab("Residuals")+
ggtitle("Residuals vs Time")+
theme_bw()+
theme(axis.text.x=element_blank(),axis.ticks.x=element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())
ggplot(resfit1,aes(x=feed_provided_cum,
y=.fitted,
colour=.resid))+
geom_point()+
geom_abline(intercept = 0, slope = 1, lty=2)+
scale_color_viridis_c(option="turbo")+
labs(title = "Calibration", y="Predicted", x="Observed", colour="Difference")+
theme_bw()+
facet_wrap(~newField, ncol=2)+
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())
qqmath(~resid(fit.1)|dfnew2$newField,
prepanel = prepanel.qqmathline,
panel = function(x, ...) {
panel.qqmathline(x, ...)
panel.qqmath(x, ...)
})
boxplot(resfit1$.resid~resfit1$lcn_id)
xyplot(resfit1$.resid~resfit1$.fitted)
plot(acf(resid(fit.1)))
qqp(resid(fit.1))
anova(fit.1)
plot(ranef(fit.1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment