Dear statalists,
I have a data set of treated (employees purchasing stocks through a firm´s stock option scheme) and non-treated (employees not purchasing stocks thorugh a firm´s stock option scheme) individuals with two periods (before and after treatment) and several controls.
Only those employees that purchased stock-options for the first time are considered in the treatment group. Hence, the data set is very unbalances as the control group (non-treatment) is several times larger than the treatment group.
My dependend variable is a count variable of ideas issued to an idea suggestion scheme - so we are interested in whether employees owning stocks are issuing more ideas that employees not owning stocks in the firm.
Variables are:
DV: newidea_a_did_1
treatment dummy: did_eso_treatment
period dummy: period
tnteraction period x treatment: treatment_X_period
+ several controls
I have attached and excerpt of my data below
The question is, can I run a difference in difference regression using nbreg just as I would do it with the common reg command? I think nbreg is more appropriate due to having count data extremely skewed to the left?
reg command: reg newidea_a_did_1 period did_eso_treatment treatment_X_period year fulltime_did_1 size_did_1 dummy_function_1_did_1 dummy_level_1_did_1, vce(robust)
nbreg command: nbreg newidea_a_did_1 period did_eso_treatment treatment_X_period year fulltime_did_1 size_did_1 dummy_function_1_did_1 dummy_level_1_did_1
Thanks for your help!
Felix
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte period long newid int(year newidea_a_did_1) byte(fulltime_did_1 dummy_function_1_did_1 dummy_level_1_did_1) int size_did_1 byte did_eso_treatment float treatment_X_period
0 164876 2014 0 1 0 0 1 0 0
1 12837 2014 0 1 0 0 1 0 0
1 136451 2015 0 1 0 0 1 0 0
1 95503 2013 0 1 0 0 1 0 0
0 148296 2013 0 1 0 0 1 0 0
0 164616 2014 0 1 0 0 1 0 0
1 79008 2011 0 1 0 0 1 0 0
1 113462 2015 0 1 0 0 1 0 0
1 104390 2012 0 1 0 0 1 0 0
0 5472 2012 4 1 0 0 1 0 0
0 129275 2015 0 1 0 0 1 0 0
1 47902 2015 0 1 0 0 1 0 0
1 89282 2013 0 1 0 0 1 0 0
1 154119 2013 0 1 0 0 1 0 0
Related Posts with DID difference in difference for count data using nbreg (negativ binomial)
why the frequency of variables would not change after winsorized?Unlike the trim, which remove the extreme data, the winsor function would replace the extreme data (…
Generating a variable that counts the appearance of a particular value in rolling bases (across rows) Dear Statalist, I am having some difficulties in creating a variable I need. I would greatly a…
time dummies always should be included in iv part in xtabond2?I am now trying to implement xtabond2 for my panel data set spanning from 1998 to 2020. The issue th…
wide to long formatDear All, I have this data set Code: * Example generated by -dataex-. For more info, type help data…
Balance tests in a loop?Hello. I am currently trying to run balance tests in a dataset with respondents from 8 countries. T…
Subscribe to:
Post Comments (Atom)
0 Response to DID difference in difference for count data using nbreg (negativ binomial)
Post a Comment