Hello,
Im have created a twoway plot with 2 overlaid linear fit lines using the following code:
twoway (lfitci frailty_fem ageatlastwave) (lfitci frailty_male ageatlastwave, clpattern(dash))
This works fine. However, I want to amend the legend - so i have tried the following but neither work:
twoway (lfitci frailty_fem ageatlastwave) (lfitci frailty_male ageatlastwave, clpattern(dash)) ///
legend(order(1 "linear fit females" 2 "linear fit males"))
twoway (lfitci frailty_fem ageatlastwave) (lfitci frailty_male ageatlastwave, clpattern(dash)) ///
legend(lab(1 "linear fit females") lab(2 "linear fit males"))
Stata gives the following error message:
) required
r(100);
Grateful if someone could advise what I am doing wrong here (ive googled and looked for existing advice on here with no success).
Many thanks
Im have created a twoway plot with 2 overlaid linear fit lines using the following code:
twoway (lfitci frailty_fem ageatlastwave) (lfitci frailty_male ageatlastwave, clpattern(dash))
This works fine. However, I want to amend the legend - so i have tried the following but neither work:
twoway (lfitci frailty_fem ageatlastwave) (lfitci frailty_male ageatlastwave, clpattern(dash)) ///
legend(order(1 "linear fit females" 2 "linear fit males"))
twoway (lfitci frailty_fem ageatlastwave) (lfitci frailty_male ageatlastwave, clpattern(dash)) ///
legend(lab(1 "linear fit females") lab(2 "linear fit males"))
Stata gives the following error message:
) required
r(100);
Grateful if someone could advise what I am doing wrong here (ive googled and looked for existing advice on here with no success).
Many thanks
Comment