masthead
 
 

Internet Resources and SPSS Syntax by Chapter

Chapter 2

Determines maximum sample size using GPower software. This free software is available from http://www.psycho.uni-duesseldorf.de/aap/projects/gpower.

Creates data sets: DataSim, which is available from http://www.people.cornell.edu/pages/mcs5/
Other%20Materials/DataSim.zip


Chapter 3

Free software to perform a limited range of randomization tests: http://www.uvm.edu/~dhowell/StatPages/Resampling/
Resampling.html

Free software to perform MI

NORM, which is available as a standalone or an S-Plus version. Version 2.03 of NORM can be downloaded from http://www.stat.psu.edu/~jls/norm203.exe

Amelia II, which imputes missing data in cross-sectional and time series data sets. The downloaded file includes a Windows version (no knowledge of R required), and a version that works with R either from the command line or via a GUI. This software can be downloaded from http://gking.harvard.edu/amelia

Commercial software for MI:

SAS's PROC MI and PROC MIANALYZE (http://www.sas.com/)

SOLAS (http://www.statsol.ie/html/solas/solas_home.html)

Free Stata module MEANSCORE. This Stata module can be downloaded from http://www.meb.ki.se/~marrei/software/


Chapter 4

Calculator that tests the difference between two rates:
http://faculty.vassar.edu/lowry/polls/calcs.html#ca3


Chapter 5

The following syntax was developed and tested by the author with SPSS 16 and the add-on module "Regression Models," which is necessary to conduct a binary logistical regression analysis:

DEFINE !pathd() 'c: \temp\' !ENDDEFINE.
GET FILE= !pathd + "ps_example.sav".
LOGISTIC REGRESSION VAR=treatm
 /METHOD=ENTER sex age outcome ses
 /CONTRAST (sex) =Indicator
 /SAVE PRED
 /CRITERIA PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
RENAME VARIABLES (PRE_1=propen).
FREQUENCIES
VARIABLES=treatm
/ORDER=ANALYSIS .
SAVE OUTFILE=!pathd + "ps_example.sav".

The aforementioned syntax calculates a propensity score for each case in a file named ps_example.sav and names it propen.

The syntax described below matches cases based on propensity scores in the file named ps_example.sav and saves these results to a file named mydata and results.sav:

DEFINE !pathd() 'c: \temp\' !ENDDEFINE.
GET FILE= !pathd + "ps_example.sav".
COMPUTE x = RV.UNIFORM(1,1000000) .
SORT CASES BY treatm(D) propen x.
COMPUTE idx=$CASENUM.
SAVE OUTFILE= !pathd + "mydata.sav".
ERASE FILE=!pathd + "results.sav".
COMPUTE key=1.
SELECT IF (1=0).
SAVE OUTFILE=!pathd + "results.sav".
exec.
SET MPRINT=no.
DEFINE !match (nbtreat= !TOKENS(1))
!DO !cnt=1 !TO !nbtreat
GET FILE=!pathd + "mydata.sav".
SELECT IF idx= !cnt OR treatm=0.
DO IF $CASENUM=1.
COMPUTE #target=propen.
ELSE.
COMPUTE delta=propen-#target.
END IF.
EXECUTE.
SELECT IF ~MISSING(delta).
IF (delta<0) delta=-delta.
SORT CASES BY delta.
SELECT IF $CASENUM=1.
COMPUTE key= !cnt .
SAVE OUTFILE= !pathd + "used.sav".
ADD FILES FILE= *
/FILE= !pathd + "results.sav".
SAVE OUTFILE= !pathd + "results.sav".
GET FILE= !pathd + "mydata.sav".
SORT CASES BY idx .
MATCH FILES
 /FILE=*
 /IN=mydata
 /FILE= !pathd + "used.sav"
 /IN=used
/BY idx .
SELECT IF (used = 0).
SAVE OUTFILE= !pathd + "mydata.sav"
/ DROP = used mydata key delta.
EXECUTE.
!DOEND
!ENDDEFINE.
SET MPRINT=yes.
!match nbtreat=30.
GET FILE= !pathd + "results.sav".
SORT CASES BY key.
SAVE OUTFILE= !pathd + "results.sav".
GET FILE=!pathd + "mydata.sav".
MATCH FILES /FILE=*
 /FILE=!pathd + "results.sav"
 /RENAME (idx = d0) (id=id2) (propen=propen2)
 (treatm=treatm2) (key=idx)
 /BY idx
 /DROP= d0.
FORMATS delta propen propen2 (F10.8).
SAVE OUTFILE= !pathd + "mydata and results.sav".
EXECUTE.

Resources for using SPSS to perform propensity score matching are available at:
http://www.unc.edu/~painter/SPSSsyntax/propen.txt

Resources for using Stata to perform propensity score matching are available at:
http://ideas.repec.org/c/boc/bocode/s432001.html

Resources for using SAS to perform propensity score matching are available at:
http://www.lexjansen.com/wuss/2007/AnalyticsStatistics/
ANL_Leslie_UseOfPropensity.pdf


Website Terms and Conditions and Privacy Policy
Please send comments or suggestions about this Website to custserv.us@oup.com        
cover