LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2010)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 21 Sep 2010 01:10:09 -0400
Reply-To:     Dave Allsop <d.allsop@UNSW.EDU.AU>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Dave Allsop <d.allsop@UNSW.EDU.AU>
Subject:      Looping macro for GENLIN call

Hi,

I am trying to set up an automated loop to run a GEE analysis on my data. I have 32 dependent variables (columns), and a bunch of independent predictor variables, and about 800 rows (data or cases) - and I need to do a separate GEE analysis for each of the 32 dependent variables..

Here is my attempt at the code so far (I know I am probably a long way off still - but I am new to SPSS syntax... thanks in advance if abnybody can put me on the right track..

define !myloop ()

!do !index = 1 !to 32 !let !var = !index

DATASET ACTIVATE DataSet1. VECTOR dependents = Ifeltworried to Ifounditeasytoconcentrate. *LOOP #index = 1:32

* Generalized Estimating Equations. GENLIN dependents(!var) (ORDER=ASCENDING) BY BL_vs_Day_markers gender Relapsers (ORDER=DESCENDING) WITH SDSScore age age_first_can_use mean_weekly_can_use Av_alc_units_per_week Av_ciggs_per_week /MODEL BL_vs_Day_markers SDSScore gender Relapsers age age_first_can_use Av_alc_units_per_week DISTRIBUTION=MULTINOMIAL LINK=CUMPROBIT /CRITERIA METHOD=FISHER(1) SCALE=1 MAXITERATIONS=100 MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012 ANALYSISTYPE=3(WALD) CILEVEL=95 LIKELIHOOD=FULL /REPEATED SUBJECT=person_code WITHINSUBJECT=DayMarker SORT=YES CORRTYPE=AR(1) ADJUSTCORR=YES COVB=ROBUST MAXITERATIONS=100 PCONVERGE=1e-006(ABSOLUTE) UPDATECORR=1 /MISSING CLASSMISSING=EXCLUDE /PRINT CPS DESCRIPTIVES MODELINFO SUMMARY SOLUTION.

*END LOOP

!doend !enddefine

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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


Back to: Top of message | Previous page | Main SPSSX-L page