Learn R Programming

RXshrink (version 1.1)

plot.RXtsimu: Plot method for RXtsimu objects

Description

Plot trace displays for RXtsimu simulated regression coefficients. The default is to display all three traces on one page with no legends.

Usage

# S3 method for RXtsimu
plot(x, trace = "all", trkey = FALSE, … )

Arguments

x

Output list object of class RXtsimu.

trace

One of five possible options: "all" to display 3 traces in one graph, "seq" to display 3 full-sized traces in sequence in response to user prompts, "coef" to display only the estimated shrunken beta coefficient trace, "rsel" to display only the relative squared error loss trace, or "spat" to display only the shrinkage (delta) factor pattern.

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
# NOT RUN {
  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
  rxsobj <- RXtsimu(form, data=longley2, trugam, trusig, Q=-1.5)
  plot(rxsobj)
# }

Run the code above in your browser using DataLab