predicted.line: Create and plot a fitted line for a generalized linear model

Description Usage Arguments Author(s) Examples

View source: R/predicted.line.R

Description

Create and plot a fitted line for a generalized linear model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
predicted.line(
  model,
  outcome,
  IV,
  covs = NA,
  data,
  cov.func = c("mean", "median", "min", "max"),
  length = 100,
  add = F,
  ret.pred = F,
  ...
)

Arguments

model

A model (e.g., lmer model, or any type of model that supports the "predict" command)

outcome

A string that names the outcome variable

IV

A string that names the predictor variable

data

The original dataset used to fit the model

length

The number of predicted points used for plotting the line. Defaults to 100.

ret.pred

Should the fits be returned as a matrix?

...

Other arguments passed to plot, lines, or predict

covariates

A function used on all the covariates. Can be mean, median, min, or max

Add.

Should the fitted line be added to an existing plot?

Author(s)

Dustin Fife

Examples

1
## do this later

dustinfife/fifer documentation built on Oct. 31, 2020, 3:36 p.m.