calEquation: calculated slope and intercept from object of class lm

Description Usage Arguments Examples

View source: R/add_lines.R

Description

calculated slope and intercept from object of class lm

Usage

1
2
calEquation(fit, mode = 1, pred = NULL, modx = NULL,
  modx.values = NULL, label = NULL, maxylev = 6, digits = 2)

Arguments

fit

An object of class lm

mode

A numeric

pred

name of predictor variable

modx

name of modifier variable

modx.values

Numeric. Values of modifier variable

label

A character string

maxylev

maximum length of unique value of variable to be treated as a categorial variable

digits

Integer indicating the number of decimal places

Examples

1
2
3
fit=lm(mpg~wt*hp+carb,data=mtcars)
calEquation(fit)
calEquation(fit,pred="hp")

predict3d documentation built on Sept. 3, 2019, 5:06 p.m.