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
List values of one variable in blocksDear Stata users, I have a name list, and I want to list these names in blocks according to a crite…
balancetable testing differences across multiple subsamplesHello, I am using the balance table command to create a balance table. I would like to report p val…
Calculate the standard deviation of multiple variable at once.Hello, I would like to calculate the mean and the standard deviation of multiple variable at once I…
Export bootest resutls for a number of regressions.Hello, I am using running a simple regression, in a context with few clusters. For robust inference,…
convert panel data from annual to monthly dataHere is my panel data, and I want to convert the dataset from annually to monthly data. So can we re…
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