pred.plot {simfit}R Documentation

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

Description

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

Usage

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

#' ## 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)

[Package simfit version 0.1.0 Index]