Hello!
I have panel data, and I conducted difference in differences to evaluate the effect of a policy on innovation (Patent Count and R&D Expenses).
However, after all the commands, I have a high p-value.
Could someone please look at my codes and see what could cause the high p-values?
I appreciate the help in advance.
Code:
***Import Excel File
import excel "C:\Users\hwanseong.pak\Desktop\STATA Data_v0.2.xlsx", sheet("STATA") cellrange(A1:M3137) firstrow
destring Ticker, replace force
***Set Panel Data
xtset Ticker Year
***Summary Statistics
summarize
***Create DiD Variables
gen post2=1 if Year >= 2018
replace post2=0 if Year < 2018
gen phase2_treated = post2 * Phase2
gen post1=1 if Year <=2017
replace post1=0 if Year > 2017
gen phase1_treated = post1 * Phase1
replace PatentCount = PatentCount+1
gen f_lnPC=ln(f.PatentCount)
replace RDExp = RDExp+1
gen lnRDE = ln(RDExp)
***Lag Control Variables
gen l_lnTA = ln(l.TotalAssets)
gen l_lnTR = ln(l.TotalRevenue)
gen l_HHI = l.HHI
gen l_ROA = l.ROA
gen l_DE = l.DE
gen l_RG = l.RevenueGrowth
drop if Year == 2015
drop if Year == 2022
***Run Fixed Effects DiD Regressions
xtdidregress (f_lnPC phase1_treated l_lnTA l_lnTR l_ROA l_DE l_RG l_HHI Industry) (phase2_treated), group(Ticker) time(Year) aequations
xtdidregress (lnRDE phase1_treated l_lnTA l_lnTR l_ROA l_DE l_RG l_HHI Industry) (phase2_treated), group(Ticker) time(Year) aequations
I have panel data, and I conducted difference in differences to evaluate the effect of a policy on innovation (Patent Count and R&D Expenses).
However, after all the commands, I have a high p-value.
Could someone please look at my codes and see what could cause the high p-values?
I appreciate the help in advance.
Code:
***Import Excel File
import excel "C:\Users\hwanseong.pak\Desktop\STATA Data_v0.2.xlsx", sheet("STATA") cellrange(A1:M3137) firstrow
destring Ticker, replace force
***Set Panel Data
xtset Ticker Year
***Summary Statistics
summarize
***Create DiD Variables
gen post2=1 if Year >= 2018
replace post2=0 if Year < 2018
gen phase2_treated = post2 * Phase2
gen post1=1 if Year <=2017
replace post1=0 if Year > 2017
gen phase1_treated = post1 * Phase1
replace PatentCount = PatentCount+1
gen f_lnPC=ln(f.PatentCount)
replace RDExp = RDExp+1
gen lnRDE = ln(RDExp)
***Lag Control Variables
gen l_lnTA = ln(l.TotalAssets)
gen l_lnTR = ln(l.TotalRevenue)
gen l_HHI = l.HHI
gen l_ROA = l.ROA
gen l_DE = l.DE
gen l_RG = l.RevenueGrowth
drop if Year == 2015
drop if Year == 2022
***Run Fixed Effects DiD Regressions
xtdidregress (f_lnPC phase1_treated l_lnTA l_lnTR l_ROA l_DE l_RG l_HHI Industry) (phase2_treated), group(Ticker) time(Year) aequations
xtdidregress (lnRDE phase1_treated l_lnTA l_lnTR l_ROA l_DE l_RG l_HHI Industry) (phase2_treated), group(Ticker) time(Year) aequations
Comment