Page 1 of 1

Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Thu Feb 02, 2023 9:38 am
by MrC
Hi all,

I am running a restricted regression with constraints on Eviews 12- The unrestricted regression has signs in the wrong direction so my understanding was that I needed to restrict it to point the regression toward the local minimum where the signs would be in the right directions. It looks like the code below (I've simplified a bit to keep it generic).

Code: Select all

PARAM C(1) = 0 PARAM C(2) = 0 PARAM C(3) = 0 PARAM C(4) = 0 equation y.ls y = C(1)*X1 + C(2)*X2 + (1-C(1)-C(2))*X3 + @LOGIT(C(3))*X4 + C(4)*X5
This works fine, but if I try and constrain C(4) or set the wrong starting values for the parameters I will get the error: "WARNING: Singular covariance - coefficients are not unique" with NA's in place of the std. errors, t-stats, and p-values.

I assume this is because I've somehow over-restricted the model or put the coefficients in the wrong starting place to solve, and that when it tries to solve the Marquardt steps somehow go in the wrong direction and cannot minimise the squares. I've tried running with the different solving algorithms using the (opstep = arg) option but got similar or worse results.

My question is is possible for me to further restrict the model without running into this error? Or will I just have to not restrict the variable/remove it? And is it somehow possible for me to see where the different minima may lie so I can set starting values to fall within those minima? The only thing I can think of for this is to create a for loop that iterates over different starting values and manually check when it stops working, but this feels a little like overkill!

Apologies in advance, as I can't post any data or actual code due to it's proprietary nature so I've had to keep it generic.

Many thanks,

MrC

Re: Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Thu Feb 02, 2023 11:36 am
by startz
What do you get for point estimates?

Re: Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Fri Feb 03, 2023 3:15 am
by MrC
What do you get for point estimates?
I'll get values of something like -0.5 for a coefficient that should be 0.5. Also all the variables are logged!

It's also built into an error correction framework, so sometimes the long-run variable will have the right sign while the short-run differenced one will not- could that be part of the problem?

Re: Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Fri Feb 03, 2023 7:07 am
by startz
In the generic model you posted, the only thing that's nonlinear is c(3). If your real model is different from that then it's hard to say much without seeing the real model.

Re: Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Fri Feb 03, 2023 10:07 am
by MrC
In the generic model you posted, the only thing that's nonlinear is c(3). If your real model is different from that then it's hard to say much without seeing the real model.
The model looks a bit like the following:

Code: Select all

DLOG(Y) = C(1) + C(2)*(LOG(Yt-1) + C(3)*LOG(Xt-1) + (1-C(3))*LOG(Zt-1)) + C(4)*DLOG(Xt-1) + C(5)*DLOG(Zt-1) + (1-C(4)-C(5))*DLOG(Ut)
Where I'd want constraints such as:
-1 < C(2) and C(3) < 0
C(4) and C(5) >0

I @LOGIT some of the coefficients to get round this problem, but if I @LOGIT too many of them I get the error.

I think I'm getting very confused on whether the least squares cost function would have a global minimum or not in this example- is it purely because I am using the @LOGIT function to constrain coefficients that I'm running into problems?

Re: Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Fri Feb 03, 2023 11:45 am
by startz
The model looks a bit like the following:

Code: Select all

DLOG(Y) = C(1) + C(2)*(LOG(Yt-1) + C(3)*LOG(Xt-1) + (1-C(3))*LOG(Zt-1)) + C(4)*DLOG(Xt-1) + C(5)*DLOG(Zt-1) + (1-C(4)-C(5))*DLOG(Ut)
Where I'd want constraints such as:
-1 < C(2) and C(3) < 0
C(4) and C(5) >0

I @LOGIT some of the coefficients to get round this problem, but if I @LOGIT too many of them I get the error.

I think I'm getting very confused on whether the least squares cost function would have a global minimum or not in this example- is it purely because I am using the @LOGIT function to constrain coefficients that I'm running into problems?
It's almost certainly @logit giving the problem. The example you've written is nice and linear so essentially can't fail. That leaves @logit as the only suspect.

Re: Overconstrained model - Constraints too restrictive leading to Singular Covariance error

Posted: Mon Feb 06, 2023 2:52 am
by MrC
Thanks Startz, that's really helpful! I'll have a go away and look into what I can replace it with, if anything!