Hello,
I have a problem running an xtmelogit model. I have a longitudinal database where approximately, n=130,000, and aggregates all post-election surveys for general and European elections between 1979 and 2023.
My dependent variable is electoral turnout (where 1: declared participation, and 0: declared abstention and refusal to respond).
I want to apply Age-Period-Cohort models to distinguish between age, period and cohort effects. My main objective is to demonstrate cohort effects, and check whether cohorts born after 1970, and therefore socialised during the democratic period in Spain, vote less than other cohorts.
To do this, I first ran an "empty" model in which I added age as a fixed effect (as a categorical variable, and modalities based on a theory and hypotheses: 18-21, 22-25, 26-33, 34-59, 60-75 and 75+).
The year of the survey is considered as a discrete variable. The problem is that in some years (1986, 2004, 2019) there are several surveys, just as there are several elections. The survey identification number (from 1192 to 3420) is a qualitative variable where the survey figures do not have a logical hierarchy of values.
First question: Should I therefore replace the survey number variable by treating it as a qualitative variable? Should I apply fixed effects depending on the type of election (general elections or elections), since voter turnout varies greatly depending on the type of election?
Finally, I've added the birth cohort variable (broken down into 10-year periods according to the year of birth, e.g. 1930-1939, 1940-1949, etc. up to 2000+). I took a cohort as my reference category, the cohort born in the 1970s.
As I understand it, with 'xtmelogit' models, this part corresponds to fixed effects.
As Yang & Land (2006, 2008) show, I decided to add coefficients for the year and the birth cohort as random effects. I consider that individuals are nested in several different surveys and different cohorts. I also asked Stata to show the variance and covariance for the cohort and for the year.
Second question: Stata took at least 40 minutes to calculate the empty model :
xtmelogit participation2 i.newage c.year ib(8).cohorte || year: || cohorte: , variance reiterate(10) or
I then wanted to run a second model by adding two independent variables to my empty model: level of education and the interaction between level of education and birth cohorts.
xtmelogit participation2 i.newage c.year ib(8).cohorte i.v2 i.v2#i.cohorte || year: || cohorte: , covariance(unstructured) or
Should I add the "reiterate(10)" option to limit the maximum number of iterations?
Here's the command line I ran, as you can see from the iterations displayed in my model :
The model was launched yesterday at 3.30pm, and is currently still running, as you can see from the iterations displayed in my model :
It has already calculated 26 iterations. Are my orders tailored to my research objective? Should I change them? Is it normal for Stata to take so long to calculate my model?
Refining starting values:
Iteration 0: log likelihood = -66806.756 (not concave)
Iteration 1: log likelihood = -66789.075 (not concave)
Iteration 2: log likelihood = -66694.452
Performing gradient-based optimization:
Iteration 0: log likelihood = -66694.452 (not concave)
Iteration 1: log likelihood = -66652.678 (not concave)
Iteration 2: log likelihood = -66622.922
Iteration 3: log likelihood = -66620.015 (not concave)
Iteration 4: log likelihood = -66618.047 (not concave)
Iteration 5: log likelihood = -66617.597 (not concave)
Iteration 6: log likelihood = -66617.59 (not concave)
Iteration 7: log likelihood = -66617.557 (not concave)
Iteration 8: log likelihood = -66617.545 (not concave)
Iteration 9: log likelihood = -66617.538 (not concave)
Iteration 10: log likelihood = -66617.535 (not concave)
Iteration 11: log likelihood = -66617.533 (not concave)
Iteration 12: log likelihood = -66617.533 (not concave)
Iteration 13: log likelihood = -66617.533 (not concave)
Iteration 14: log likelihood = -66617.533 (not concave)
Iteration 15: log likelihood = -66617.533 (not concave)
Iteration 16: log likelihood = -66617.533 (not concave)
Iteration 17: log likelihood = -66617.533 (not concave)
Iteration 18: log likelihood = -66617.533 (not concave)
Iteration 19: log likelihood = -66617.533 (not concave)
Iteration 20: log likelihood = -66617.533 (not concave)
Iteration 21: log likelihood = -66617.533 (not concave)
Iteration 22: log likelihood = -66617.533 (not concave)
Iteration 23: log likelihood = -66617.533 (not concav
I thank you for your valuable assistance! Have a great day!"
Lucas Ormiere
PhD Student in Political Science
Sciences Po Bordeaux - Universidad Autónoma de Madrid
I have a problem running an xtmelogit model. I have a longitudinal database where approximately, n=130,000, and aggregates all post-election surveys for general and European elections between 1979 and 2023.
My dependent variable is electoral turnout (where 1: declared participation, and 0: declared abstention and refusal to respond).
I want to apply Age-Period-Cohort models to distinguish between age, period and cohort effects. My main objective is to demonstrate cohort effects, and check whether cohorts born after 1970, and therefore socialised during the democratic period in Spain, vote less than other cohorts.
To do this, I first ran an "empty" model in which I added age as a fixed effect (as a categorical variable, and modalities based on a theory and hypotheses: 18-21, 22-25, 26-33, 34-59, 60-75 and 75+).
The year of the survey is considered as a discrete variable. The problem is that in some years (1986, 2004, 2019) there are several surveys, just as there are several elections. The survey identification number (from 1192 to 3420) is a qualitative variable where the survey figures do not have a logical hierarchy of values.
First question: Should I therefore replace the survey number variable by treating it as a qualitative variable? Should I apply fixed effects depending on the type of election (general elections or elections), since voter turnout varies greatly depending on the type of election?
Finally, I've added the birth cohort variable (broken down into 10-year periods according to the year of birth, e.g. 1930-1939, 1940-1949, etc. up to 2000+). I took a cohort as my reference category, the cohort born in the 1970s.
As I understand it, with 'xtmelogit' models, this part corresponds to fixed effects.
As Yang & Land (2006, 2008) show, I decided to add coefficients for the year and the birth cohort as random effects. I consider that individuals are nested in several different surveys and different cohorts. I also asked Stata to show the variance and covariance for the cohort and for the year.
Second question: Stata took at least 40 minutes to calculate the empty model :
xtmelogit participation2 i.newage c.year ib(8).cohorte || year: || cohorte: , variance reiterate(10) or
I then wanted to run a second model by adding two independent variables to my empty model: level of education and the interaction between level of education and birth cohorts.
xtmelogit participation2 i.newage c.year ib(8).cohorte i.v2 i.v2#i.cohorte || year: || cohorte: , covariance(unstructured) or
Should I add the "reiterate(10)" option to limit the maximum number of iterations?
Here's the command line I ran, as you can see from the iterations displayed in my model :
The model was launched yesterday at 3.30pm, and is currently still running, as you can see from the iterations displayed in my model :
It has already calculated 26 iterations. Are my orders tailored to my research objective? Should I change them? Is it normal for Stata to take so long to calculate my model?
Refining starting values:
Iteration 0: log likelihood = -66806.756 (not concave)
Iteration 1: log likelihood = -66789.075 (not concave)
Iteration 2: log likelihood = -66694.452
Performing gradient-based optimization:
Iteration 0: log likelihood = -66694.452 (not concave)
Iteration 1: log likelihood = -66652.678 (not concave)
Iteration 2: log likelihood = -66622.922
Iteration 3: log likelihood = -66620.015 (not concave)
Iteration 4: log likelihood = -66618.047 (not concave)
Iteration 5: log likelihood = -66617.597 (not concave)
Iteration 6: log likelihood = -66617.59 (not concave)
Iteration 7: log likelihood = -66617.557 (not concave)
Iteration 8: log likelihood = -66617.545 (not concave)
Iteration 9: log likelihood = -66617.538 (not concave)
Iteration 10: log likelihood = -66617.535 (not concave)
Iteration 11: log likelihood = -66617.533 (not concave)
Iteration 12: log likelihood = -66617.533 (not concave)
Iteration 13: log likelihood = -66617.533 (not concave)
Iteration 14: log likelihood = -66617.533 (not concave)
Iteration 15: log likelihood = -66617.533 (not concave)
Iteration 16: log likelihood = -66617.533 (not concave)
Iteration 17: log likelihood = -66617.533 (not concave)
Iteration 18: log likelihood = -66617.533 (not concave)
Iteration 19: log likelihood = -66617.533 (not concave)
Iteration 20: log likelihood = -66617.533 (not concave)
Iteration 21: log likelihood = -66617.533 (not concave)
Iteration 22: log likelihood = -66617.533 (not concave)
Iteration 23: log likelihood = -66617.533 (not concav
I thank you for your valuable assistance! Have a great day!"
Lucas Ormiere
PhD Student in Political Science
Sciences Po Bordeaux - Universidad Autónoma de Madrid