I started using the package boot
in R
and I am having some trouble understanding the sense of the parameters t
and t*
on plots.
A basic code is the following:
library(boot)
mydata <- c(0.461, 3.243, 8.822, 3.442)
meanFunc <- function(mydata, i){mean(mydata[i])}
bootMean <- boot(mydata, meanFunc, 250)
plot(bootMean)
When using the command plot.boot
I obtain this graphic:
What does it represent t*
. Why the title says Histogram of t but in the x axis we have t*
?
As an added question: How can I modify the properties of this graphic such as, for example, the color or tile or axis?
Thanks
In the output of boot (bootMean
in your case) one can find two types of t
s: t0
and t
.
From the documentation of ?boot
:
t0
The observed value of statistic applied to data.
This is the value of your meanFunc
function on the original data set i.e.:
> mean(mydata)
[1] 3.992
This is called original t*
or t1*
in boot's output:
> bootMean
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = mydata, statistic = meanFunc, R = 250)
Bootstrap Statistics :
original bias std. error
t1* 3.992 0.165301 1.512914
And then you have
t
A matrix with sum(R) rows each of which is a bootstrap replicate of the result of calling statistic
t
here represents the matrix (vector in your case) of all the statistics produced according to your R
argument i.e. 250 in your case.
Therefore, there is a difference between t
and t*
and the difference is that t
is the matrix of all the statistics i.e. t
here is what we would call the random variable in statistics whereas t*
are the estimates of the t
random variable. In your case you get 250 estimates t*
s as determined by the R
argument. In other words t
is the matrix and t*
are the elements of the matrix.
And therefore the plot makes sense as well since it is the histogram of the random variable t
and the x-axis contains the estimates of the random variable i.e. the t*
s.