build_exchangeable_matrix: Build an exchangeable matrix of sparseMatrix class

Description Usage Arguments Details Value References See Also Examples

View source: R/matrix_ops.R

Description

Build an exchangeable matrix of sparseMatrix class

Usage

1
build_exchangeable_matrix(n, phi, directed = TRUE, dyads = NULL)

Arguments

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.

dyads

Optional numeric vector of dyads to subset the matrix to.

Details

This function builds a covariance matrix in the exchangeable class from the vector of parameters input. See Marrs et.al. (2017).

Value

out

Exchangeable matrix.

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.

See Also

rphi, invert_exchangeable_matrix

Examples

1
2
n <- 5
build_exchangeable_matrix(n, rphi(n, seed=1))

netregR documentation built on May 1, 2019, 10:13 p.m.