Hello,
I am trying to plot odds ratios from a logit command - the plots work but I wanted to have
1) headers for variables, and
2) asterisk for results that are significant, or show only significant results?
Here is an example of my data:
Here is my code
With this code, my categories are just listed without any headers for which categories belong to which variable.
Thank you!
I am trying to plot odds ratios from a logit command - the plots work but I wanted to have
1) headers for variables, and
2) asterisk for results that are significant, or show only significant results?
Here is an example of my data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float covid4 byte(unofflanguage women lico age3 education religion2 canborn) float region 0 1 1 1 2 3 2 0 4 1 0 1 1 2 3 2 1 2 0 1 1 0 2 3 5 0 1 0 0 0 0 2 3 5 0 1 1 1 1 0 2 1 1 0 1 1 1 1 0 2 2 5 0 1 0 1 1 1 1 3 4 0 . 1 0 0 0 2 3 5 1 4 1 1 1 0 2 1 1 0 1 1 1 1 1 1 1 5 0 2 1 1 0 0 2 3 1 0 4 0 1 1 0 2 3 5 0 4 0 1 0 0 2 3 5 0 1 1 1 0 0 2 3 5 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 2 3 5 0 . 1 1 1 0 2 3 2 1 3 1 1 1 1 2 3 5 0 1 1 1 1 0 2 3 5 0 1 0 0 1 0 2 3 3 0 3 0 1 0 0 2 3 5 0 3 1 1 1 1 2 3 5 0 1 1 1 1 0 2 3 5 0 1 1 1 1 1 2 1 5 0 1 0 1 0 0 2 3 5 0 1 . 1 0 0 2 3 5 0 1 0 1 1 0 2 3 2 0 2 1 1 1 1 2 3 5 0 1 0 1 0 0 2 3 2 0 1 1 1 0 0 2 3 5 0 . 1 1 1 1 2 3 2 0 2 0 1 1 1 2 3 5 0 3 . 1 1 1 . 3 5 0 4 . 1 1 0 2 3 5 0 1 1 1 0 0 2 2 5 0 2 1 1 1 0 2 3 5 0 . 1 1 1 1 2 3 5 0 . 1 1 1 1 2 3 5 0 . 1 1 0 1 1 1 5 0 1 . 1 1 0 2 3 5 0 1 0 1 1 0 2 3 5 0 4 0 0 1 1 2 3 4 0 4 0 1 0 0 2 3 5 0 4 1 1 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values covid4 experiencelab4 label def experiencelab4 0 "Never", modify label def experiencelab4 1 "Experienced", modify label values unofflanguage unofflanguage label def unofflanguage 0 "Official language", modify label def unofflanguage 1 "Non-official language", modify label values women female label def female 0 "Non-female", modify label def female 1 "Female", modify label values lico lico label def lico 0 "Non-low-income", modify label def lico 1 "Low income", modify label values age3 age3 label def age3 1 "18 to 24", modify label def age3 2 "25 to 64", modify label def age3 3 "65 to 87", modify label values education education label def education 1 "High school and below", modify label def education 2 "Trade certificate or diploma", modify label def education 3 "College, CEGEP, Bachelors and higher", modify label values religion2 religion2 label def religion2 1 "Buddhist", modify label def religion2 2 "Christian", modify label def religion2 3 "Other (Hindu, Jewish, Taoism, Other religions)", modify label def religion2 4 "Muslim, Sikh", modify label def religion2 5 "No religious affiliation", modify label values canborn canborn label def canborn 0 "Outside of Canada", modify label def canborn 1 "Inside Canada", modify label values region regionlab label def regionlab 1 "Central", modify label def regionlab 2 "Western", modify label def regionlab 3 "Prairies", modify label def regionlab 4 "Northern & Atlantic", modify
Code:
quietly logit covid4 ib0.unofflanguage##ib0.women ib0.lico ib1.age3 ib3.education ib5.religion2 ib1.canborn ib1.region set scheme meta coefplot, drop(_cons) xline(1) eform xtitle(Odds ratio) headings(ib0.unofflanguage##ib0.women = "{bf:Interaction term}" ib0.lico ="{bf:Income status}" ib1.age3 ="{bf:Age group}" ib3.education ="{bf:Education level}" ib5.religion2 ="{bf:Religious identity}" ib1.canborn ="{bf:Country of birth}" ib1.region ="{bf:Region}", labcolor(orange))
Thank you!
Comment