[R] Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...) [Broadcast]

German the.talion at gmail.com
Tue Nov 16 00:13:05 CET 2010


Hey everybody. 

I found the solution to the problem - at least for univariate statistics. In
order to use the bootstrap method for an arbitrary statistic, the syntax for
the function has to be in the form:

Given a univariate formula with argument 'x':

myfunction <- function(x,p){formula(x[p])}

The idea of the boot() function seems to be to generate a randon vector of
integers (representing the bootstrapped samples) and evaluate the data
matrix at said vector, evaluate the function, store the bootstrapped
statistic, and repeat. That's why it needs the second argument, and also why
it gives the same value of t* when no such argument is present (i.e. "all
values are equal to 21.10958105")

Cheers!
-- 
View this message in context: http://r.789695.n4.nabble.com/Re-Bootstrap-error-message-Error-in-statistic-data-origina-l-unused-argument-s-Broadcast-tp798359p3043991.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list