Announcement

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

  • Plotting a graph showing probabilities of an ordinal variable

    Hello I produced this graph from


    Code:
    gsem(vas1 harris <-, ologit) (C i.procedure preopvas preopharris) [fw=count], lclass(C2)
    margins i.procedure, at(vas) predict(classpr class(1)) predict(classpr class(2))
    marginsplot, by(procedure)
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	1.26 MB
ID:	1743107

    However, Ii would have like to see the subsections of Vas 1-10 (ordinal variable) on the xaxis by procedure, instead I have the Class 1 and Class 2 by procedure and respective probabilities on the y axis...
    I would have liked to produce something similar to the picture produced by princeton (understood it's not LCA, but a regression). Is this possible with LCA?

    https://www.princeton.edu/~otorres/Margins.pdf

    Click image for larger version

Name:	princeton.PNG
Views:	1
Size:	170.3 KB
ID:	1743106

Working...
X