[R] bootstrapping respecting subject level information

2013-07-04 Thread Sol Lago
Hi there, This is the first time I use this forum, and I want to say from the start I am not a skilled programmer. So please let me know if the question or code were unclear! I am trying to bootstrap an interaction (that is my test statistic) using the package boot. My problem is that for

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread David Winsemius
On Jul 3, 2013, at 7:19 PM, Sol Lago wrote: Hi there, This is the first time I use this forum, and I want to say from the start I am not a skilled programmer. So please let me know if the question or code were unclear! I am trying to bootstrap an interaction (that is my test

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Andrew Robinson
I'd like to preface this answer by suggesting that if you have multiple measurements within subjects then you should possibly be thinking about using mixed-effects models. Here you have a balanced design and seem to be thinking about a constrained bootstrap, but I don't know whether the resulting

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Andrew Robinson
I think that in the case of a 2*2 balanced, replicated design such as this one, interpreting the interaction should be safe. Cheers Andrew On Fri, Jul 5, 2013 at 9:38 AM, David Winsemius dwinsem...@comcast.net wrote: On Jul 3, 2013, at 7:19 PM, Sol Lago wrote: Hi there, This is the first

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Joshua Wiley
Hi, It is not the easiest to follow code, but when I was working at UCLA, I wrote a page demonstrating a multilevel bootstrap, where I use a two stage sampler, (re)sampling at each level. In your case, could be first draw subjects, then draw observations within subjects. A strata only option

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Andrew Robinson
Josh's comment prompted me to check mty go-to reference. Davison and Hinckley (1997 Section 3.8) recommend sampling the Subjects, but not within the Subjects. Cheers Andrew On Thu, Jul 04, 2013 at 05:53:58PM -0700, Joshua Wiley wrote: Hi, It is not the easiest to follow code, but when I was