1) If you want to know the content of an object (and therefore the fields) the solution is to use str
> str(bootMean)
List of 11
$ t0 : num 16778
$ t : num [1:1000, 1] 16692 17501 16776 17648 16184 ...
$ R : num 1000
$ data : num [1:7] 16484 16463 15649 15615 20034 ...
$ seed : int [1:626] 403 1 235491040 177295907 312278337 450969648 1593694798 259661497 1711303371 -2124436614 ...
$ statistic:function (x, i)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 13 1 37 13 37 1 1
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment:0x102c7ce28>
$ sim : chr "ordinary"
$ call : language boot(data = dados, statistic = meanFunc, R = 1000)
$ stype : chr "i"
$ strata : num [1:7] 1 1 1 1 1 1 1
$ weights : num [1:7] 0.143 0.143 0.143 0.143 0.143 ...
- attr(*, "class")= chr "boot"
2) I use boot
in conjunction with boot.ci
to get the confidence interval (the tchans of a method like bootstrap is not getting the media - which should be very similar to the average obtained with mean
, but rather the confidence interval).
But getting the results of boot.ci
is not straightforward, you need to read the value of the manual
link
> bci<-boot.ci(bootMean)
Warning message:
In boot.ci(bootMean) : bootstrap variances needed for studentized intervals
> bci$bca[4:5]
[1] 16074.65 18516.44