Ladies and Gentlemen:
Good evening.
I am trying to use a bootstrap technique to validate a multiple
regression model that I developed with a sample of 1,000 subjects. In
order to calculate "shrinkage" I would like to find r-squared between
the observed and predicted dependent measure with this bootstrap
technique. I believe the code (see below) will provide the
correlation values - which will get me close enough to what I am after.
I found the following syntax on the listserve's website - but after
hours of trying to figure it out - I am asking for your assistance.
Specifically, what in the code do I need to change so that it reads my
2 columns of data and performs the bootstrap technique?
I hope this is a simple request.
Kindest Regards,
Deydre Teyhen
Associate Professor
Army-Baylor University
*(Q) I would like to resample a bivariate population 1000 times, and for
each resample I would calculate the correlation between two variables.
I could then plot the sampling distribution.
* (A) Posted to SPSSX_L list on 2001/11/16 by Jelani Mandara.
DEFINE !sdist (samples=!TOKENS(1) /size=!TOKENS(1) /mean=!TOKENS(1)
/sd=!TOKENS(1)).
INPUT PROGRAM.
LOOP id = 1 TO !samples* !size.
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
RANK
VARIABLES = id
/NTILES(!size)
/PRINT = NO
/TIES = MEAN .
SORT CASES BY nid .
SPLIT FILE
LAYERED BY nid .
COMPUTE X = RV.NORMAL(!mean,!sd) .
COMPUTE Y = RV.NORMAL(!mean,!sd) .
DESCRIPTIVES
VARIABLES=x y /SAVE
/STATISTICS=MEAN.
COMPUTE ZxZy = zx * zy .
SPLIT FILE OFF.
AGGREGATE
/OUTFILE='C:\samplingdistribution.SAV'
/BREAK=nid
/zxzy = SUM(zxzy)
/N_BREAK=N.
GET
FILE='C:\samplingdistribution.SAV'.
COMPUTE corr = zxzy / n_break .
FREQUENCIES
VARIABLES=corr /FORMAT=NOTABLE
/STATISTICS=STDDEV VARIANCE MINIMUM MAXIMUM SEMEAN MEAN MEDIAN
/HISTOGRAM NORMAL
/ORDER ANALYSIS .
!ENDDEFINE.
!sdist samples=100 size=100 mean =100 sd =15.
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD