search for: ols0

Displaying 1 result from an estimated 1 matches for "ols0".

Did you mean: ols
2010 Jun 29
1
Model validation and penalization with rms package
...the case that the optimum penalization may still give a model which is substantially overfitted? I calculated corrected R^2, optimism in R^2, and corrected slope for various penalties for a simple example: x1 <- rnorm(45) x2 <- rnorm(45) x3 <- rnorm(45) y <- x1 + 2*x2 + rnorm(45,0,3) ols0 <- ols(y ~ x1 + x2 + x3, x=TRUE, y=TRUE) corrected.Rsq <- rep(0,60) optimism.Rsq <- rep(0,60) corrected.slope <- rep(0,60) for (pen in 1:60) { olspen <- ols(y ~ x1 + x2 + x3, penalty=pen, x=TRUE, y=TRUE) val <- validate(olspen, B=200) corrected.Rsq[pen] <- val["R-square&...