Dear Statalisters,
I'm currently writing my thesis on the pandemic's effect on loan default rates. I use the Reghdfe command to do a difference-in-differences regression. I account for several fixed effects with the absorb option.
However, I need to perform some diagnostic tests before the regression method is valid (according to my thesis mentor), one of which is the parallel trends assumption.
It is possible if you use a didregress-command but that does not work on my laptop because of the large dataset. But I can't seem to find a way to perform a ptrend-test with the Reghdfe-command.
Is there anyone that can help?
I use the following regression
My data looks like this:
I'm currently writing my thesis on the pandemic's effect on loan default rates. I use the Reghdfe command to do a difference-in-differences regression. I account for several fixed effects with the absorb option.
However, I need to perform some diagnostic tests before the regression method is valid (according to my thesis mentor), one of which is the parallel trends assumption.
It is possible if you use a didregress-command but that does not work on my laptop because of the large dataset. But I can't seem to find a way to perform a ptrend-test with the Reghdfe-command.
Is there anyone that can help?
I use the following regression
Code:
reghdfe default during_covid stringencyindex interaction, a(Country LoanOriginator LoanType issue_month)
My data looks like this:
Code:
Contains data from full_data.dta
Observations: 5,272,633
Variables: 97 23 Feb 2022 10:55
Variable Storage Display Value
name type format label Variable label
Id str12 %12s Id
Country str28 %28s Country
LoanOriginator str28 %28s Loan Originator
MintosRiskScore str2 %9s Mintos Risk Score
LoanType str17 %17s Loan Type
LoanRatePercent double %10.0g Loan Rate Percent
Term int %10.0g Term
Collateral str3 %9s Collateral
InitialLTV long %10.0g Initial LTV
LTV long %10.0g LTV
LoanStatus str21 %21s Loan Status
Buybackreason str22 %22s Buyback reason
InitialLoanAm~t double %10.0g Initial Loan Amount
RemainingLoan~t double %10.0g Remaining Loan Amount
Currency str3 %9s Currency
Buyback str3 %9s Buyback
Extendablesch~e str3 %9s Extendable schedule
LoanOriginato~s str9 %9s Loan Originator Status
InRecovery str3 %9s In Recovery
issue_date float %td
issue_month float %tm
closing_date float %td
closing_month float %tm
listing_date float %td
listing_month float %tm
riskscore float %9.0g
issue_year float %9.0g
default float %9.0g
issue_month_c~k float %9.0g
issue_month_c~2 float %tm
date str8 %9s Date
c1_schoolclos~g byte %8.0g C1_School closing
c2_workplacec~g byte %8.0g C2_Workplace closing
c3_cancelpubl~s byte %8.0g C3_Cancel public events
c4_restrictio~s byte %8.0g C4_Restrictions on gatherings
c5_closepubli~t byte %8.0g C5_Close public transport
c6_stayathome~s byte %8.0g C6_Stay at home requirements
c7_restrictio~n byte %8.0g C7_Restrictions on internal movement
c8_internatio~s byte %8.0g C8_International travel controls
e1_incomesupp~t byte %8.0g E1_Income support
e2_debtcontra~f byte %8.0g E2_Debt/contract relief
e3_fiscalmeas~s double %10.0g E3_Fiscal measures
e4_internatio~t double %12.0g E4_International support
h1_publicinfo~s byte %8.0g H1_Public information campaigns
h2_testingpol~y byte %8.0g H2_Testing policy
h3_contacttra~g byte %8.0g H3_Contact tracing
h4_emergencyi~a double %10.0g H4_Emergency investment in healthcare
h5_investment~s double %12.0g H5_Investment in vaccines
h6_facialcove~s byte %8.0g H6_Facial Coverings
h7_vaccinatio~y byte %8.0g H7_Vaccination policy
h8_protection~e byte %8.0g H8_Protection of elderly people
m1_wildcard byte %8.0g M1_Wildcard
v1_vaccinepri~y byte %8.0g V1_Vaccine Prioritisation (summary)
v2a_vaccineav~y byte %8.0g V2A_Vaccine Availability (summary)
v2b_vaccineag~b str9 %9s V2B_Vaccine age eligibility/availability age floor (general population summary)
v2c_vaccineag~b str9 %9s V2C_Vaccine age eligibility/availability age floor (at risk summary)
v2d_medically~l byte %8.0g V2D_Medically/ clinically vulnerable (Non-elderly)
v2e_education byte %8.0g V2E_Education
v2f_frontline~r byte %8.0g V2F_Frontline workers (non healthcare)
v2g_frontline~e byte %8.0g V2G_Frontline workers (healthcare)
v3_vaccinefin~r byte %8.0g V3_Vaccine Financial Support (summary)
confirmedcases long %12.0g ConfirmedCases
confirmeddeaths long %12.0g ConfirmedDeaths
stringencyindex float %9.0g StringencyIndex
stringencyind~y float %9.0g StringencyIndexForDisplay
stringencyleg~x float %9.0g StringencyLegacyIndex
stringencyleg~y float %9.0g StringencyLegacyIndexForDisplay
governmentres~x float %9.0g GovernmentResponseIndex
governmentres~a float %9.0g GovernmentResponseIndexForDisplay
containmenthe~x float %9.0g ContainmentHealthIndex
containmenthe~y float %9.0g ContainmentHealthIndexForDisplay
economicsuppo~x float %9.0g EconomicSupportIndex
economicsuppo~y float %9.0g EconomicSupportIndexForDisplay
vaccination_t~t float %9.0g
debt_support float %9.0g
income_support float %9.0g
testing float %9.0g
closures float %9.0g
_merge byte %23.0g _merge Matching result from merge
during_covid float %9.0g
ext_schedule float %9.0g
collat float %9.0g
buyback_dummy float %9.0g
indicator str3 %9s INDICATOR
subject str3 %9s SUBJECT
measure str5 %9s MEASURE
frequency str1 %9s FREQUENCY
time str7 %9s TIME
unemployment_~e float %9.0g Value
flagcodes byte %8.0g Flag Codes
unem_date float %td
_merge_2 byte %23.0g _merge Matching result from merge
interaction float %9.0g
late float %9.0g
late15 float %9.0g
late30 float %9.0g
late60 float %9.0g
