Hi,
I am running a non-linear regression on time series data, where I need to have an autocorrelation adjustment for the standard error because of serial correlation. The -nl- function of STATA seems to have a built in version of doing this with the option vce(hac kernel #), where kernel is the estimation type and kernel is the number of lags.
However, this vce option is giving me something called a "conformability error", and I'm not sure why or what that means. I've pasted an example output below. The first example with a two-parameter exponential function fitted to the data works just fine, but the three-parameter exponential function gives me this error. I've also included a version of the three-parameter exponential model without the vce(hac) option to show that the -nl- modeling does work fine otherwise.
Thanks!
Richard
. nl exp2: y x, vce(hac nw 1) nolog
(obs = 61)
Nonlinear regression Number of obs = 61
HAC kernel (lags): Newey-West (1) R-squared = 0.6764
Adj R-squared = 0.6654
Root MSE = .2889261
Res. dev. = 19.60367
2-parameter exp. growth curve, y = b1*b2^x
------------------------------------------------------------------------------
| HAC
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
/b1 | .3954239 .0694743 5.69 0.000 .2564062 .5344416
/b2 | 1.001218 .0041534 241.06 0.000 .9929073 1.009529
------------------------------------------------------------------------------
. nl exp3: y x, vce(robust) nolog
(obs = 61)
Nonlinear regression Number of obs = 61
R-squared = 0.0008
Adj R-squared = -0.0161
Root MSE = .2889382
Res. dev. = 19.60878
3-parameter asymptotic regression, y = b0 + b1*b2^x
------------------------------------------------------------------------------
| Robust
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
/b0 | 2.887679 . . . . .
/b1 | -2.491003 .0721087 -34.55 0.000 -2.635292 -2.346714
/b2 | .9998173 .0007891 1267.08 0.000 .9982383 1.001396
------------------------------------------------------------------------------
Parameter b0 taken as constant term in model
. nl exp3: y x, vce(hac nwest 1) nolog
(obs = 61)
conformability error
r(503);
.
I am running a non-linear regression on time series data, where I need to have an autocorrelation adjustment for the standard error because of serial correlation. The -nl- function of STATA seems to have a built in version of doing this with the option vce(hac kernel #), where kernel is the estimation type and kernel is the number of lags.
However, this vce option is giving me something called a "conformability error", and I'm not sure why or what that means. I've pasted an example output below. The first example with a two-parameter exponential function fitted to the data works just fine, but the three-parameter exponential function gives me this error. I've also included a version of the three-parameter exponential model without the vce(hac) option to show that the -nl- modeling does work fine otherwise.
Thanks!
Richard
. nl exp2: y x, vce(hac nw 1) nolog
(obs = 61)
Nonlinear regression Number of obs = 61
HAC kernel (lags): Newey-West (1) R-squared = 0.6764
Adj R-squared = 0.6654
Root MSE = .2889261
Res. dev. = 19.60367
2-parameter exp. growth curve, y = b1*b2^x
------------------------------------------------------------------------------
| HAC
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
/b1 | .3954239 .0694743 5.69 0.000 .2564062 .5344416
/b2 | 1.001218 .0041534 241.06 0.000 .9929073 1.009529
------------------------------------------------------------------------------
. nl exp3: y x, vce(robust) nolog
(obs = 61)
Nonlinear regression Number of obs = 61
R-squared = 0.0008
Adj R-squared = -0.0161
Root MSE = .2889382
Res. dev. = 19.60878
3-parameter asymptotic regression, y = b0 + b1*b2^x
------------------------------------------------------------------------------
| Robust
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
/b0 | 2.887679 . . . . .
/b1 | -2.491003 .0721087 -34.55 0.000 -2.635292 -2.346714
/b2 | .9998173 .0007891 1267.08 0.000 .9982383 1.001396
------------------------------------------------------------------------------
Parameter b0 taken as constant term in model
. nl exp3: y x, vce(hac nwest 1) nolog
(obs = 61)
conformability error
r(503);
.