s-news
[Top] [All Lists]

Re: accelerated bootstrapped CIs

To: "Heymans, MW" <mw.heymans@vumc.nl>
Subject: Re: accelerated bootstrapped CIs
From: Tim Hesterberg <timh@insightful.com>
Date: 11 Jul 2005 18:14:06 -0700
Cc: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
In-reply-to: <05Jul11.092648cest.334138@nucleus.azvu.nl> (mw.heymans@vumc.nl)
References: <05Jul11.092648cest.334138@nucleus.azvu.nl>
Reply-to: timh@insightful.com (Tim Hesterberg)
If you want to do BCa intervals in a stratified or two-sample problem
you should use library(resample) (see bottom for download info).

The basic syntax would be either:
        myboot <- bootstrap2(new.xy, mean, treatment = which.xy)
or
        myboot <- bootstrap2(martinjn$ka, mean, data2 = martinjn$kb)

Then one of:
        limits.bca(myboot, acceleration = 0)
        limits.bca(myboot)


>Hello,
>
>I use the code beneath to estimate the bootstrapped difference of means:
>new.xy <- c(martijn$ka, martijn$kb)
>which.xy <- rep(1:2, c( length(martijn$ka), length(martijn$kb) ) )
>
>myboot <- bootstrap(new.xy, mean(new.xy[which.xy==1]) -
>mean(new.xy[which.xy==2]), group=which.xy, assign.frame1=F, 1000)
>myboot
>
>Furthermore, when I want to calculate the bias-corrected accelerated CI with
>limits.bca and set accelerator on NULL the follow error message is
>presented:
>Problem in jackstats(reps, observed, n.groups, func..: NA's encountered in
>replicates.  Replicates stored as .bootstrap.replicates. 
>Use traceback() to see the call stack
>Problem: internal error: trying to set internal exit action in frame 1, must
>be between 1 and 0 
>Use traceback() to see the call stack
>
>However, when I set accelerator on 0, everything looks OK, i.e. the function
>runs normally but it will only produce bias-corrected CI's. How can I solve
>the problem and calculate bias-corrected accelerated CIs also?  
> 
>
>Thanks in advance,
>
>Martijn W Heymans, PhD, PT
>VU University Medical Center
> Amsterdam
>The Netherlands
>M: mw.heymans@vumc.nl

========================================================
| Tim Hesterberg       Research Scientist              |
| timh@insightful.com  Insightful Corp.                |
| (206)802-2319        1700 Westlake Ave. N, Suite 500 |
| (206)283-8691 (fax)  Seattle, WA 98109-3012, U.S.A.  |
|                      www.insightful.com/Hesterberg   |
========================================================
Download the S+Resample library from www.insightful.com/downloads/libraries


<Prev in Thread] Current Thread [Next in Thread>