[R] bootstrapping
Stephan Kolassa
Stephan.Kolassa at gmx.de
Sat Jan 16 00:04:59 CET 2010
Hi Aaron,
try the argument "statistic=mean". Then boot() will give you the mean
turn angle in your actual data (which appears to be 6 degrees, judging
from what you write), as well as the means of the bootstrapped data.
Then you can get (nonparametric) bootstrap CIs by
quantile(boot$t,probs=c(.025,.975)). As far as I can see, there is
really no need to look at sd().
A more interesting question would be how to deal with the fact that
-180=+180, there may be something to think about here...
HTH,
Stephan
aaron.foley at students.tamuk.edu schrieb:
> Hi All,
>
>
>
> I'm new to R so please bear with me. I have a dataset with 337 turn angles ranging from -180 to 180 degrees. I need to bootstrap (sample with replacement) 1,000 times to create expected average turn angle with 95% CIs. The code is pretty straightforward (<-boot(data =, statistic = ,R =)) but I am unsure how to input my observed mean (6 degrees) and standard deviation (66 degrees) into the statistic component. I realize there is a 'function' code but I can't seem to carry the results over to the 'boot' code.
>
>
>
> Thanks,
>
> Aaron M. Foley
> PhD Candidate
> Caesar Kleberg Wildlife Research Institute
> Texas A&M University - Kingsville
> Cousins Hall, Room 201
> Kingsville, TX 78363
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list