Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
memoize, last argument wins, how to attach sandwich to Results? #276
I don't know how sandwich covariance matrices, that require arguments should be attached, relevant for cluster/groups and panel/groups.
It would be good to save the covariance for further use for bse calculation, summary(), tests.
related question: arguments everywhere or letting user set a default?
alternative: user has to specify which cov should be used as argument in t_test, f_test and summary
standard usage in most cases will have fixed group, so resetting groups will not happen very often, I expect.
The main one I can think of are nested clusters:
firm level time series, do we cluster by firm, industry or geography?
for short panels, time should also be treated as a group (unweighted aggregate instead of bartlett kernel): in this case time and cross-section would form two groups. It's not clear, whether a user wants to use both or either one.
Stata requires vcv to be specified with regress, and uses globals (last estimate) and memoizes for repeated calls to regress with same model. AFAIU, reading slowly through the User's Guide.
Being able to set the cov options only once (for a result instance) would be convenient, for example Stock/Watson textbook uses HC by default, unless otherwise specified.
One argument in favor of setting a result option in this case is that most users that use specific robust standard errors will be aware of and used to it, so I guess they won't get confused if
changes many of their later results.
referenced this issue
Oct 28, 2013
I'm closing this. I have settled on creating new instances in the "official" usage.