near singular matrix error

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

near singular matrix error

Postby BT454 » Thu Oct 24, 2024 12:19 pm

Hi all!
I'm attempting to create a forecast of expected values to compare to actuals from a post-treatment period. However, I'm receiving a near singular matrix error. I'm almost certain this is caused by all the dummy variables I'm using (dom = day of month, moy = month of year, dow = day of week, mft = dummy variable for treatment). Please note: I've dropped an observation from each dummy variable in attempt to avoid perfect collinearity, but I don' think it worked.

I would like to estimate and evaluate the forecast over two time periods:
1. Pre-treatment estimation, pre-treatment evaluation: hoping this will allow me to use my t-stat on the treatment dummy variable to gauge the confidence intervals, and also back-test the forecast
2. Pre-treatment estimation, post-treatment evaluation: comparing the forecasted expected values to the actual values of the treatment period to quantify the impact of the treatment.

Please see the workfile below, containing the equation i'm attempting to estimate.
Thanks!
Bob
Attachments
forced_moves_90.wf1
(560.95 KiB) Downloaded 21617 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: near singular matrix error

Postby EViews Gareth » Thu Oct 24, 2024 1:43 pm

How did you drop dummies?

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: near singular matrix error

Postby startz » Thu Oct 24, 2024 3:40 pm

The equation post_MRC_eq, which I recognize may not be what you used, does not have dummies dropped.

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

Re: near singular matrix error

Postby BT454 » Fri Oct 25, 2024 9:16 am

How did you drop dummies?
I picked one observation set for each of the period/time variables and made it a 0
for instance:
smpl @all
series moy = @month 'generate moy series
smpl if @month = @2
series moy = 0 'drop all february observations by setting to 0

would this work?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: near singular matrix error

Postby EViews Gareth » Fri Oct 25, 2024 9:18 am

No. Setting a dummy variable to zero is not removing it.

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

Re: near singular matrix error

Postby BT454 » Fri Oct 25, 2024 9:46 am

No. Setting a dummy variable to zero is not removing it.
Fair :)

I have attempted many different functional forms including dropping several of the variables altogether (not just dropping observations), but I still receive the same near singular matrix error, if I have a second dummy variable along with MFT (capturing the treatment period).

Is this because at some point the included explanatory variables are all equal to the same value (1, 0, etc)?

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: near singular matrix error

Postby startz » Sat Oct 26, 2024 7:55 am

If you have two variables with identical values for every given observation, then that's the problem. After all, if the two are always the same how can the computer separate out their effects?

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

Re: near singular matrix error

Postby BT454 » Mon Oct 28, 2024 6:51 am

If you have two variables with identical values for every given observation, then that's the problem. After all, if the two are always the same how can the computer separate out their effects?
Ok. That shouldn't be the case for any of the variables. They will share the same values for some observations, but not all. I'll double check tho.
Thanks for the input!


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests