# Creating DW P-Value for nonlinear regression

I'm attempting to follow the instructions on page 245 of the SHAZAM User's Reference Manual (version 8.0) to calculate a p-value for the Durbin-Watson statistic for a nonlinear regression. I have a system of 4 equations.

my code for the pvalue generation:

*generate a linear pseudomodel for each equation & compute D-W p-value <br>
MATRIX YBAR1=drProfit-YHAT1+O*X
SAMPLE 3 41
OLS YBAR1 O / NOCONSTANT DWPVALUE


But i get this warning (not the missing value one, the 'variable is a constant' one):

|_*generate a linear pseudomodel for each equation & compute D-W p-value
|_MATRIX YBAR1=drProfit-YHAT1+O*X
...WARNING..MISSING VALUE CODE=-99999. WAS FOUND AND USED IN THIS CALCULATION
|_SAMPLE 3 41

|_OLS YBAR1 O / NOCONSTANT DWPVALUE

REQUIRED MEMORY IS PAR=      62 CURRENT PAR=   22480
OLS ESTIMATION
39 OBSERVATIONS     DEPENDENT VARIABLE= YBAR1
...NOTE..SAMPLE RANGE SET TO:      3,     41
...WARNING..VARIABLE O        IS A CONSTANT

DURBIN-WATSON STATISTIC  =   1.73518
DURBIN-WATSON POSITIVE AUTOCORRELATION TEST P-VALUE =    0.122293
NEGATIVE AUTOCORRELATION TEST P-VALUE =    0.877707


does anyone know if that warning is an automatic one that is generated when 'noconstant' is used in OLS, or if it's something more? any tips greatly appreciated, especially any about using this DWPVALUE method for nonlinear regressions.

edit retag close merge delete

Sort by » oldest newest most voted

The warning related to O indicates that something has gone wrong in the generation of O. Suggest you print it out and take a look at the content. It would be helpful to see what is printed.

With regard to the other warning (that SHAZAM found a missing value in the data), either skip the missing value using the command SET SKIPMISS or take an alternative action such as those described in Cohen and Cohen (1983) or Baraldi and Enders (2010).

more

the missing value should be taken care of with the command SAMPLE 3 41. the warning I don't understand is the second one: WARNING...VARIABLE O IS A CONSTANT O is the matrix identified in the NL options as the ZMATRIX (ZMATRIX=O) In the sample code in the manual, no further adjustments to this matrix were required to perform the linear pseudo model. I hope that makes sense...

Can you post the entire command file and the data please so we can investigate.

figured it out! the problem was with the ZMATRIX. the command can only be used with one equation nonlinear estimation, not multi-equation. just for anyone's future reference...

more