m***@gmail.com
2019-07-16 11:05:33 UTC
So i am working on my master thesis and i need to do a regression analysis. I have used SPSS but i am a newbie when it comes to the syntax part. Basically i have to loop a 100 dependent variables with a independent variable. After a quick search over here i found a previous thread about creating a macro and running the regression syntax and the funny thing is it did work yesterday but today running the same syntax i can't evoke the macro and it's returning an error.
I get two errors. One is that the !MyReg isn't recognized by SPSS and the second, it breaks at a certain point when going through the variable.
This is the code. It'd be really helpful if someone could point out what i am doing wrong.
Thanks in advance!
DATASET ACTIVATE DataSet1.
DEFINE !MyReg (Ylist = !CMDEND)
!DO !Y !IN(!Ylist)
REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N
/MISSING LISTWISE
/STATISTICS COEFF OUTS CI(95) BCOV R ANOVA CHANGE
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT !Y
/METHOD=ENTER RP.
!DOEND
!ENDDEFINE
!MyReg Ylist = VAR00002 VAR00003 VAR00004 VAR00005 VAR00006 VAR00007 VAR00008 VAR00009 VAR00010 VAR00011 VAR00012 VAR00013 VAR00014
VAR00015 VAR00016 VAR00017 VAR00018 VAR00019 VAR00020 VAR00021 VAR00022 VAR00023 VAR00024 VAR00025 VAR00026 VAR00027 VAR00028
VAR00029 VAR00030 VAR00031 VAR00032 VAR00033 VAR00034 VAR00035 VAR00036 VAR00037 VAR00038 VAR00039 VAR00040 VAR00041 VAR00042
VAR00043 VAR00044 VAR00045 VAR00046 VAR00047 VAR00048 VAR00049 VAR00050 VAR00051 VAR00052 VAR00053 VAR00054 VAR00055 VAR00056
VAR00057 VAR00058 VAR00059 VAR00060 VAR00061 VAR00062 VAR00063 VAR00064 VAR00065 VAR00066 VAR00067 VAR00068 VAR00069 VAR00070
VAR00071 VAR00072 VAR00073 VAR00074 VAR00075 VAR00076 VAR00077 VAR00078 VAR00079 VAR00080 VAR00081 VAR00082 VAR00083 VAR00084
VAR00085 VAR00086 VAR00087 VAR00088 VAR00089 VAR00090 VAR00091 VAR00092 VAR00093 VAR00094 VAR00095 VAR00096 VAR00097 VAR00098
VAR00099 VAR00100 VAR00101
I get two errors. One is that the !MyReg isn't recognized by SPSS and the second, it breaks at a certain point when going through the variable.
This is the code. It'd be really helpful if someone could point out what i am doing wrong.
Thanks in advance!
DATASET ACTIVATE DataSet1.
DEFINE !MyReg (Ylist = !CMDEND)
!DO !Y !IN(!Ylist)
REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N
/MISSING LISTWISE
/STATISTICS COEFF OUTS CI(95) BCOV R ANOVA CHANGE
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT !Y
/METHOD=ENTER RP.
!DOEND
!ENDDEFINE
!MyReg Ylist = VAR00002 VAR00003 VAR00004 VAR00005 VAR00006 VAR00007 VAR00008 VAR00009 VAR00010 VAR00011 VAR00012 VAR00013 VAR00014
VAR00015 VAR00016 VAR00017 VAR00018 VAR00019 VAR00020 VAR00021 VAR00022 VAR00023 VAR00024 VAR00025 VAR00026 VAR00027 VAR00028
VAR00029 VAR00030 VAR00031 VAR00032 VAR00033 VAR00034 VAR00035 VAR00036 VAR00037 VAR00038 VAR00039 VAR00040 VAR00041 VAR00042
VAR00043 VAR00044 VAR00045 VAR00046 VAR00047 VAR00048 VAR00049 VAR00050 VAR00051 VAR00052 VAR00053 VAR00054 VAR00055 VAR00056
VAR00057 VAR00058 VAR00059 VAR00060 VAR00061 VAR00062 VAR00063 VAR00064 VAR00065 VAR00066 VAR00067 VAR00068 VAR00069 VAR00070
VAR00071 VAR00072 VAR00073 VAR00074 VAR00075 VAR00076 VAR00077 VAR00078 VAR00079 VAR00080 VAR00081 VAR00082 VAR00083 VAR00084
VAR00085 VAR00086 VAR00087 VAR00088 VAR00089 VAR00090 VAR00091 VAR00092 VAR00093 VAR00094 VAR00095 VAR00096 VAR00097 VAR00098
VAR00099 VAR00100 VAR00101