Given node attributes and a network, fits all possible ergms
Examples
get_ergms(example_network, c("site", "genetic_sex"), c("nodematch", "nodemix"))
#> Starting maximum pseudolikelihood estimation (MPLE):
#> Obtaining the responsible dyads.
#> Evaluating the predictor and response matrix.
#> Maximizing the pseudolikelihood.
#> Finished MPLE.
#> Evaluating log-likelihood at the estimate.
#>
#> Starting maximum pseudolikelihood estimation (MPLE):
#> Obtaining the responsible dyads.
#> Evaluating the predictor and response matrix.
#> Maximizing the pseudolikelihood.
#> Finished MPLE.
#> Evaluating log-likelihood at the estimate.
#>
#> Starting maximum pseudolikelihood estimation (MPLE):
#> Obtaining the responsible dyads.
#> Evaluating the predictor and response matrix.
#> Maximizing the pseudolikelihood.
#> Finished MPLE.
#> Evaluating log-likelihood at the estimate.
#>
#> Starting maximum pseudolikelihood estimation (MPLE):
#> Obtaining the responsible dyads.
#> Evaluating the predictor and response matrix.
#> Maximizing the pseudolikelihood.
#> Finished MPLE.
#> Evaluating log-likelihood at the estimate.
#>
#> $`network ~ edges + nodematch('site')`
#>
#> Call:
#> ergm::ergm(formula = stats::as.formula(x))
#>
#> Maximum Likelihood Coefficients:
#> edges nodematch.site
#> -2.423 1.407
#>
#> $`network ~ edges + nodemix('genetic_sex')`
#>
#> Call:
#> ergm::ergm(formula = stats::as.formula(x))
#>
#> Maximum Likelihood Coefficients:
#> edges mix.genetic_sex.F.M mix.genetic_sex.M.M
#> -1.0908 -1.9049 -0.1256
#>
#> $`network ~ edges + nodematch('site') + nodemix('genetic_sex')`
#>
#> Call:
#> ergm::ergm(formula = stats::as.formula(x))
#>
#> Maximum Likelihood Coefficients:
#> edges nodematch.site mix.genetic_sex.F.M
#> -1.6652 1.4935 -2.0266
#> mix.genetic_sex.M.M
#> -0.2293
#>
#> $`network ~ edges`
#>
#> Call:
#> ergm::ergm(formula = stats::as.formula(x))
#>
#> Maximum Likelihood Coefficients:
#> edges
#> -1.807
#>