** Some macros definining a number of commonly used regression type * SPSS models. *****************************************************. *****************************************. * 1) Linear Multiple regression :. define regres1 (dep=!tokens(1) /expl=!enclose('{','}')) . descriptives var=!dep !expl. correlate var=!dep !expl. regression / statistics coeff outs r anova collin tol /criteria = pin(0.05) pout(0.10) /noorigin /dependent=!dep /method=enter !expl /residuals durbin histogram(zresid) /casewise plot(zresid) outliers(3) /scatterplot (!dep *pred) (*zresid *zpred) . !enddefine. ******************************************. * 2) Ordered conditional logit (plum logit). define regres2 (dep=!tokens(1) /expl=!enclose('{','}')) . fre var=!dep. descriptives var=!dep !expl. correlate var=!dep !expl. plum !dep with !expl /criteria = cin(95) delta(0) mxiter(100) mxstep(5) lconverge(0) pconverge(1.0E-6) singular(1.0E-8) /link = logit /print = fit parameter summary . !enddefine. ***********************************************************. * 3) Logistic regression . define regres3 (dep=!tokens(1) /expl=!enclose('{','}')) . fre var=!dep. descriptives var=!dep !expl. correlate var=!dep !expl. logistic regression var= !dep /method=enter !expl /criteria pin(.05) pout(.10) iterate (20) cut (.5). !enddefine. *********************************************************. * 4) Multinomial logit regression :. define regres4 (dep=!tokens(1) /expl=!enclose('{','}')) . fre var=!dep. descriptives var=!dep !expl. correlate var=!dep !expl. nomreg !dep with !expl /criteria = cin(95) delta(0) mxiter(100) mxstep(5) lconverge(0) pconverge(1.0E-6) singular(1.0E-8) /model /intercept = include /print= parameter summary lrt. !enddefine. **************************************************************. * 5) 2-level Variance components, predicts dep with expl given clust. define regres5 (dep=!tokens(1) /expl=!enclose('{','}') /clust=!tokens(1)) . descriptives var=!clust !dep !expl. correlate var=!dep !expl. means tables=!dep by !clust. mixed !dep with !expl /criteria=cin(95) mxiter(100) mxstep(5) scoring(1) singular(0.000000000001) hconverge(0,absolute) lconverge(0,absolute) pconverge(0.000001, absolute) /fixed=!expl | sstype(3) /method=reml /print=corb solution r /random=intercept | subject(!clust) covtype(ID) . !enddefine. ******************************************************.