Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bootstrapping algorhitm for SPSS/Windows??? HELP!!

48 views
Skip to first unread message

David Nichols

unread,
Jul 19, 1996, 3:00:00 AM7/19/96
to

In article <4sogtj$3...@news.iastate.edu>,
William F. Panak <wpa...@iastate.edu> wrote:
>I'm interested in using bootstrap estimates of standard errors in a LISREL
>model that I am testing. From what I understand, developing bootstrap
>estimates requires creating multiple samples from one's original data set
>using a "sampling *with* replacement" procedure. I can create a series of:
>
>get file...
>set seed=...
>sample 1 from N
>save outfile=...
>
>get file...
>set seed=(new)...
>sample 1 from N
>add files file=.../file=*
>save outfile=...
>
>
>I think you see the problem...even for a small (n = 191) data set, this will
>require 191 loops of this code for each bootstrap sample, and I need about 200
>such samples.
>
>Does anyone know of a simpler way to do this? Thanx.
>
>wpa...@iastate.edu
>

Here's some syntax to create bootstrapped samples, written by my colleague
David Marso:

COMPUTE ID=$CASENUM .
SAVE OUTFILE 'BOOTDATA.SAV'.
INPUT PROGRAM .
LOOP SAMP=1 to nsamples.
LOOP V = 1 to ncases.
COMPUTE ID=TRUNC(UNIFORM(ncases)) + 1.
END CASE.
LEAVE SAMP.
END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM .
SORT CASES BY ID .
MATCH FILES / FILE * / TABLE 'BOOTDATA.SAV' / BY ID .
SORT CASES BY SAMP.
SPLIT FILE BY SAMP.

You have to replace nsamples and ncases by the appropriate numbers, and
change the ID and BOOTDATA.SAV names if necessary. This resuls in one
big file, with SPLIT FILE ON, ready to execute another SPSS command on
each sample.

--
-----------------------------------------------------------------------------
David Nichols Senior Support Statistician SPSS, Inc.
Phone: (312) 329-3684 Internet: nic...@spss.com Fax: (312) 329-3668
-----------------------------------------------------------------------------

James H. Steiger

unread,
Jul 19, 1996, 3:00:00 AM7/19/96
to

wpa...@iastate.edu (William F. Panak) wrote:

>I'm interested in using bootstrap estimates of standard errors in a LISREL
>model that I am testing. From what I understand, developing bootstrap
>estimates requires creating multiple samples from one's original data set
>using a "sampling *with* replacement" procedure. I can create a series of:
>
>get file...
>set seed=...
>sample 1 from N
>save outfile=...
>
>get file...
>set seed=(new)...
>sample 1 from N
>add files file=.../file=*
>save outfile=...
>
>
>I think you see the problem...even for a small (n = 191) data set, this will
>require 191 loops of this code for each bootstrap sample, and I need about 200
>such samples.
>
>Does anyone know of a simpler way to do this? Thanx.
>
>wpa...@iastate.edu
>

Two suggestions.

1. If you are determined to use LISREL, make sure you have the latest
version, as I believe it is 8.1x now, and SPSS was
distributing version 7 but have decided to stop distributing LISREL.

2. Other programs, like my own SEPATH (part of Statistica/W) perform
bootstrapping. SEPATH does it with a couple of mouse clicks, and
automatically store the results in a data file where they can be
analyzed later. SEPATH is the structural equation model that comes as
part of Statistica.

For details, check http://www.statsoftinc.com

Professor James H. Steiger Department of Psychology
(ste...@unixg.ubc.ca) 2136 West Mall
Office: 604-822-2706 University of British Columbia
Fax: 604-822-6923 Vancouver, B.C., Canada V6T 1Z4

James H. Steiger

unread,
Jul 19, 1996, 3:00:00 AM7/19/96
to

wpa...@iastate.edu (William F. Panak) wrote:

>I'm interested in using bootstrap estimates of standard errors in a LISREL
>model that I am testing. From what I understand, developing bootstrap
>estimates requires creating multiple samples from one's original data set
>using a "sampling *with* replacement" procedure. I can create a series of:
>
>get file...
>set seed=...
>sample 1 from N
>save outfile=...
>
>get file...
>set seed=(new)...
>sample 1 from N
>add files file=.../file=*
>save outfile=...
>
>
>I think you see the problem...even for a small (n = 191) data set, this will
>require 191 loops of this code for each bootstrap sample, and I need about 200
>such samples.
>
>Does anyone know of a simpler way to do this? Thanx.
>
>wpa...@iastate.edu
>

Perhaps I should add a bit more clarification.

With a couple of mouse clicks, SEPATH will set up
the bootstrap job.

Then, it will automatically

a. generate the bootstrapped samples
b. perform the structural modeling analysis for all samples
c. save all key results (parameter estimates, standard errors, test
statistic, etc.) to a file that can be analyzed directly by Statistica
d. at the conclusion, you can regenerate the bootstrap sample from
any analysis by a click of the mouse button. This bootstrapped sample
can be saved directly to a data file.

This can be particularly useful if your program fails to converge
on a certain bootstrapped subsample, and you want to quickly analyze
that sample in more detail.

With SEPATH, you can retrieve the sample and analyze it directly
without ever leaving the program, in (literally) seconds.


This represents a level of convenience that is (at least) an
order of magnitude greater than simply being able to generate
bootstrap subsamples, without having an effective interface
for connecting with the structural modeling program.

SEPATH does all the interfacing automatically.

SEPATH is part of Statistica for Windows (see

http://www.statsoftinc.com

for further details.

William F. Panak

unread,
Jul 19, 1996, 3:00:00 AM7/19/96
to
0 new messages