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.

Operations<br />

NLR 1047<br />

• By default, the predicted values, residuals, and derivatives are created as temporary variables.<br />

To save these variables, use the SAVE subcommand.<br />

Weighting Cases<br />

• If case weighting is in effect, [C]NLR uses case weights when calculating the residual sum<br />

of squares and derivatives. However, the degrees of freedom in the ANOVA table are<br />

always based on unweighted cases.<br />

• When the model program is first invoked for each case, the weight variable’s value is set<br />

equal to its value in the working data file. The model program may recalculate that value.<br />

For example, to effect a robust estimation, the model program may recalculate the weight<br />

variable’s value as an inverse function of the residual magnitude. [C]NLR uses the weight<br />

variable’s value after the model program is executed.<br />

Missing Values<br />

Example<br />

Cases with missing values for any of the dependent or independent variables named on the<br />

[C]NLR command are excluded.<br />

• Predicted values, but not residuals, can be calculated for cases with missing values on the<br />

dependent variable.<br />

• [C]NLR ignores cases that have missing, negative, or zero weights. The procedure displays<br />

a warning message if it encounters any negative or zero weights at any time during its<br />

execution.<br />

• If a variable used in the model program or the derivatives program is omitted from the<br />

independent variable list on the [C]NLR command, the predicted value and some or all of<br />

the derivatives may be missing for every case. If this happens, SPSS generates an error<br />

message.<br />

MODEL PROGRAM A=.5 B=1.6.<br />

COMPUTE PRED=A*SPEED**B.<br />

DERIVATIVES.<br />

COMPUTE D.A=SPEED**B.<br />

COMPUTE D.B=A*LN(SPEED)*SPEED**B.<br />

NLR STOP.<br />

• MODEL PROGRAM assigns values to the model parameters A and B.<br />

• COMPUTE generates the variable PRED to define the nonlinear model using parameters A<br />

and B and the variable SPEED from the working data file. Because this variable is named<br />

PRED, the PRED subcommand is not required on NLR.<br />

• DERIVATIVES indicates that calculations for derivatives are being supplied.

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

Saved successfully!

Ooh no, something went wrong!