Hi, I want to compare the coefficient on one variable (i.e. IndVar) from the regressions based on two subsamples .
reghdfe DepVar IndVar ControlVar Tone>Median, absorb(sic2 fyear) cluster(gvkey)
reghdfe DepVar IndVar ControlVar Tone<Median, absorb(sic2 fyear) cluster(gvkey)
I was suggested to use the following code:
gen byte largetone = Tone > Median if Tone < . reghdfe DepVar i.largetone##(c.IndVar c.ControlVar) , absorb(sic2 fyear) cluster(gvkey)
The test reported next to the interaction term between 1.largetone and lndVar is the test I am looking for.
1. As an alternative method, can I use the following regression and look at the coefficient of the interaction term?
reghdfe DepVar i.largetone (or any indicator variable used to identify subgroups)##c.IndVar ControlVar, absorb(sic2 fyear) cluster(gvkey)
Does this regression aim to achieve different goals compared to the one I was suggested initially?
2. If I want to run subsample regressions separately, such as the models below:
reghdfe DepVar IndVar ControlVar if tone>median_tone, absorb(sic2 fyear) cluster(gvkey)
reghdfe DepVar IndVar ControlVar if tone<median_tone, absorb(sic2 fyear) cluster(gvkey)
Do I need to put the variable, tone, in these regressions as a control variable?
Related Posts with T-tests and regressions
How to split numeric variables based on ruleHi Stata folks, I am working on a dataset where each ID is associated with a numeric value comprised…
Download (install) all packages in SSC?Dear All, Is it possible to install all the packages in SSC using one simple command (whatever that …
subtracting datesPlease help. In my data set the dates are in the format: 17dec2016 00:00:00. I am trying to subtract…
How to fix "repeated time values within panel"Now I have data like:
hhid geo
1 1
1 1
2 2
2 2
3 3
3 3
And I use command "xtset hhid geo", there is…
Combining two variables into one decimalHi all, I'm sure this is a relatively easy thing to do once you know the syntax, but essentially I h…
Subscribe to:
Post Comments (Atom)
0 Response to T-tests and regressions
Post a Comment