Description Usage Arguments Value Author(s) References See Also Examples
Applies crossvalidation to Liso
1 2 |
For cv.liso:
x |
Design matrix (without intercept). |
y |
Response value. |
K |
Number of CV folds. |
lambda |
Values of the penalty parameter lambda to be tried. For speed, it's advised that a decreasing vector be used. If NULL, a log grid used, using |
trace |
If TRUE, print diagnostic information as calculation is done. |
plot.it |
If TRUE, plot a graph of CV error against lambda with |
weights |
Observation weights. Should be a vector of length equal to the number of observations. |
weightedcv |
If TRUE, use observation weights when averaging CV error across folds. |
huber |
If less than Inf, huberisation parameter for huberised liso. (Experimental) |
covweights |
Covariate weights. Should be a vector of length equal to the number of covariates. |
gridsize |
Size of logarithmic grid of lambda values, if lambda is unspecified. |
gridmin |
Minimum of logarithmic grid of lambda values, if lambda is unspecified. Considered as a proportion of the maximum value of lambda. |
For plotCV:
cv.object |
Object to be plotted. |
For both:
se |
If TRUE, add error bars to CV plot. |
... |
Additional arguments to be passed to |
cv.liso creates a list of 5 components:
lambda |
Lambda values used. |
cv |
Mean or weighted mean CV for each lambda. |
cv.error |
Sqrt of MLE estimated variance of CV for each lambda. |
residmat |
Full length(lambda) x K matrix of CV errors. |
optimlam |
Lambda value that minimises CV error |
Zhou Fang
Zhou Fang and Nicolai Meinshausen (2009), Liso for High Dimensional Additive Isotonic Regression, available at http://blah.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## 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)
## Do CV
CVobj <- cv.liso(x,y, K=10, plot.it=TRUE)
## Do the actual fit
fitobj <- liso.backfit(x,y,CVobj$optimlam)
plot(fitobj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.