[R] Bootstrapping help

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Thu Jan 19 00:45:15 CET 2006


although I appended a smiley to my first note, the message was
serious.  If you don't show us what you're doing, we can't help you.
Please provide an example in which you:

1) generate a small dataframe similar in structure to yours
2) provide cs
3) show the boot statement that applies cs to the example dataframe.

Also, it seems that you are unfamiliar with the use of indexing and
datframes.  Please read the Introduction to R, carefully, it is freely
available on CRAN.  You have asked R to provide you with all the rows
that are numbered 1/sample size.R; since the row numbers are integers
there aren't any.

And, please say hello to Andrew Storfer and Melanie Murphy from me.


On Wed, Jan 18, 2006 at 11:39:36AM -0800, Ben Ridenhour wrote:
>    Andrew,
>    Thanks for the suggestion!  This seems to have fixed things.  I was
>    wondering if you could explain why this works and what was wrong.  If
>    I issue the command
>    >my.boot<-boot(dataframe,cs,R=999)
>    and in order to what effect the command you told me use has I then do
>    something like
>    >dataframe[my.boot$weights,]
>    my.boot$weights looks to be a vector where element is 1/sample size.R
>    reports that
>    [1] var1    var2   var3   var4 var5
>    <0 rows> (or 0-length row.names)
>     Which indicates to me that I then have a dataframe with no data in
>    it! (Am I wrong about this?)  What is going on here?  Why did this
>    work?  Sorry for the basic questions.
>    Ben

Andrew Robinson  
Department of Mathematics and Statistics            Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599
Email: a.robinson at ms.unimelb.edu.au         http://www.ms.unimelb.edu.au

More information about the R-help mailing list