I am running an RD regression and would like to tidy it up to export its output into an excel. However, when I try to use the tidy() function:
R2to1RDD = rdd::RDestimate(data = filter(group_by(Affinity_County_Weekly.csv, countyfips, WeekAfterReopening2to1 < 5 & WeekAfterReopening2to1 > -5), Reopening2to1),
changeVsLastWeekSpend ~ WeekAfterReopening2to1,
# | factor(winner1001010) + factor(income_quartile),
cutpoint = 0
#type = "sharp"
)
summary(R2to1RDD)
R2to1RDDDF = tidy(R2to1RDD)
Returns an error:
"Error: No tidy method for objects of class RD" is returned.
Here is the data:
countyfips WeekAfterStimulusPayments changeVsLastWeekSpend
<fct> <dbl> <pseries>
1 1001 -4 -15.0165017
2 1001 -3 -34.1747573
3 1001 -2 11.3569322
4 1001 -1 3.3112583
5 1001 0 1.0256410
6 1001 1 17.6015228
7 1001 2 -1.8236754
8 1001 3 -0.6375027
9 1001 4 16.9800885
10 1003 -4 -7.7897083
Is there any other way to make a data frame out of an regression object, specifically an RD object?