我为 OLS 编写了以下 SPSS 语法。对我来说,这很容易阅读。不同的变量被分组在一行中,并且注释描述了它们是什么:
/* model (3d) hbs returns IV, lag DV, IV lag 1 and 2
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT retExc0
/METHOD=ENTER
hbsVol0LN hbsBullQuality0 hbsAgreeQuality0 wiki0LN svi0 /* independent
retExc1 retExc2 /* lag dependent
hbsVol1LN hbsBullQuality1 hbsAgreeQuality1 Wiki1LN svi1 /* lag 1 independent
hbsVol2LN hbsBullQuality2 hbsAgreeQuality2 Wiki2LN svi2 /* lag 2 independent
secEnergy secMat secIndus secConsS secHealth secFin secIT secTelco secUtil /* control
dayMon dayTue dayWed dayFri /* control
news
marketRet0
day01 day02 day03 day04 day05 day06 day07 day08 day09 day10 day11 day12 day13 day14 day15 day16 day17 day18 day19 day20 day21 day22 day23 day24 day25 day26 day27 day28 day29 day30 day31
/RESIDUALS DURBIN.
然而,语法解释器不接受这一点,它期望所有变量都直接在回归之后/MEHOD
:
/* model (3d) hbs returns IV, lag DV, IV lag 1 and 2
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT retExc0
/METHOD=ENTER hbsVol0LN hbsBullQuality0 hbsAgreeQuality0 wiki0LN svi0 retExc1 retExc2 hbsVol1LN hbsBullQuality1 hbsAgreeQuality1 Wiki1LN svi1 hbsVol2LN hbsBullQuality2 hbsAgreeQuality2 Wiki2LN svi2 secEnergy secMat secIndus secConsS secHealth secFin secIT secTelco secUtil dayMon dayTue dayWed dayFri news marketRet0 day01 day02 day03 day04 day05 day06 day07 day08 day09 day10 day11 day12 day13 day14 day15 day16 day17 day18 day19 day20 day21 day22 day23 day24 day25 day26 day27 day28 day29 day30 day31
/RESIDUALS DURBIN.
然而,这看起来并不容易维护。如何连接变量行,以便解释器接受我的原始输入,例如:
/* model (3d) hbs returns IV, lag DV, IV lag 1 and 2
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT retExc0
/METHOD=ENTER ;
hbsVol0LN hbsBullQuality0 hbsAgreeQuality0 wiki0LN svi0 ;
retExc1 retExc2 ;
hbsVol1LN hbsBullQuality1 hbsAgreeQuality1 Wiki1LN svi1 ;
hbsVol2LN hbsBullQuality2 hbsAgreeQuality2 Wiki2LN svi2 ;
secEnergy secMat secIndus secConsS secHealth secFin secIT secTelco secUtil ;
dayMon dayTue dayWed dayFri ;
news ;
marketRet0 ;
day01 day02 day03 day04 day05 day06 day07 day08 day09 day10 day11 day12 day13 day14 day15 day16 day17 day18 day19 day20 day21 day22 day23 day24 day25 day26 day27 day28 day29 day30 day31
/RESIDUALS DURBIN.
这样的事情可能吗?如果可以,怎么办?