Description Usage Arguments Details Value References See Also Examples

Invert an exchangeable matrix

1 | ```
invert_exchangeable_matrix(n, phi, directed = TRUE)
``` |

`n` |
Number of actors in the network, scalar numeric. |

`phi` |
Appropriate-length vector of parameters, must be length 5 or 6 for directed= |

`directed` |
Optional logical indicator of whether input data is for a directed network, default is |

This function inverts a covariance matrix of the exchangeable class in a manner much faster than the direct inverse, and the computational cost does not scale with n. See Marrs et. al. (2017). This approach will only work for complete networks.

`out` |
Parameters of inverted matrix of exchangeable class. |

Marrs, F. W., Fosdick, B. K., & McCormick, T. H., (2017). Standard errors for regression on relational data with exchangeable errors. arXiv preprint arXiv:1701.05530.

`rphi`

, `build_exchangeable_matrix`

1 2 3 4 5 | ```
n <- 10
phi <- rphi(n, seed=1)
p <- invert_exchangeable_matrix(n, phi)
I1 <- build_exchangeable_matrix(n, phi) %*% build_exchangeable_matrix(n, p)
range(I1 - diag(n*(n-1))) # it works
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.