plot.msir: Plot method for "msir" objects.

Description Usage Arguments Author(s) References See Also Examples

View source: R/plot.R

Description

Plots directions and other information from MSIR estimation.

Usage

1
2
3
4
## S3 method for class 'msir'
plot(x, which, 
     type = c("pairs", "2Dplot", "spinplot", "evalues", "coefficients"), 
     span = NULL, std = TRUE, ylab, xlab, restore.par = TRUE, ...)

Arguments

x

a 'msir' object.

which

a vector of value(s) giving the directions for which the plot should be drawn.

type

the type of plot to be drawn.

span

the span of smoother (only for type = "pairs" | "2Dplot").

std

if TRUE coefficients are standardized (only for type = "coefficients").

ylab

a character string for the y-axis label.

xlab

a character string for the x-axis label.

restore.par

if TRUE the graphical parameters (see par) changed are restored to the previous state. If you want to manipulate the resulting plot you should set restore.par = FALSE.

...

additional arguments.

Author(s)

Luca Scrucca luca.scrucca@unipg.it

References

Scrucca, L. (2011) Model-based SIR for dimension reduction. Computational Statistics & Data Analysis, 55(11), 3010-3026.

See Also

msir

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# 2-dimensional response curve
n <- 300
p <- 5
b1 <- c(1, 1, 1, rep(0, p-3))
b2 <- c(1,-1,-1, rep(0, p-3))
b <- cbind(b1,b2)
x <- matrix(rnorm(n*p), nrow = n, ncol = p)
y <- x %*% b1 + (x %*% b1)^3 + 4*(x %*% b2)^2 + rnorm(n)
MSIR <- msir(x, y)
summary(MSIR)
plot(MSIR)
plot(MSIR, which = 1:2)
plot(MSIR, type = "2Dplot", which = 1, span = 0.7)
plot(MSIR, type = "2Dplot", which = 2, span = 0.7)
plot(MSIR, type = "spinplot")
plot(MSIR, type = "evalues")
plot(MSIR, type = "coefficients")

## End(Not run)

msir documentation built on Jan. 13, 2021, 12:50 p.m.