[R] boot: how is t0 calculated?

Thomas Hoffmann thomas.hoffmann at uni-bonn.de
Tue Oct 23 00:28:34 CEST 2012


Dear all,

I am doing log-transformed bootstrap regression using:

x=c(0.038,0.054,1.030,1.250,10.240,52.000,228.100,240.000,758.000,1502.600,0.140,9.170,280.000,1.000,0.150,0.388,20)
y=c(3961.5,25987.5,526557,321094.5,6433332,23592715.5,40500000,
228853521.1,320980392,429000000,58435.5,13525240.5,621195600,1020000,30567.0,296100.0,4800000)

xy = data.frame(x=x,y=y)

reg.ln = function(storage, indices){
   storage = storage[indices,]
   res.lm  = lm(log(y)~log(x), data=storage)
   coefficients(res.lm)
}

xy.boot = boot(xy, reg.ln, 2000)



Why does the Intercept given by xy.boot$t0 differs from 
mean(co.boot$t[,1])?
How are the t0 values calculated?

Any help is appreciated!

Thanks
Thomas



More information about the R-help mailing list