plot.plaqreffect: Nonlinear Effect Plot for a Partially Linear Additive...

Description Usage Arguments Author(s) Examples

View source: R/plaqreffect.R

Description

Makes nonlinear effect plots for the nonlinear effects in a fit returned from the nonlinEffect function. Note: you cannot use this function to plot a "plaqr" object.

Usage

1
2
## S3 method for class 'plaqreffect'
plot(x, select=NULL, rug = TRUE, jit = TRUE, titles = NULL, pages = 0, type="l", ...)

Arguments

x

a plaqreffect object returned from nonlinEffect.

select

vector of indices of nonlinear terms in x to be plotted, by default all.

rug

if TRUE, a rugplot for the x-coordinate is plotted.

jit

if TRUE, the x-values of the rug plot are jittered.

titles

title(s) as vector of character strings, by default titles are chosen for each plot as “Effect of CovariateName (tau=tau)”.

pages

number of pages desired for the plots.

type

the type of plot that should be drawn.

...

additional arguments for the plotting algorithm.

Author(s)

Adam Maidman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(simData)
fit <- plaqr(y~.,~z1+z2,data=simData)
eff <- nonlinEffect(fit, select=c("z1","z2"), renames=c("Length", "Height"))
eff

plot(eff)
plot(eff, select=1, col="red")
plot(eff, select=c(2,1), titles=c("Effect Z1","Effect Z2"))
plot(eff, select=1, col="red", lwd=4)

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

Example output

Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Loading required package: splines
Call:
plaqr(formula = y ~ ., nonlinVars = ~z1 + z2, data = simData)

Nonlinear Effects:
       z1 z2
Order:  1  2

Nonlinear Effects' Names:
       Length Height
Order:      1      2

plaqr documentation built on May 2, 2019, 3:32 p.m.