Logistic Regression singular covariance
Moderators: EViews Gareth, EViews Moderator
Logistic Regression singular covariance
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
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
This suggests you have perfect multicollinearity.
Re: Logistic Regression singular covariance
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
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
Most likely.
Re: Logistic Regression singular covariance
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
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
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.
Re: Logistic Regression singular covariance
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.
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.
Re: Logistic Regression singular covariance
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?
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
dummy variable trap
Re: Logistic Regression singular covariance
how i fix it?dummy variable trap
pleas help me
i dont have time
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Logistic Regression singular covariance
Begin by googling dummy variable trap
Re: Logistic Regression singular covariance
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
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
Re: Logistic Regression singular covariance
nobody here can help me?
Re: Logistic Regression singular covariance
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
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.
Who is online
Users browsing this forum: No registered users and 2 guests
