Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • test: problems getting estimates from the margins command

    Dear Stata users,

    I have a problem when using the margins command for some of my models. In my analyses I compare the age gap between same-sex and mixed-sex couples across surveys. I do this for multiple countries separately. I also control for survey year since the surveys are not collected in the same year(s).

    The problem: I noticed that the margins command works only if there is variation in the survey year variable in both surveys (in the example below: Belgium). I cannot get any estimates for countries which do not have variation on the survey year in one of the surveys (in the example below: Czech Republic). Since survey year is only a control variable and not part of the interaction term for which I would like the margins, I do not understand why I cannot get my estimates. The margins command works fine in all my models if I omit the survey year control variable.

    Does anyone have an idea why this is happening?

    Cheers,
    Mirjam

    (using Stata13)


    Belgium: variation on survey year in both surveys


    Click image for larger version

Name:	frequBE.jpg
Views:	2
Size:	27.2 KB
ID:	1306487


    Click image for larger version

Name:	BE_model.jpg
Views:	2
Size:	117.2 KB
ID:	1306489




    Czech Republic: no variation on survey year in survey 2
    Click image for larger version

Name:	frequCZ.jpg
Views:	2
Size:	20.4 KB
ID:	1306488



    Click image for larger version

Name:	CZ_model.jpg
Views:	2
Size:	104.6 KB
ID:	1306490
Working...
X