mean.mat: Helper function to construct matrix for effects plot

Description Usage Arguments Examples

View source: R/mean.mat.R

Description

Helper function that constructs a matrix of select variable with all others held at their means. Will inheret call options from parent function unless called independently.

Usage

1
2
## S3 method for class 'mat'
mean(model, var)

Arguments

model

Model takes the object name of your linear regression model. Example - if you run the following command: m1 <- lm(y~x), then enter m1 for this argument.

var

The variable to plot change in predicted values of 'y.' Your 'x' variable. Will inheret from parent function except when called independently.

Examples

1
2
3
#' # Estimate a regression using 'mtcars' data:
m <- lm(mpg~disp+hp+wt+am,data=mtcars)
mean.mat(m,var='wt')

loganstundal/POL3085 documentation built on May 21, 2019, 10:32 a.m.