# NOT RUN {
# }
# NOT RUN {
## Example of the use of function regspmplot with all the default options
## regsmplot() with first argument vector y and no option.
## In the first example as input there are two matrices: y and X respectively
## A simple plot is created
n <- 100
p <- 3
X <- matrix(data=rnorm(n*p), nrow=n, ncol=p)
y <- matrix(data=rnorm(n*1), nrow=n, ncol=1)
regspmplot(y, X)
## Example of the use of function regspmplot with first argument
## vector y and third argument group.
## Different groups are shown in the yXplot
group <- rep(0, n)
group[1:(n/2)] <- rep(1, n/2)
regspmplot(y, X, group)
## Example of the use of function regspmplot with first argument
## vector y, third argument group and fourth argument plot
## (Ex1) plot=TRUE
regspmplot(y, X, group, plot=TRUE)
## (Ex1) Set the scale for the x axes, the y axis and control symbol type
regspmplot(y, X, group, xlim=c(-1,2), ylim=c(0,2), pch=c(10,11), trace=TRUE)
## When the first input argument is an object.
## In the following example the input is an object which also contains
## information about the forward search.
(out <- fsreg(y~X, method="LMS", control=LXS_control(nsamp=1000)))
(out <- fsreg(y~X, bsb=out$bs, monitoring=TRUE))
regspmplot(out, plot=0)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab