I am doing a simple probit model in which the dependent variable is "work" (1 if the person is employed and 0 if the person is unemployed) and among the independent variables I have an interaction between the birth cohort and the age of each individual.
Since one of the main elements of my research is the difference of the three age groups within each cohort, I would like to show the estimated employment for the first cohort on each age group and then show the marginal effects of succesive cohort. For this, I am trying to use the Clarify package, with the marginal effects simulated at the mean age of the corresponding age group, setting all other covariates at their sample mean.
The thing is I am having trouble with the interaction between the age group and cohort (not when I do the probit, but when I do the probit in the clarify package).
This is an example dataset that I have created to ilustrate the data I am currently using:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id work cohort age age_group sex educ age_40 age_50 age_64) 1 1 1 43 1 1 1 3 0 0 2 0 2 56 2 2 3 16 6 0 3 0 3 64 3 2 3 24 14 4 4 1 1 58 2 1 2 18 8 0 5 0 2 63 3 1 1 23 13 3 6 1 2 49 1 1 4 9 0 0 7 0 1 52 2 2 2 12 2 0 8 1 3 44 1 2 4 4 0 0 9 1 2 62 3 2 1 22 12 2 10 0 3 43 1 1 4 3 0 0 end label values work work label def work 0 "Unemployed", modify label def work 1 "Employed", modify label values cohort cohort label def cohort 1 "1901-1910", modify label def cohort 2 "1911-1920", modify label def cohort 3 "1921-1930", modify label values age_group age_group2 label def age_group2 1 "40-49", modify label def age_group2 2 "50-59", modify label def age_group2 3 "60-64", modify label values sex sex label def sex 1 "Men", modify label def sex 2 "Women", modify label values educ educ label def educ 1 "MS", modify label def educ 2 "HS", modify label def educ 3 "UG", modify label def educ 4 "GS", modify
Code:
estsimp probit work i.age_group#i.cohort sex educ age_40 age_50 age_64
(age_40 is the age minus 40; age_50 is the age minus 50 (0 if negative); and age_60 is the age minus 60 (0 if negative)).
I guess one solution is to run the probit for each age group, but when I do it, I get the following message and lose two of the coefficients:
"Stata has dropped one of your independent variables.
Please re-specify your model and try again."
Do you have an idea of how could I solve this?
Thanks in advance,
Isidora.
0 Response to Clarify package: probit with interaction between variables
Post a Comment