pred.plot: Add model fit line (with SE) to GLM models (Poisson, negative...

Description Usage Arguments Value Examples

View source: R/plot_functions.R

Description

Add model fit line (with SE) to GLM models (Poisson, negative binomial etc)

Usage

1
pred.plot(model, xpred = NULL, ci = 0.95)

Arguments

model

a model object, from (eg) lm glm

xpred

the predictor to be plotted on the x axis

ci

value for confidence interval (defaults to 0.95)

Value

ggplot object with fit line

Examples

1
2
3
4
5
6
7
8
#' ## Anwar M, Green JA, Norris P, et al 
## Prospective daily diary study reporting of any and all symptoms in healthy 
## adults in Pakistan: prevalence and #' response
## BMJ Open 2017;7:e014998
data(symptom)
glm.symptom <- glm(actual_help_days ~ symp_days_reported, 
     family = "poisson", data = symptom)
pred.plot(glm.symptom)

simfit documentation built on May 17, 2021, 9:09 a.m.

Related to pred.plot in simfit...