Logistic Regression singular covariance

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

el_horse
Posts: 4
Joined: Wed May 18, 2011 1:58 pm

Logistic Regression singular covariance

Postby el_horse » Wed May 18, 2011 2:05 pm

Hi there,

I am trying to run Logistic regression on binary variables with Eviews7. In the ouput I am getting N/As for Standard error / z & p values and at the top an error message which says:

WARNING: Singular covariance - coefficients are not unique

This is both using probit and logit.

What exactly is wrong and how do I solve it?

Thank you

KB

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

Re: Logistic Regression singular covariance

Postby startz » Wed May 18, 2011 2:43 pm

This suggests you have perfect multicollinearity.

el_horse
Posts: 4
Joined: Wed May 18, 2011 1:58 pm

Re: Logistic Regression singular covariance

Postby el_horse » Wed May 18, 2011 2:59 pm

In other words if I have at least 2 variables that can be represented as a linear transformation of each other, right?

Something like

Male Female
1 0
0 1
0 1
1 0
0 1
I think I know what I did wrong in that case

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

Re: Logistic Regression singular covariance

Postby startz » Wed May 18, 2011 4:45 pm

Most likely.

el_horse
Posts: 4
Joined: Wed May 18, 2011 1:58 pm

Re: Logistic Regression singular covariance

Postby el_horse » Thu May 19, 2011 4:32 am

OK I have gotten rid of the "dummy variable trap" for all variables and still have that error showing up

this is the equation spec
inservice c age_bin_2 age_bin_3 age_bin_4 age_bin_5 age_bin_6 age_bin_7 age_bin_8 age_bin_9 age_bin_10 age_bin_11 age_bin_12 age_bin_13 age_bin_14 age_bin_15 age_bin_16 cockpit_bin_2 cockpit_bin_3 cockpit_bin_4 family_bin_2 family_bin_3 family_bin_4 fuelburn_bin_2 fuelburn_bin_3 fuelburn_bin_4 fuelburn_bin_5 fuelburn_bin_6 hh_bin_2 hh_bin_3 previouslyinservice range_bin_2 range_bin_3 range_bin_4 range_bin_5 speed_bin_2 speed_bin_3 speed_bin_4 speed_bin_5 stage_bin_1 yearssinceoop_bin_2 yearssinceoop_bin_3 yearssinceoop_bin_4 yearssinceoop_bin_5 yearssinceoop_bin_6 yearssinceoop_bin_7 delivered_us

notice how there is no bin_1 in all variables with multiple bins (as I am trying to get rid of the dummy variable trap)

and this is the error again
WARNING: Singular covariance - coefficients are not unique

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

Re: Logistic Regression singular covariance

Postby startz » Thu May 19, 2011 6:00 am

To check if you still have perfect multicollinearity, run it as least squares instead. If you still have the problem, then its something about the right hand side variables.

el_horse
Posts: 4
Joined: Wed May 18, 2011 1:58 pm

Re: Logistic Regression singular covariance

Postby el_horse » Thu May 19, 2011 6:11 am

Thanks

I think I have got it - some variables, even though they are not that correlated, seem to be colinear.

When I started excluding them, the problem disappeared.

sasha001
Posts: 5
Joined: Thu Jul 21, 2011 6:02 am

Re: Logistic Regression singular covariance

Postby sasha001 » Thu Jul 21, 2011 6:26 am

hi
i estimate a logit model for site selection (refinery )
but i have a problem
model: y c rsw niw amw dum ulp ccp dco1 dco2 dco3 dco4 dco5 dco6 dex1 dex2

rsw : Proportion of skilled workers to total workers
niw : number of industry workshop
amw : The average monthly wage
dum : Petrochemical 1 and no Petrochemical =0
ulp: Urban land prices
ccp: Per capita consumption

and i have six oil field distance : dco1 ... dco6
and two port for export product : dex1 dex2
my result is :

Dependent Variable: Y
Method: ML - Binary Logit (Quadratic hill climbing)
Date: 07/21/11 Time: 17:31
Sample: 1 30
Included observations: 30
Convergence achieved after 21 iterations
WARNING: Singular covariance - coefficients are not unique
WARNING: complete separation observed at estimated parameters
(results may not be valid)
Covariance matrix computed using second derivatives

Variable Coefficient Std. Error z-Statistic Prob.

C -2.243967 NA NA NA
RSW 4.352483 NA NA NA
NIW 0.186721 NA NA NA
AMW 0.007657 NA NA NA
DUM 1.829027 NA NA NA
ULP 1.10E-05 NA NA NA
CCP 0.017136 NA NA NA
DCO1 0.273744 NA NA NA
DCO2 0.087208 NA NA NA
DCO3 -0.528726 NA NA NA
DCO4 -0.251223 NA NA NA
DCO5 0.193485 NA NA NA
DCO6 0.074301 NA NA NA
DEX1 0.561119 NA NA NA
DEX2 -0.422661 NA NA NA

McFadden R-squared 1.000000 Mean dependent var 0.266667
S.D. dependent var 0.449776 S.E. of regression 2.54E-17
Akaike info criterion 1.000000 Sum squared resid 9.69E-33
Schwarz criterion 1.700599 Log likelihood 0.000000
Hannan-Quinn criter. 1.224128 Restr. log likelihood -17.39746
LR statistic 34.79491 Avg. log likelihood 0.000000
Prob(LR statistic) 0.001576

Obs with Dep=0 22 Total obs 30
Obs with Dep=1 8




pleas help me
this is my thesis
i need help
what i do?

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

Re: Logistic Regression singular covariance

Postby startz » Thu Jul 21, 2011 6:31 am

dummy variable trap

sasha001
Posts: 5
Joined: Thu Jul 21, 2011 6:02 am

Re: Logistic Regression singular covariance

Postby sasha001 » Thu Jul 21, 2011 7:30 am

dummy variable trap
how i fix it?
pleas help me
i dont have time

sasha001
Posts: 5
Joined: Thu Jul 21, 2011 6:02 am

Re: Logistic Regression singular covariance

Postby sasha001 » Thu Jul 21, 2011 8:37 am

hi startz
can u help me?
my gmail is sadrzadeh.saeed@gmail.com
i am in googletalk
tnx

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

Re: Logistic Regression singular covariance

Postby startz » Thu Jul 21, 2011 9:17 am

Begin by googling dummy variable trap

sasha001
Posts: 5
Joined: Thu Jul 21, 2011 6:02 am

Re: Logistic Regression singular covariance

Postby sasha001 » Sat Jul 23, 2011 10:07 pm

hi
i replace (dex1 and dex2 ) to dex
and (dco1 d2 dco3 dco4 dco5 dco6 ) to dco
dex and dco are average of dex1 dex2 and dco1...dco2
but yet the problem not solve
i estimate over 100 equation by changing the variable
but not work
pleas help me
my workfile is :
http://ifile.it/aml3sfq/New%20folder.rar

sasha001
Posts: 5
Joined: Thu Jul 21, 2011 6:02 am

Re: Logistic Regression singular covariance

Postby sasha001 » Sun Jul 24, 2011 1:40 am

nobody here can help me?

calino
Posts: 2
Joined: Tue Oct 27, 2009 5:54 am

Re: Logistic Regression singular covariance

Postby calino » Sun Aug 28, 2011 10:53 am

I had a similar problem with the Singular covariace. This is because one (or more) of the dummy variables has only zero values (It can be in any of the dummy variables DC orDEX) as an example I will use the DC Variable

DC Variable (the dummy variables from DC01 to DC06)
DC01 1 0 0 0 0 0
DC02 0 1 0 0 0 0
DC03 0 0 1 0 0 0
DC04 0 0 0 1 0 0
DC05 0 0 0 0 1 0
DC06 0 0 0 0 0 1

However you have one (or more) of the variable with zero Cell count.
DC01 0 0 0 0 0 0
DC02 0 0 0 0 0 0
DC03 0 0 1 0 0 0
DC04 0 0 0 1 0 0
DC05 0 0 0 0 1 0
DC06 0 0 0 0 0 1

To solve this problem you need to pool the variable with another variable in the same category


Then expand the dummy variables, and drop the reference dummy variable (since K>2 then K-1)

that is @expand("DC", @drop("DC0x"))

DCOx is the reference variable to which the rest of the variables in that category will be compared
Last edited by calino on Mon Aug 29, 2011 12:07 am, edited 3 times in total.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests