I have used the following code to generate two seperate graphs. How do I combine the two graphs onto one by generating a 2nd Y-Axis as I'd like to show the relationship of the two line graphs together?
egen meanCEOTotalCompensation = mean(CEOTotalCompensation), by(Year)
egen meanShareholderReturn = mean(ShareholderReturn), by(Year)
egen tag = tag(Year)
twoway connected meanCEOTotalCompensation Year if tag, sort
twoway connected meanShareholderReturn Year if tag, sort
Any help would be greatly appreciated!
Related Posts with How to generate 2nd Y-axis for Having two connected line graphs on one graph
2SLS Panel Data Regression with endogenous First-Stage Binary VariableHello everyone, I hope you all are staying safe out there. I am trying to find a way to build a two…
Weird dfbetas after regress with case specific dummiesHello Statalisters, I noticed some strange behaviour of dfbeta after regress: when I want to correc…
Auditor tenureHello, I would like to calculate the audit tenure. I have read previous treads (e.g. https://www.sta…
Muli-dimensional Fixed effects (reghdfe) vs Random-effectHi, I am conducting research on data that requires me to perform multi-dimensional fixed-effects. S…
LCA - mix of categorical and continuous indicatorsDear Stata Users. Is there a way in Stata to include a mix of categorical and continuous indicators …
Subscribe to:
Post Comments (Atom)
0 Response to How to generate 2nd Y-axis for Having two connected line graphs on one graph
Post a Comment