Learn R Programming

simex (version 1.0)

plot.SIMEX: Plot method for the SIMEX- and MCSIMEX-class

Description

Creates plots for the SIMEX- or MCSIMEX-class. For each variable a plot is produced showing the results of the extrapolation step.

Usage

plot.SIMEX(x, xlab = "lambda", ylab = colnames(b[, -1])
	, ask = FALSE, show = rep(TRUE, NCOL(b) - 1), ...)

Arguments

x
object of class SIMEX
xlab
optional name for the X-Axis
ylab
vector containing the names for the Y-Axis
ask
logical. If TRUE, the user is asked for input, before a new figure is drawn.
show
vector of logicals indicating for wich variables a plot should be produced
...
optoinal, passed to par()

See Also

simex,mcsimex,par

Examples

Run this code
a <- rnorm(100)
b <- a*20 + rnorm(100,100,10)
e <- a + rnorm(100,1,5)
naive.model <- lm(a~ b + e, x= TRUE,y =TRUE)

w<- simex(model = naive.model
	, SIMEXvariable = c("b","e")
	, measurement.error = c(10,5)
	, lambda=c(0.5,1,1.5,1.75,2.25,2.5,3))

plot(w, ask = FALSE, mfrow = c(2,2))

Run the code above in your browser using DataLab