Hi,
I am making an SPSS syntax that should take data written on an excel
file, then apply a multinomail logit model to this
data. This syntax should be repeated for 50
datasets(datas1,datas2,...........datas50).I want to get 2 outputs
1-the estimated parameters
2-the percentage of correct classification
But i want this output to be saved in excel files(not in the form of
tables as the SPSS output)
so that
output file "1" carries the parameters and % of correct
classification resulting from applying the multinomial logit to
datas1
output file "2" carries the parameters and % of correct
classification resulting from applying the multinomial logit to
datas2
output file "3" carries the parameters and % of correct
classification resulting from applying the multinomial logit to
datas3
and so on till datas50
First ,how could i run the multinomial logit through the syntax?
second,how could i run this 50 times?
third, how could i get the output as desired?
Would it be like this?if so, how to complete with this syntax?
*loading the excel file containing the data.
*****************************************************.
Define !Xel().
!do !i=3D1 !to 50.
GET DATA
/TYPE=3DXLS
/FILE=3D!Quote(!concat('E:\simulationexcel\', 'datas', !i, '.xls'))
/SHEET=3Dname 'Sheet1'
/CELLRANGE=3Dfull
/READNAMES=3Don
/ASSUMEDSTRWIDTH=3D32767.
*saving the file after droping unwanted columns, then loading the
new
file.
***************************************************************************=
=AD=AD
********.
SAVE OUTFILE=3D !quote(!concat('E:\work\', 'datas', !i, '.sav'))
/DROP=3DV1 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 /COMPRESSED.
GET
FILE=3D !quote(!concat('E:\work\', 'datas', !i, '.sav')).
DATASET NAME DataSet3 WINDOW=3DFRONT.
*computing MLE.
******************
NOMREG
V14 (BASE=3DLAST ORDER=3DASCENDING) WITH @[EMAIL PROTECTED]
@[EMAIL PROTECTED]
/CRITERIA CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20)
LCONVERGE(0) PCONVERGE(0.000001) SINGULAR(0.00000001)
/MODEL
/STEPWISE =3D PIN(.05) POUT(0.1) MINEFFECT(0) RULE(SINGLE)
ENTRYMETHOD(LR) REMOVALMETHOD(LR)
/INTERCEPT =3DINCLUDE
/PRINT =3D CLASSTABLE PARAMETER SUMMARY LRT CPS STEP MFI
/SAVE PREDCAT .
Waiting for your reply
Thanks inadvance


|