nonlinEffect {plaqr}R Documentation

Nonlinear Effects Plots

Description

Returns an object of class "plaqreffect" which represents the effect plot(s) of the nonlinear term(s) of a "plaqr" object from the plaqr function. A "plaqreffect" object should be plotted using the plot function.

Usage

nonlinEffect(fit, select=NULL, renames=NULL) 

Arguments

fit

a "plaqr" object.

select

a character vector with entries matching nonlinear terms in fit.

renames

a character vector with length equal to the number of nonlinear terms in select (if select is NULL, the length must be equal to the number of nonlinear terms in fit). The first entry renames the first nonlinear term for plotting purposes, and so on. Note that select can reorder the nonlinear terms (see the examples).

Value

A returned "plaqreffect" object to be used with the "plot" function. Each nonlinear term is associated with a list containing information for plotting. See the examples for accessing the list.

Author(s)

Adam Maidman

Examples

data(simData)
fit <- plaqr(y~.,~z1+z2,data=simData)

eff1 <- nonlinEffect(fit)
eff1
plot(eff1)

eff2 <- nonlinEffect(fit, select=c("z1","z2"), renames=c("Length", "Height"))
eff2
plot(eff2)

eff3 <- nonlinEffect(fit, select=c("z2","z1"), renames=c("Height", "Length"))
eff3
eff3$z1
eff3$z2
plot(eff3)

par(mfrow=c(1,2))
plot(eff3)

[Package plaqr version 2.0 Index]