plot.lm.ma: Plot an 'lm.ma' Object

Description Usage Arguments Details Value Author(s) References Examples

View source: R/lm.ma.R

Description

Plots a model average model and its derivatives.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'lm.ma'
plot(x,
     plot.B = 99,
     plot.ci = FALSE,
     plot.data = FALSE,
     plot.deriv = FALSE,
     plot.num.eval = 250,
     plot.rug = FALSE,
     plot.xtrim = 0.005,
     ...)

Arguments

x

an object of type lm.ma

plot.B

number of bootstrap replications used to construct nonparametric confidence intervals

plot.ci

a logical value indicating whether to plot nonparametric confidence intervals or not

plot.data

a logical value indicating whether to plot the data or not

plot.deriv

a logical value indicating whether to compute derivatives or not

plot.num.eval

number of evaluation points

plot.rug

a logical value indicating whether to plot the data with a rug or not

plot.xtrim

trimming parameter used to exclude tail values for the predictors that can obscure main features in the plot (trims the proportion plot.xtrim from each tail)

...

optional arguments to be passed to plot

Details

This function plots an object returned by lm.ma. Typical usages are

1
2
3
4
5
6
7
    plot(model)
    plot(model,plot.data=TRUE)
    plot(model,plot.ci=TRUE,plot.B=99)    
    plot(model,plot.data=TRUE,plot.ci=TRUE,plot.B=199)
    plot(model,plot.deriv=TRUE)    
    plot(model,plot.deriv=TRUE,plot.ci=TRUE,plot.B=399)        
  

Value

None.

Author(s)

Jeffrey S. Racine

References

Racine, J.S. and D. Zhang and Q. Li (2017), “Model Averaged Categorical Regression Splines.”

Examples

1
2
3
data(cps71)
model <- lm.ma(logwage~age,data=cps71)
plot(model,plot.data=TRUE,plot.ci=TRUE)

JeffreyRacine/R-Package-ma documentation built on May 7, 2019, 10:35 a.m.