Date: Thu, 1 Oct 2009 05:40:40 -0700
Reply-To: Bruce Weaver <bruce.weaver@hotmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Bruce Weaver <bruce.weaver@hotmail.com>
Subject: Re: Help with programming in SPSS
In-Reply-To: <200909301900.n8UFV12n004497@malibu.cc.uga.edu>
Content-Type: text/plain; charset=UTF-8
Ray Haraf wrote:
>
> Hi there!
> I am wondering if this is feasible. I have eight dependent nominal
> variables dv1, dv2, â¦, dv8 and twelve nominal and ordinal independent
> variables iv1, iv2, â¦, iv12. I run eight (8) different multinomial
> logistic regressions. My work is done.
>
> However, I would like to be able to write Syntax to execute the 8
> regressions. I would like to have something like
>
> For n =1 to 8
> Do
> NOMREG dvn (BASE=LAST ORDER=ASCENDING) BY iv1 TO iv12
> /CRITERIA CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20) LCONVERGE(0)
> PCONVERGE(0.000001) SINGULAR(0.00000001)
> /MODEL
> /STEPWISE=PIN(.05) POUT(0.1) MINEFFECT(0) RULE(SINGLE) ENTRYMETHOD(LR)
> REMOVALMETHOD(LR)
> /INTERCEPT=INCLUDE
> /PRINT=PARAMETER SUMMARY LRT CPS STEP MFI.
>
> Would this be possible? If yes, please help.
>
> Thanks,
> Ray
>
Hi Ray. Something like the following should work.
* Macro to loop through a list of outcome variables,
* running NOMREG (with the same explanatory variables)
* for each Y.
DEFINE MyNOMREG (YLIST !CMDEND) .
!do !Y !in(!YLIST)
NOMREG !Y (BASE=LAST ORDER=ASCENDING) BY iv1 TO iv12
/CRITERIA CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20) LCONVERGE(0)
PCONVERGE(0.000001) SINGULAR(0.00000001)
/MODEL
/STEPWISE=PIN(.05) POUT(0.1) MINEFFECT(0) RULE(SINGLE) ENTRYMETHOD(LR)
REMOVALMETHOD(LR)
/INTERCEPT=INCLUDE
/PRINT=PARAMETER SUMMARY LRT CPS STEP MFI.
!doend
!ENDDEFINE.
* Call the macro .
MyNOMREG ylist = y1 y2 y3 y4 y5 y6 y7 y8 .
-----
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."
NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context: http://www.nabble.com/Help-with-programming-in-SPSS-tp25686944p25696850.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
=====================
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