27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REGRESSION 1361<br />

• ORIGIN and NOORIGIN affect the way the correlation matrix is built. If matrix materials<br />

are used as input to REGRESSION, the keyword that was in effect when the matrix was<br />

written should be in effect when that matrix is read.<br />

Example<br />

REGRESSION VAR=(COL)<br />

/ORIGIN<br />

/DEP=HOMICIDE<br />

/METHOD=ENTER POVPCT.<br />

• The REGRESSION command requests an equation that regresses HOMICIDE on POVPCT<br />

and suppresses the constant (ORIGIN).<br />

REGWGT Subcommand<br />

The only specification on REGWGT is the name of the variable containing the weights to be<br />

used in estimating a weighted least-squares model. With REGWGT the default display is the<br />

usual REGRESSION display.<br />

• REGWGT is a global subcommand.<br />

• If more than one REGWGT subcommand is specified on a REGRESSION procedure, only<br />

the last one is in effect.<br />

• REGWGT can be used with MATRIX OUT but not with MATRIX IN.<br />

• Residuals saved from equations using the REGWGT command are not weighted. To obtain<br />

weighted residuals, multiply the residuals created with SAVE by the square root of the<br />

weighting variable in a COMPUTE statement.<br />

• REGWGT is in effect for all equations and affects the way the correlation matrix is built.<br />

Thus, if REGWGT is specified on a REGRESSION procedure that writes matrix materials<br />

to a matrix data file, subsequent REGRESSION procedures using that file will be automatically<br />

weighted.<br />

Example<br />

REGRESSION VARIABLES=GRADE GPA STARTLEV TREATMNT<br />

/DEPENDENT=GRADE<br />

/METHOD=ENTER<br />

/SAVE PRED(P).<br />

COMPUTE WEIGHT=1/(P*(1-P)).<br />

REGRESSION VAR=GRADE GPA STARTLEV TREATMNT<br />

/REGWGT=WEIGHT<br />

/DEP=GRADE<br />

/METHOD=ENTER.<br />

• VARIABLES builds a correlation matrix that includes GRADE, GPA, STARTLEV, and<br />

TREATMNT.<br />

• DEPENDENT identifies GRADE as the dependent variable.<br />

• METHOD regresses GRADE on GPA, STARTLEV, and TREATMNT.<br />

• SAVE saves the predicted values from the regression equation as variable P in the working<br />

data file (see the SAVE subcommand on p. 1374).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!