n: Number of actors in the network, scalar numeric.
phi: Appropriate-length vector of parameters, must be length 5 or 6 for directed=TRUE or length 2 or 3 for directed=FALSE.
directed: Optional logical indicator of whether input data is for a directed network, default is TRUE. Undirected data format is lower triangle of adjacencey matrix.
Returns
out: Parameters of inverted matrix of exchangeable class.
Details
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.
Examples
n <-10phi <- 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
References
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.