Hello,
I am trying to understand how binscatter plots work and I have a somewhat general question in case of panel data. For example, let the variables be a, b, and c, for the period from 1990-2020. I would like to do a binscatter of the variable a against the average value of variable b by municipality for each decade, controlling for variable c, something like this:
by municipality decade, sort: gen b_m=mean(b)
binsreg a b_m c, nbins(15) if decade==1990
Given that I want on x axis to have the average value of variable b by municipality, does it make sense to run a simple binsreg like this "binsreg a b_m c, nbins(15) if decade==1990" or do I also need to compute the average values of both of b and c variables before doing binsreg?
Thank you very much for your help.
Related Posts with Binsreg question
How to create a binary variable that identify whether another variable has duplicates in the dataset using Stata?*The dataset is laid out in longitudinal format where the patient id (pid) is the first column, and t…
How to create a binary variable that identify whether another variable has duplicates in the dataset using Stata?*Please help me to delete this post because it is duplicated as above. Thank you! …
Stata histogram HelpHi, I'm attempting to find the 80th percentile of sales transaction totals in stata and graph it. I'…
Interpret IRF scaleDear all, I have got an annual database with a short term interest rate in percent, a long term int…
Mediation: Direct effect greater than the Total effect !Dear all, i hope you are doing good in this period of Covid in my work i have studied the followin…
Subscribe to:
Post Comments (Atom)
0 Response to Binsreg question
Post a Comment