Announcement

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

  • Graph adjusted line?

    Do you know if it is possible to graph a line, adjusted for confounders? In this example it looks like there is a rise in haemoglobin with dietary greenhouse gas emissions, but this is because men usually have higher haemoglobin and higher greenhouse gas emissions than women. In this example – can I draw a line adjusted for sex? Does the first line in my code actually do anything?

    code:
    regress HGB Total_CO2 i.SEX
    twoway (lfit HGB Total_CO2) || (lfit HGB Total_CO2 if SEX==0) || (lfit HGB Total_CO2 if SEX==1), ytitle(HGB) xtitle("Dietary GHGE (kg/day)")

    Click image for larger version

Name:	Regression.png
Views:	3
Size:	44.8 KB
ID:	1723969
    Attached Files

  • #2
    Duplicate post. If interested, see https://www.statalist.org/forums/for...=1692196939871

    Comment

    Working...
    X