Learn R Programming

RXshrink (version 1.0-7)

plot.RXtrisk: Plot method for RXtrisk objects

Description

Plot trace displays for RXtrisk true regression coefficients. The default is to display all five traces on one page with no legends.

Usage

## S3 method for class 'RXtrisk':
plot(x, trace = "all", trkey = FALSE, \dots )

Arguments

x
Output list object of class RXtrisk.
trace
One of seven possible options: "all" to display 5 traces in one graph, "seq" to display 5 full-sized traces in sequence in response to user prompts, "coef" to display only the estimated beta coefficient trace, "rmse" to display only the estima
trkey
If TRUE, display a crude legend at the bottom of each trace plot.
...
Optional argument(s) passed on to plot().

Value

  • NULL

Examples

Run this code
data(longley2)
  form <- GNP~GNP.deflator+Unemployed+Armed.Forces+Population+Year+Employed
  # set true regression parameter values not unlike their OLS estimates from RXridge().
  trugam <- matrix(c(.5,-.1,.2,.2,.2,-.2),6,1)
  trusig <- 0.04
  rxtobj <- RXtrisk(form, data=longley2, trugam, trusig, Q=-1.5)
  plot(rxtobj)

Run the code above in your browser using DataLab