s-news
[Top] [All Lists]

Re: Regression: resampling cases or residuals

To: "Shuxia Yu" <ysxzh@163.com>
Subject: Re: Regression: resampling cases or residuals
From: Tim Hesterberg <timh@insightful.com>
Date: 19 Dec 2004 09:57:01 -0800
Cc: "s-news" <s-news@lists.biostat.wustl.edu>
In-reply-to: <41C538C4.000021.11549@m165.163.com> (ysxzh@163.com)
References: <41C538C4.000021.11549@m165.163.com>
>Dear all,
>
>In the material I found, the emphasis is put on the resampling
>residuals. I can not find a example to do resampling cases using
>package bootstrap or boot.

The resample library (see bottom for download info) supports
resampling residuals for a linear regression model.  From the help
file for `bootstrap.lm':

lmsampler 
character string: "observations" or "residuals" (may be
abbreviated). When bootstrapping observations, the data from the data
argument to the call generating the lm object are resampled. When
bootstrapping residuals, the (unadjusted) residuals and predicted
values for the fit of the original data are computed. The residuals
are then resampled and the statistic is evaluated on the fit with
response variable replaced by the original predicted values plus the
resampled residuals. (See Examples below.)


The Windows menu interface for bootstrapping linear regression
also lets you select this option.

>By the way, in a article it was mentioned to use Monte Carlo
>simulation to simulate a linear regression model. Is Monte Carlo
>simulation also used as a resampling technique?

The bootstrap is almost always implemented using Monte Carlo simulation --
drawing samples from the empirical distribution.  In very small samples
you can instead do a deterministic calculation, using all possible bootstrap
samples.

>Would you like to give me a help? Any suggestions will be really appreciated.
>
>Best wishes,
>
>Jinsong

Hope this helps,
Tim Hesterberg

========================================================
| Tim Hesterberg       Research Scientist              |
| timh@insightful.com  Insightful Corp.                |
| (206)283-8691        1700 Westlake Ave. N, Suite 500 |
| (206)802-2500 (fax)  Seattle, WA 98109-3044, 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>