Hi,
I tried to convert my variable inactive_total into a variable which I could easily plot as seen in this thread
https://www.statalist.org/forums/for...r-on-same-axes
I generated the square root variables by using this code:
generate double sqrt_inactive_pf = sqrt(inactive_total) if procedure==1
generate double sqrt_inactive_tk = sqrt(inactive_total) if procedure==2
Does the output make sense?
As some months ago, I generated another graph, but I hadn't saved the code.
I got the following graph as you can see it's a different scale

I tried to convert my variable inactive_total into a variable which I could easily plot as seen in this thread
https://www.statalist.org/forums/for...r-on-same-axes
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(sqrt_inactive_pf sqrt_inactive_tk) float(inactive_total procedure) 87.88155092047192 . 7723.167 1 . 90.17482477630605 8131.499 2 88.91053372808253 . 7905.083 1 . 81.45755940595691 6635.334 2 86.23080062577698 . 7435.751 1 . . 7667.25 . . 81.59197264437232 6657.25 2 89.88325761786786 . 8079 1 89.20715774077493 . 7957.917 1 . 86.89984469383418 7551.583 2 82.84423330677579 . 6863.167 1 82.89852842858551 . 6872.166 1 . 85.05634621384814 7234.582 2 81.81330571604781 . 6693.417 1 88.98313898395303 . 7917.999 1 87.87348860720166 . 7721.75 1 . 86.03633521113332 7402.251 2 84.60644760632904 . 7158.251 1 . 88.5009434536576 7832.417 2 81.20857718130826 . 6594.833 1 . 87.57996346197 7670.25 2 86.5158888496067 . 7484.999 1 88.99063986945481 . 7919.334 1 . 84.64583269238658 7164.917 2 . 77.71958559060258 6040.334 2 80.86150510479322 . 6538.583 1 . 82.38325072488946 6787 2 . 90.36731143816607 8166.251 2 . 86.28537544465458 7445.166 2 86.8106157552894 . 7536.083 1 86.08280329681126 . 7410.249 1 end label values procedure procedurelbl label def procedurelbl 1 "PF (proximal femur", modify label def procedurelbl 2 "TK (Total Knee)", modify
I generated the square root variables by using this code:
generate double sqrt_inactive_pf = sqrt(inactive_total) if procedure==1
generate double sqrt_inactive_tk = sqrt(inactive_total) if procedure==2
Does the output make sense?
As some months ago, I generated another graph, but I hadn't saved the code.
I got the following graph as you can see it's a different scale
Comment