pred.fit {simfit}R Documentation

Fit Simulated Data to a Model.

Description

Fit Simulated Data to a Model.

Usage

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

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


[Package simfit version 0.1.0 Index]