plotLmPartRes | R Documentation |
plotLmPartRes shows the relation between selected covariates from a lm model and the response, as well as the relation of those covariates and the response adjusted for the other covariates.
The functionality of plotLmPartRes is very limited.
Only numeric vectors are supported (factors, interactions, I()'s are NOT).
crPlot
and ceresPlot
should be preferred.
plotLmPartRes(m, covNames = names(m$model)[-1],
...)
m |
an object of class 'lm' |
covNames |
names of covariates to plot (defaults to all of them) |
... |
further arguments to |
Tomas Sieger
crPlot
, ceresPlot
# prepare data
set.seed(1)
n<-40
h<-rnorm(n)
f<-rnorm(n)
w<-3*h-f+rnorm(n)
d<-data.frame(h,w,f)
# fit lm
m<-lm(f~h+I(w-d),d)
summary(m)
# plot partial residuals
plotLmPartRes(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.