Timeline for How to pass additional parameters via ... to statistic parameter in boot()
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 7, 2020 at 21:52 | vote | accept | El- | ||
| May 23, 2017 at 12:18 | history | edited | URL Rewriter Bot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
| Feb 13, 2017 at 20:09 | answer | added | El- | timeline score: 1 | |
| Feb 13, 2017 at 20:07 | history | edited | El- | CC BY-SA 3.0 |
added 837 characters in body
|
| Feb 13, 2017 at 20:01 | comment | added | El- |
Yeah -- I just started working on it and changed my statFun to include named parameters, rather than making them ambiguous through ..., just like you mentioned user20650. Thanks for the help, got it figured out.
|
|
| Feb 13, 2017 at 19:49 | comment | added | user20650 |
in fact the help for the ... argumnet says "Other named arguments for statistic which are passed unchanged each time it is called" (emphasis mine)
|
|
| Feb 13, 2017 at 19:46 | comment | added | user20650 |
I think the help means you can pass multiple arguments via the ..., but to actually do this , and to be passed on to boot , you should probably name them : so use statFun <- function(funData, indices, center=FALSE, val = NULL){ , and change the rest of your function accordingly. You then call boot with boot(testData, statFun, center=TRUE, val=mean(testData), R = 100)
|
|
| Feb 13, 2017 at 19:43 | comment | added | Roman Luštrik | I get results 20 and 9.5 (which I would expect). | |
| Feb 13, 2017 at 18:59 | review | First posts | |||
| Feb 13, 2017 at 20:54 | |||||
| Feb 13, 2017 at 18:57 | history | asked | El- | CC BY-SA 3.0 |