Skip to contents

Formula: P(G = g) = exp(theta' s(g)) / kappa(theta), the Markov graph family of Frank & Strauss (1986).

Usage

Ergmod(G, statistics = "edges", theta_init = NULL, iters = 100, tol = 1e-11)

Arguments

G

Symmetric 0/1 adjacency matrix with zero diagonal.

statistics

Any of "edges", "twostar", "triangle".

theta_init

Starting values for Newton-Raphson (default zeros).

iters

Maximum Newton steps.

tol

Convergence tolerance on the coefficient change.

Value

List with estimate, theta, se, observed_stats, pseudo_loglik, n_dyads, iters_used, n, method.

Details

Fitted by MAXIMUM PSEUDO-LIKELIHOOD. The normalising constant kappa is intractable, so the full likelihood needs MCMC; the pseudo-likelihood replaces it with the product of the conditional dyad probabilities, each exactly logistic in the CHANGE STATISTICS delta_ij = s(g with edge ij) - s(g without), logit P(A_ij = 1 | rest) = theta' delta_ij, so the fit is an ordinary logistic regression over the C(n,2) dyads solved by Newton-Raphson. Deterministic and exact – no sampler – and the standard starting value for the MCMC-MLE of Hunter & Handcock (2006). It is NOT the MLE; for dependent terms the pseudo-likelihood estimate is biased, which is precisely why that paper exists.

References

Frank & Strauss (1986), JASA 81(395):832-842, doi:10.2307/2289017; Hunter & Handcock (2006), Journal of Computational and Graphical Statistics 15(3):565-583, doi:10.1198/106186006X133069.

Examples

G <- matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3, 3, byrow = TRUE)
Ergmod(G, statistics = "edges", iters = 20)
#> $estimate
#> [1] 0.6931472
#> 
#> $theta
#> [1] 0.6931472
#> 
#> $se
#> [1] 1.224745
#> 
#> $observed_stats
#> [1] 2
#> 
#> $pseudo_loglik
#> [1] -1.909543
#> 
#> $n_dyads
#> [1] 3
#> 
#> $iters_used
#> [1] 5
#> 
#> $n
#> [1] 3
#> 
#> $method
#> [1] "Exponential random graph model (MPLE)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"