# Revision history [back]

### 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
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+OX ...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.

 2 Highlighted the code and output and selected 'preformatted text' button SHAZAMHelp 417 ●12 ●16 ●27 http://econometrics.com/

### 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

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


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

|_generate

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

|_OLS YBAR1 O / NOCONSTANT DWPVALUE 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 CONSTANT

DURBIN-WATSON STATISTIC  =   1.73518
DURBIN-WATSON POSITIVE AUTOCORRELATION TEST P-VALUE =    0.122293
NEGATIVE AUTOCORRELATION TEST P-VALUE =    0.8777070.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.