## Use the method on a simulated data set
set.seed(79)
n <- 100; p <- 50
## Simulate design matrix and response
x <- matrix(runif(n * p, min = -2.5, max = 2.5), nrow = n, ncol = p)
y <- scale(3 * (x[,1]> 0), scale=FALSE) + x[,2]^3 + rnorm(n)
## try lambda = 2
fits <- liso.backfit(x,y, 2)
fits2 <- liso.backfit(x,y, 4)
## Plot in some different ways
plot(fits, dim=2)
plot(fits2, dim=2, col=2, add=TRUE)
plot(fits, grid=FALSE)
plot(fits)
Run the code above in your browser using DataLab