Dear Statalist,
I posted a similar question before, but I think I am a bit closer now where I might get some useful help.
I want to have Annual hrs difference: migrants minus natives on the vertical axis, and years since migration on the horizontal axis.
I run the following regression:
reg annualhrs ysm ysm2 spysm spysm2 cohort2-cohort8 spcohort2-spcohort8 plus other controls.
This is a regression of women only, so "sp" is the variable for the male spouse. Outcome is annualhrs being a function of years since migration(2), spouse years since migration(2), and seven cohort decades of arrival for the women and their spouse. I would like to graph the relationship (annual hrs difference over years since migration) using the arrival decade cohort6 and spcohort6.
So this is what I have done:
I run the regression. Then,
gen y = _b[ysm]*ysm + _b[ysm2]*ysm2 + _b[spysm]+ _b[spysm2] + _b[cohort6] + _b[spcohort6]
duplicates drop ysm ysm2 spysm spysm2, force
sort ysm ysm2 spysm spysm2
graph twoway line y ysm
The concave graph intersects the y axis at -400 (which is great because the Net cohort effect estimate = _b[cohort6] + _b[spcohort6] = -1000 + 600 = -400). The y is zero when ysm =10, and then the graph continues to go upwards in a concave manner.
It looks all good, but I am not sure if I have done it right, and I am not sure how to move the x axis upwards where y is equal zero, so that the graph crosses the xaxis when ysm=10.
Let me write a few more words on the following:
gen y = _b[ysm]*ysm + _b[ysm2]*ysm2 + _b[spysm]+ _b[spysm2] + _b[cohort6] + _b[spcohort6]
The rough estimates for the _b's are as follows:
gen y = +48[ysm]*ysm - 0.11[ysm2]*ysm2 -22[spysm] - 0.09 [spysm2] -1000[cohort6] + 600[spcohort6]
I am writing this long equation because I want to have Net years since migration: Net ysm = ysm-spysm= 48-22 and Net ysm2 = ysm2 - spysm2 = -0.11 - 0.09.
So two questions I got:
Is my approach somewhat correct or do I need to use margins and marginsplot?
How do I move a xaxis upwards?
Thank you very much.
Best wishes
Nico
Related Posts with Difference in annual hour worked between migrant and native married women by years since migration: a graphical illustration of assimilation
Outreg2 First stage (xtivreg) Equation with random effectsI am using a panel random effects model with instrumental variables and robust clustered standard er…
Comparing household income in two groupsSo I have a dataset where my two dependent variables are 1) underwent surgery (900 patients) and 2) …
Comparing household income between two groupsHi all, So I have a dataset where my two dependent variables are 1) underwent surgery (900 patients…
Statistical power of small observationsHello- although that one of the variables in my regression forms only 1.7% of that observations (tot…
Drop observations by group if not in all survey roundsHi all, I would like to drop households from my dataset if they were not surveyed in both of my sur…
Subscribe to:
Post Comments (Atom)
0 Response to Difference in annual hour worked between migrant and native married women by years since migration: a graphical illustration of assimilation
Post a Comment