dyadRobust | R Documentation |
This function calculates dyad-robust standard errors via multiway decomposition, proposed by Aronow, Peter M., Cyrus Samii, and Valentina A. Assenova. "Cluster-robust variance estimation for dyadic data." Political Analysis 23.4 (2015): 564-577 (ARXIV
).
dyadRobust(fit, dat, dyadid, egoid, alterid)
fit |
The model object. Should be of type 'lm'. |
dat |
The dataset used to calculate the |
dyadid |
Name of column containing the dyad ID. Must be a character. |
egoid |
Name of column containing the ego ID. Must be a character. |
alterid |
Name of column containing the alter ID. Must be a character. |
Returns a list containing the following components:
bhat |
A |
sehat |
A |
data("dyad.sim")
m <- lm(dY ~ dX,dyad.sim)
out <- dyadRobust(fit = m,
dat = dyad.sim,
dyadid = "dyads",
egoid = "dyad1",
alterid = "dyad2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.