Re: [R] Bootstrapped CIs of MSE for (G)AM model

2018-11-26 Thread varin sacha via R-help
R-experts, I still can't get the nonparametric studentized bootstrapped CIs. How can I solve the problem ? Here is the reproducible example :  # # # # # # # # # # # # # # # # library(ISLR) library(earth) library(boot)    # function to obtain MSE  MSE <- function(data, indices, formula) {     d

Re: [R] Bootstrapped CIs of MSE for (G)AM model

2018-11-22 Thread varin sacha via R-help
Great, many thanks Rui, it perfectly works. Best, Le jeudi 22 novembre 2018 à 23:45:15 UTC+1, Rui Barradas a écrit : Hello, Sorry, there's a close parenthesis too many in the call to boot, the very last one. Delete it and it runs with no errors. Rui Barradas Às 21:55 de 22/11/2

Re: [R] Bootstrapped CIs of MSE for (G)AM model

2018-11-22 Thread Rui Barradas
Hello, Sorry, there's a close parenthesis too many in the call to boot, the very last one. Delete it and it runs with no errors. Rui Barradas Às 21:55 de 22/11/2018, Rui Barradas escreveu: Hello, There were several errors with your code. The following works but with the other CI types.

Re: [R] Bootstrapped CIs of MSE for (G)AM model

2018-11-22 Thread Rui Barradas
Hello, There were several errors with your code. The following works but with the other CI types. library(ISLR) library(mgcv) library(boot) # function to obtain MSE MSE <- function(data, indices, formula) { d <- data[indices, ] # allows boot to select sample fit <- gam(formula, data = d)

[R] Bootstrapped CIs of MSE for (G)AM model

2018-11-22 Thread varin sacha via R-help
Dear R-experts, I am trying to get the bootstrapped confidence intervals of Mean squared error (MSE) for a (G)AM model. I get an error message. Here below the reproducible R code. Many thanks for your response. install.packages("ISLR") library(ISLR) install.packages("mgc