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.

Example<br />

MODEL PROGRAM A=1 B=1.<br />

COMPUTE PRED=EXP(A+B*T)/(1+EXP(A+B*T)).<br />

COMPUTE LOSS=-W*(Y*LN(PRED)+(1-Y)*LN(1-PRED)).<br />

DERIVATIVES.<br />

COMPUTE D.A=PRED/(1+EXP(A+B*T)).<br />

COMPUTE D.B=T*PRED/(1+EXP(A+B*T)).<br />

COMPUTE D.A=(-W*(Y/PRED - (1-Y)/(1-PRED)) * D.A).<br />

COMPUTE D.B=(-W*(Y/PRED - (1-Y)/(1-PRED)) * D.B).<br />

NLR 1059<br />

CNLR Y /LOSS=LOSS.<br />

• The second COMPUTE command in the model program computes the loss functions and<br />

stores its values in the variable LOSS, which is then specified on the LOSS subcommand.<br />

• Because derivatives are supplied in the derivatives program, the derivatives of all parameters<br />

are computed with respect to the loss function, rather than the predicted value.<br />

BOOTSTRAP Subcommand<br />

BOOTSTRAP provides bootstrap estimates of the parameter standard errors, confidence intervals,<br />

and correlations. BOOTSTRAP can be used only with CNLR; it cannot be used with NLR.<br />

Bootstrapping is a way of estimating the standard error of a statistic, using repeated<br />

samples from the original data set. This is done by sampling with replacement to get samples<br />

of the same size as the original data set.<br />

• The minimum specification is the subcommand keyword. Optionally, specify the number<br />

of samples to use for generating bootstrap results.<br />

• By default, BOOTSTRAP generates bootstrap results based on 10*p*(p+1)/2 samples,<br />

where p is the number of parameters. That is, 10 samples are drawn for each statistic<br />

(standard error or correlation) to be calculated.<br />

• When BOOTSTRAP is used, the nonlinear equation is estimated for each sample. The standard<br />

error of each parameter estimate is then calculated as the standard deviation of the<br />

bootstrapped estimates. Parameter values from the original data are used as starting<br />

values for each bootstrap sample. Even so, bootstrapping is computationally expensive.<br />

• If the OUTFILE subcommand is specified, a case is written to the output file for each bootstrap<br />

sample. The first case in the file will be the actual parameter estimates, followed by<br />

the bootstrap samples. After the first case is eliminated (using SELECT IF), other SPSS<br />

procedures (such as FREQUENCIES) can be used to examine the bootstrap distribution.<br />

Example<br />

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

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

CNLR STOP /BOOTSTRAP /OUTFILE=PARAM.<br />

GET FILE=PARAM.<br />

LIST.<br />

COMPUTE ID=$CASENUM.<br />

SELECT IF (ID > 1).<br />

FREQUENCIES A B /FORMAT=NOTABLE /HISTOGRAM.

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

Saved successfully!

Ooh no, something went wrong!