# \dontshow{
utils::example(Lorenz.Reg, echo = FALSE)
# }
# Non-penalized regression example (not run due to execution time)
if (FALSE) {
set.seed(123)
NPLR_boot <- Lorenz.boot(NPLR, R = 30)
confint(NPLR_boot) # Confidence intervals
summary(NPLR_boot)
}
# Penalized regression example:
set.seed(123)
PLR_boot <- Lorenz.boot(PLR, R = 20)
print(PLR_boot)
summary(PLR_boot)
coef(PLR_boot, pars.idx = "Boot")
predict(PLR_boot, pars.idx = "Boot")
plot(PLR_boot)
plot(PLR_boot, type = "diagnostic")
# Confidence intervals for different selection methods:
confint(PLR_boot, pars.idx = "BIC") # Using BIC-selected tuning parameters
confint(PLR_boot, pars.idx = "Boot") # Using bootstrap-selected tuning parameters
Run the code above in your browser using DataLab