Dear statalist,
I am trying to replicate a model that has a vote choice as a dependent variable, and a set of regressors that measure various factors for each party for each individual (for example, distance between a party and an individual on the left-right scale), as well as fixed effects for parties (the model I am trying to replicate is in Bolsted and Dinas, 2016, Table A9 in Appendix, it is run for many elections/countries with parties' fixed effects). I tried emailing the authors but never got a response (it has been a month now). Anyway, I ran following script on my data:
clogit VOTE distance i.partynumber, group (idd), where partynumber is a different number for each party in all elections, and idd is a voter id variable.
So this is what an example of few rows of data (simplified) looks like:
The last 2 variables in the table are not used in analyses, they are just shown here to show how the data is structured.
If I run this model on one election, it runs just fine. However, when I try to run it on more than one election it just never converges. My question is, is my model specification wrong, or is there something wrong with the way I structured the data?
I tried interacting party number within election with electionid, as well as creating a long dataset that has as many rows for each individuals as there are parties in all elections (128) - took 2 days to create it, but the model never converged either.
Thank you for your time,
Masha
I am trying to replicate a model that has a vote choice as a dependent variable, and a set of regressors that measure various factors for each party for each individual (for example, distance between a party and an individual on the left-right scale), as well as fixed effects for parties (the model I am trying to replicate is in Bolsted and Dinas, 2016, Table A9 in Appendix, it is run for many elections/countries with parties' fixed effects). I tried emailing the authors but never got a response (it has been a month now). Anyway, I ran following script on my data:
clogit VOTE distance i.partynumber, group (idd), where partynumber is a different number for each party in all elections, and idd is a voter id variable.
So this is what an example of few rows of data (simplified) looks like:
idd | VOTE | distance | partynumber | electionid | number_within_election | |
1 | 0 | 2 | 21 | 1 | 1 | |
1 | 1 | 0 | 22 | 1 | 2 | |
1 | 0 | 3 | 23 | 1 | 3 | |
2 | 0 | 4 | 21 | 1 | 1 | |
2 | 0 | 3 | 22 | 1 | 2 | |
2 | 1 | 1 | 23 | 1 | 3 | |
3 | 1 | 2 | 40 | 2 | 1 | |
3 | 0 | 3 | 44 | 2 | 2 |
If I run this model on one election, it runs just fine. However, when I try to run it on more than one election it just never converges. My question is, is my model specification wrong, or is there something wrong with the way I structured the data?
I tried interacting party number within election with electionid, as well as creating a long dataset that has as many rows for each individuals as there are parties in all elections (128) - took 2 days to create it, but the model never converged either.
Thank you for your time,
Masha
Comment