Announcement

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

  • Graph of predicted probabilities using mlogit

    Hello,

    I am trying to replicate figure 3 in the paper by Ho & Park (2019) – I have attached an image of the graph. I am running a multinomial logistic regression and I would like the predicted probabilities of employment transitions by living arrangement transitions.

    My outcome has four categories (consistently employed (base category), unemployed-employed, employed-unemployed and consistently employed). My living arrangement is also categorical (no change, both to one and both to neither). This is what I have managed to produce, however, I am unable to format the graph so it looks like Ho & Parks.

    Code:
    svyset Fpsu [pw = panel_wt_12_18 ], strata(gov1)
    svy: mlogit change2 i.releducLG i.matempLG  i.fatempLG i.coresidenceCH, rrr
    margins coresidenceCH
    mplotoffset, recast(scatter) offset(0.1)
    Attached are the two graphs (the one I produced in Stata and the one by Ho & Park). In the graph by Ho & park, predicted probabilities for the base category are plotted on the left vertical axis and the predicted probabilities for the remaining three categories are plotted on the right vertical axis.


    Article:
    Ho, P., & Park, H. (2019). Young Adults' Patterns of Leaving the Parental Home: A Focus on Differences Among Asian Americans. Journal of Marriage and Family, 81(3), 696-712.


    Thank you.


    Click image for larger version

Name:	Graph.png
Views:	1
Size:	67.7 KB
ID:	1561488





    Click image for larger version

Name:	graph2.png
Views:	1
Size:	207.4 KB
ID:	1561489



  • #2
    Forgot the data example:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double Findid float(change2 coresidenceCH matempLG fatempLG)
    601004004 . . . .
    601004004 0 0 0 1
    601004603 . . . .
    601004603 0 0 0 1
    601005902 . . . .
    601005902 3 0 0 1
    601012406 . . . .
    601012406 0 0 0 1
    601020204 . . . .
    601020204 0 2 1 1
    601029206 . . . .
    601029206 0 0 0 1
    601032102 . . . .
    601032102 2 0 0 1
    601032309 . . . .
    601032309 0 0 0 1
    601037505 . . . .
    601037505 0 0 0 1
    601038302 . . . .
    601038302 0 0 0 1
    601045003 . . . .
    601045003 0 0 0 1
    601050804 . . . .
    601050804 0 0 0 1
    601051404 . . . .
    601051404 0 0 0 1
    601054402 . . . .
    601054402 0 0 0 1
    601055607 . . . .
    601055607 1 0 0 1
    601056302 . . . .
    601056302 0 0 0 1
    601058302 . . . .
    601058302 3 0 1 1
    601058602 . . . .
    601058602 0 0 0 1
    601060002 . . . .
    601060002 1 0 0 1
    601060202 . . . .
    601060202 0 0 0 1
    601060302 . . . .
    601060302 0 0 1 1
    601061602 . . . .
    601061602 0 0 1 1
    601062002 . . . .
    601062002 0 0 0 1
    601062602 . . . .
    601062602 0 0 0 1
    601063102 . . . .
    601063102 1 0 0 1
    601067002 . . . .
    601067002 2 0 1 1
    601072002 . . . .
    601072002 1 0 0 1
    601072702 . . . .
    601072702 0 0 1 1
    601072902 . . . .
    601072902 1 0 0 1
    601073102 . . . .
    601073102 0 0 0 1
    601074502 . . . .
    601074502 1 0 0 1
    601075902 . . . .
    601075902 0 0 0 1
    601077402 . . . .
    601077402 0 0 0 1
    601078802 . . . .
    601078802 3 0 0 1
    601080302 . . . .
    601080302 1 0 0 1
    601082202 . . . .
    601082202 0 0 0 1
    601083402 . . . .
    601083402 0 0 0 1
    601085202 . . . .
    601085202 0 0 0 1
    601085602 . . . .
    601085602 0 0 0 1
    601085703 . . . .
    601085703 0 0 0 1
    601086402 . . . .
    601086402 0 0 0 1
    601088002 . . . .
    601088002 0 0 0 1
    601088202 . . . .
    601088202 0 0 0 1
    601088305 . . . .
    601088305 0 2 0 1
    601088306 . . . .
    601088306 0 0 0 1
    601089002 . . . .
    601089002 0 0 1 1
    601089303 . . . .
    601089303 3 0 1 1
    601090502 . . . .
    601090502 3 0 0 1
    601090602 . . . .
    601090602 0 0 0 1
    601091602 . . . .
    601091602 0 0 0 1
    end
    label values change2 change2
    label def change2 0 "Consistently unemployed", modify
    label def change2 1 "Unemployed - employed", modify
    label def change2 2 "Employed - unemployed", modify
    label def change2 3 "Consistently employed", modify
    label values coresidenceCH coresCH
    label def coresCH 0 "No change", modify
    label def coresCH 2 "Both - Neither", modify
    label values matempLG memp
    label def memp 0 "Unemployed", modify
    label def memp 1 "Employed", modify
    label values fatempLG femp
    label def femp 1 "Employed", modify

    Comment

    Working...
    X