I am trying to draw a scatter plot of two variables, after having taken into account fixed effects (state and year). The idea is to analyse the correlation between gonorrhea rates and broadband diffusion so that I ran the following regression

Code:
tsset state year
xtreg gonorrhea internet i.year, fe
Then I collected the residuals using

Code:
predict gonorrhea_res, e
and I plot the residuals against broadband running

Code:
scatter internet gonorrhea_res
Is this the right way to proceed? I tried to follow some other sources but I am not 100% sure about the code I wrote here.