[R] trouble using boot package

Louize Hill lhill at ipimar.pt
Fri Jun 25 17:48:03 CEST 2004


Hello,

I am trying to carry out a bootstrap analysis (using the boot package) on a
table and cannot work out how to get the results I need!
I have a table ("d2") with 4 columns: "ID_code", "Age", "Quarter" and
"StomWt". Age (0-5) and Quarter (1-4) are my strata
Therefore I wish to estimate the confidence intervals for the mean StomWt
for each Age and Quarter.

If I do this manually for each age / quarter I get the following:

> boot (d2$StomWt[d2$Age=="0" & d2$Quarter=="1"], mean, R=999)

ORDINARY NONPARAMETRIC BOOTSTRAP

Call:
boot(data = d2$StomWt[d2$Age == "0" & d2$Quarter == "1"], statistic = mean,
    R = 999)

Bootstrap Statistics :
    original  bias    std. error
t1*    3.365       0           0

Firstly - shouldn't the bias and std error be something other than 0?
Furthermore, I would like to know if there is a way (function?) I can use
that would automate this?

Thank you for your help
Louize Hill




More information about the R-help mailing list