Hello all,
I've been asked by my supervisor to run a population averaged xtlogit model on my panel data. This is a variation on a model I'd been running before (xtlogit, re) which did not pose the same problems at all, for any variable or combination thereof. It works for some variables in the dataset, for others not, and returns errors that I've been trying to read up on all of yesterday but they have not been tackled very well or in a way I can understand/apply in whatever I have found. I am using Stata12.
Here is some background information on my data:
This is panel data for 1379 firms, 5 year by year observations per firm, total of 6,895 observations, 188 variables, most of them factor variables, some continuous. Sometimes they vary year by year, sometimes they stay the same, like for example when I only have spot data about turnover from the point in time when I collected it.
The dependent variable is a factor variable 1 if a firm is part of a particular association in given year, 0 if it is not.
If the indep variable is a country variable (like e.g. proportion of votes for the green party in given year) I get the 'convergence not achieved r(430)' error. I've read somewhere that maybe I need to increase my maximum iterations and I have set my iteration limit to I think 400 (set maxiter 400, permanently) so the iterations are not limited to 100, but they always seem to stop there anyway.
These country variables are continuous variables. The model runs okay with other continuous variables that are firm-specific, for example:
I have read here http://www2.sas.com/proceedings/forum2008/360-2008.pdf that the cause for non convergence may be that there is quasi or complete separation between the variables, but I've not been able to find a test for quasi or complete separation to check if I have that problem with my data.
If the indep variable is a factor variable, sometimes it works. Other times I get the error 'estimates diverging (correlation > 1)'. I have tried this for example with 4 variables that all have an equal number of missing values, and are all factor variables. They have an equal number of missing values because they were created from a categorical variable that said in what range the % of women on company board fell.
As you can see, I only get the error for diversityupto20.
I get a similar problem when I split the sample into two by firm type IM==1 if firm is an asset manager, IM==0 if it is anything other than that:
If I put many variables in one model, again the iterations stop at 100 and it does not converge. Example:
Any ideas on what to try, suggestions and help will be greatly appreciated, especially since this is a lot of reading. Please ask for any additional information that may e relevant that I've not included.
I've been asked by my supervisor to run a population averaged xtlogit model on my panel data. This is a variation on a model I'd been running before (xtlogit, re) which did not pose the same problems at all, for any variable or combination thereof. It works for some variables in the dataset, for others not, and returns errors that I've been trying to read up on all of yesterday but they have not been tackled very well or in a way I can understand/apply in whatever I have found. I am using Stata12.
Here is some background information on my data:
This is panel data for 1379 firms, 5 year by year observations per firm, total of 6,895 observations, 188 variables, most of them factor variables, some continuous. Sometimes they vary year by year, sometimes they stay the same, like for example when I only have spot data about turnover from the point in time when I collected it.
The dependent variable is a factor variable 1 if a firm is part of a particular association in given year, 0 if it is not.
If the indep variable is a country variable (like e.g. proportion of votes for the green party in given year) I get the 'convergence not achieved r(430)' error. I've read somewhere that maybe I need to increase my maximum iterations and I have set my iteration limit to I think 400 (set maxiter 400, permanently) so the iterations are not limited to 100, but they always seem to stop there anyway.
Code:
xtlogit Sigdum greenvotes, pa Iteration 1: tolerance = .18143822 (...) Iteration 100: tolerance = .19650379 GEE population-averaged model Number of obs = 6895 Group variable: AccountNam~m Number of groups = 1379 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 46.14 Scale parameter: 1 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- greenvotes | .1107802 .0163096 6.79 0.000 .078814 .1427465 _cons | -1.001272 .0787232 -12.72 0.000 -1.155567 -.8469772 ------------------------------------------------------------------------------ convergence not achieved r(430); xtlogit Sigdum countryPFbuyin, pa Iteration 1: tolerance = .76533009 (...) Iteration 100: tolerance = 2.2552962 GEE population-averaged model Number of obs = 6895 Group variable: AccountNam~m Number of groups = 1379 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 74.93 Scale parameter: 1 Prob > chi2 = 0.0000 -------------------------------------------------------------------------------- Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] ---------------+---------------------------------------------------------------- countryPFbuyin | 2.256353 .2606602 8.66 0.000 1.745469 2.767238 _cons | -1.149233 .0822392 -13.97 0.000 -1.310418 -.9880467 -------------------------------------------------------------------------------- convergence not achieved r(430);
Code:
xtlogit Sigdum turnover if AO==1, pa Iteration 1: tolerance = 7.141e-11 GEE population-averaged model Number of obs = 3335 Group variable: AccountNam~m Number of groups = 667 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 3.36 Scale parameter: 1 Prob > chi2 = 0.0667 ------------------------------------------------------------------------------ Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- turnover | -.7147722 .3897863 -1.83 0.067 -1.478739 .0491949 _cons | -.8537245 .1705728 -5.01 0.000 -1.188041 -.519408 ------------------------------------------------------------------------------ . xtlogit Sigdum aumbn if AO==1, pa Iteration 1: tolerance = 8.857e-14 GEE population-averaged model Number of obs = 3335 Group variable: AccountNam~m Number of groups = 667 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 0.03 Scale parameter: 1 Prob > chi2 = 0.8721 ------------------------------------------------------------------------------ Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- aumbn | -.000224 .0013917 -0.16 0.872 -.0029516 .0025036 _cons | -1.120956 .1023513 -10.95 0.000 -1.321561 -.920351 ------------------------------------------------------------------------------
I have read here http://www2.sas.com/proceedings/forum2008/360-2008.pdf that the cause for non convergence may be that there is quasi or complete separation between the variables, but I've not been able to find a test for quasi or complete separation to check if I have that problem with my data.
If the indep variable is a factor variable, sometimes it works. Other times I get the error 'estimates diverging (correlation > 1)'. I have tried this for example with 4 variables that all have an equal number of missing values, and are all factor variables. They have an equal number of missing values because they were created from a categorical variable that said in what range the % of women on company board fell.
Code:
xtlogit Sigdum diversityover33, pa Iteration 1: tolerance = 2.186e-14 GEE population-averaged model Number of obs = 5555 Group variable: AccountNam~m Number of groups = 1111 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 19.89 Scale parameter: 1 Prob > chi2 = 0.0000 --------------------------------------------------------------------------------- Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- diversityover33 | .7145835 .1602412 4.46 0.000 .4005165 1.028651 _cons | -1.010849 .0750732 -13.46 0.000 -1.15799 -.8637085 --------------------------------------------------------------------------------- . xtlogit Sigdum diversity0, pa Iteration 1: tolerance = 4.497e-14 GEE population-averaged model Number of obs = 5555 Group variable: AccountNam~m Number of groups = 1111 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 5.34 Scale parameter: 1 Prob > chi2 = 0.0209 ------------------------------------------------------------------------------ Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- diversity0 | -.3911971 .1693556 -2.31 0.021 -.723128 -.0592663 _cons | -.7874579 .0730046 -10.79 0.000 -.9305442 -.6443715 ------------------------------------------------------------------------------ . xtlogit Sigdum diversityupto20, pa estimates diverging (correlation > 1) r(430); . xtlogit Sigdum diversity20to33, pa Iteration 1: tolerance = 1.828e-11 GEE population-averaged model Number of obs = 5555 Group variable: AccountNam~m Number of groups = 1111 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 4.03 Scale parameter: 1 Prob > chi2 = 0.0448 --------------------------------------------------------------------------------- Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- diversity20to33 | .2935231 .1462914 2.01 0.045 .0067972 .580249 _cons | -.9454273 .0776982 -12.17 0.000 -1.097713 -.7931416 ---------------------------------------------------------------------------------
I get a similar problem when I split the sample into two by firm type IM==1 if firm is an asset manager, IM==0 if it is anything other than that:
Code:
xtlogit Sigdum diversityover33 if IM==1, pa estimates diverging (correlation > 1) r(430); . xtlogit Sigdum diversityover33 if IM==0, pa Iteration 1: tolerance = 3.444e-14 GEE population-averaged model Number of obs = 3190 Group variable: AccountNam~m Number of groups = 638 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(1) = 14.84 Scale parameter: 1 Prob > chi2 = 0.0001 --------------------------------------------------------------------------------- Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- diversityover33 | .7602269 .1973287 3.85 0.000 .3734698 1.146984 _cons | -1.35723 .1144449 -11.86 0.000 -1.581538 -1.132922 ---------------------------------------------------------------------------------
Code:
. xtlogit Sigdum indivlegityr urgbyyrmeans orglegityr indivlegitcountry orglegitcountr > y, pa Iteration 1: tolerance = .03248442 (...) Iteration 100: tolerance = .0004888 GEE population-averaged model Number of obs = 6895 Group variable: AccountNam~m Number of groups = 1379 Link: logit Obs per group: min = 5 Family: binomial avg = 5.0 Correlation: exchangeable max = 5 Wald chi2(5) = 552.58 Scale parameter: 1 Prob > chi2 = 0.0000 ----------------------------------------------------------------------------------- Sigdum | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------+---------------------------------------------------------------- indivlegityr | -1.85e-11 5.64e-07 -0.00 1.000 -1.11e-06 1.11e-06 urgbyyrmeans | 5.89e-15 1.31e-09 0.00 1.000 -2.57e-09 2.57e-09 orglegityr | 1.37e-12 1.74e-08 0.00 1.000 -3.42e-08 3.42e-08 indivlegitcountry | -.0000489 2.34e-06 -20.90 0.000 -.0000535 -.0000443 orglegitcountry | 1.85e-06 1.25e-07 14.83 0.000 1.60e-06 2.09e-06 _cons | -.6722906 .0569293 -11.81 0.000 -.7838699 -.5607113 ----------------------------------------------------------------------------------- convergence not achieved r(430);
Comment