ergm | Diagnose Exponential-Family Models
kandi X-RAY | ergm Summary
kandi X-RAY | ergm Summary
An integrated set of tools to analyze and simulate networks based on exponential-family random graph models (ERGMs). 'ergm' is a part of the Statnet suite of packages for network analysis. See Hunter, Handcock, Butts, Goodreau, and Morris (2008) doi:10.18637/jss.v024.i03 and Krivitsky, Hunter, Morris, and Klumb (2021) arXiv:2106.04997.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ergm
ergm Key Features
ergm Examples and Code Snippets
Community Discussions
Trending Discussions on ergm
QUESTION
I'm having trouble estimating the standard errors from the predicted probabilities from a ERGM model, to calculate a confidence interval. Getting the predicted probabilities is not a problem, but I want to get a sense of the uncertainty surrounding the predictions.
Below is a reproduceable example based on the data set of marriage and business ties among Renaissance Florentine families.
...ANSWER
Answered 2021-Mar-25 at 03:50This is the correct interpretation for a dyad-independent model such as this one. For a dyad-dependent model, it would be the conditional probability given the rest of the network.
You can obtain the standard error of the prediction on the logit scale by rewriting your last line as a dot product of a weight vector and the coefficient vector:
QUESTION
I am trying to run an exponential random graph model (ergm) on a weighted network (network_ex). This network shows the interactions between individuals in four different groups. Interactions between groups cannot occur so a blockdiagonal constraint needs to be included in the model. However when I include the blockdiagonal constraint the ergm function (that runs otherwise) returns an error (see below) and my R session either runs indefinitely or abort directly.
Is there a way to run an ergm based on a weighted block diagonal matrix?
...ANSWER
Answered 2021-Mar-24 at 02:10That does appear to be a bug. I've fixed it in the latest development version. These can be obtained by going to https://github.com/statnet/ergm and https://github.com/statnet/ergm.count and either using install_github() or downloading the binaries found in the README. Note, also that, the blockdiag() constraint has been provisionally moved to https://github.com/statnet/tergm .
QUESTION
I'm loading in the florentine dataset using the code below and trying to visualise the network:
...ANSWER
Answered 2021-Feb-04 at 17:56# ?igraph.plotting
plot(marriages, vertex.label = V(marriages)$vertex.names)
QUESTION
I'm trying this code to regenerate this function to plot a network based on this link work, I know some functions are deprecated, I replaced opts with theme, but I got error with theme_rect
...ANSWER
Answered 2020-Dec-18 at 02:38Perhaps you could rewrite the 'theme' section to something like this:
QUESTION
In the ergm
and latentnet
packages, they allow us to input a network and specify covariates. Then, we can add in effects like homophily and clustering (in the latentnet
package). It seems there are two branches of applications here:
1) Have existing data/network, and want to see how it performs and how much homophily, clustering exists.
2) Do NOT have existing data, and want to generate from scratch a network that has enough homophily and clustering to our liking.
All of the examples in the above packages work with an existing dataset, samplike
, which is the Sampson Monk Data. In the case that I am solely interested in generating a network with a given amount of homophily and clustering, what is the input network I should put in? For example, from code adapted:
ANSWER
Answered 2019-Feb-21 at 20:18In ergm
you would start with the 100 node network without edges. For example:
QUESTION
I am estimating networks with ERGMs using the statnet suite in R. I would like to visualize the network using the igraph package with size by degree centrality and node color by leadership position. For explanation: it's a shared leadership network and I want to visualize whether an individual has a formal leadership position (LSPosition = 1), visualized in black, or not (LSPosition = 0), visualized in white.
This is my code up to now (graphExample is my network, Data_Axample is an actor attribute data set):
...ANSWER
Answered 2018-Sep-23 at 17:04There are two problems here. First, the colors
function lists all of the available colors by name. I think that you are just trying to get a list with the colors "black" and "white. That is simpler than what you tried. All you need is colrs <- c("black","white")
. But according to your description, V(graphExample)$LSPosition
will have values of either 0 or 1. The list colrs
should be indexed by 1 or 2. The simple thing to do would be to simply shift the indices by using
QUESTION
I'm using the ergm
R package to try to find out whether individuals from certain groups are more (or less) likely to form a tie (to interact, in this particular case).
I'm having trouble interpreting the output. In particular, when I use an ergm-term
, e.g., nodefactor()
, what is estimated (if I understand correctly) is the log odds of any tie (i.e., sending or receiving) involving each level of the factor.
For nodemix()
, though, when I don't specify which particular node factor pairings should be included and so all are, there seems to be an order, i.e. a term for the pairing that includes both the Teacher and Administration ties (i.e., mix.profile_code.Teacher.Administration
as well as those that include the Administration and Teacher ties (mix.profile_code.Administration.Teacher
.
My questions:
- does sender/receiver status not matter for
nodefactor()
? Is there a way to specifynodefactor()
for sender and receiver seperately? - for
nodemix(), does the order matter, with the first value in the pair representing the sender, and the second the receiver (i.e., for
mix.profile_code.Teacher.Administration`, Teacher is the sender, and Administration receiver?
ANSWER
Answered 2018-Sep-03 at 07:22I just started using the ergm package, so I can only point out that the package manual lists nodeifactor and nodeofactor, for Factor attribute effect for in-degree and out-edges. As to interpreting them, I'm working on that myself.
QUESTION
I am currently trying to convert a network object to an igraph object. From various posts, I understand the intergraph
package can do this through the asIgraph()
function. I am trying to convert the classic Sampson dataset, which is found in the ergm
package. When I do:
ANSWER
Answered 2018-Jun-07 at 06:10EDIT: See a recent post from two weeks ago on the
ergm
GitHub Fixed the "nominations" attribute of the sampson dataset. This was an error in the sampson dataset that has now been fixed on the GitHub version, but not yet updated to CRAN.
It's failing because the sampson
dataset has an edge attribute nominations
which only has 26 values even though there are 88 edges in the dataset. When intergraph
tries to convert to igraph
it attempts to bind the edge attributes to the edge list with asDF()
and this step fails. The simple thing is to delete the edge attribute like so:
QUESTION
I would like to simulate exponential family random graphs, and I just started learning to use the statnet
and ergm
R packages. From the tutorial I found online, I am able to learn an ERGM model from an example dataset:
ANSWER
Answered 2018-Mar-16 at 19:11You can simulate from a given formula with simulate (or simulate.formula):
QUESTION
I would like to provide more than one graph as input to the equiv.clust function in the sna package. For example
...ANSWER
Answered 2017-Feb-02 at 03:09try entering the graphs as a list, as in:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ergm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page