pred.fit: Fit Simulated Data to a Model.

Description Usage Arguments Value Examples

View source: R/fit_functions.R

Description

Fit Simulated Data to a Model.

Usage

1
pred.fit(model, xpred = NULL, ci = 0.95, npoints = "same")

Arguments

model

a model object, from (eg) lm

xpred

the predictor for the x axis on the graph

ci

confidence interval for fit curve (defaults to 0.95)

npoints

number of data points for fit line. Either specify a number, or "same" will return a simulation of the same size as the original dataset.

Value

predicted data

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.fit(glm.symptom)

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

Related to pred.fit in simfit...