From sykim0401 at daum.net Thu Aug 1 18:41:42 2019
From: sykim0401 at daum.net (=?UTF-8?B?7YyM656R?=)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] about valued network
Message-ID: <20190802104142.kJ2RwD57SHeRV6qMlzbJLw@sykim0401.hanmail.net>
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ergm.png
Type: image/png
Size: 20128 bytes
Desc: not available
URL:
From madeinpsj at gmail.com Mon Aug 5 02:46:50 2019
From: madeinpsj at gmail.com (Sejung Park)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] 2-in-star and 2-out-star parameters for valued and
directed network
Message-ID:
Dear All,
I'm trying to calculate 2-in-star and 2-out-star parameters for valued and
directed network.
There's only one node attribute, which is the strength of the tie between
nodes (a frequency of connection).
The Statnet manual and help function in R suggest nodeicovar(2-in-star) and
nodeocovar(2-out-star).
Like other parameters, I tried at least the following examples to know the
parameter effects:
summary(mydata ~ nodeicovar(center=TRUE))
summary(mydata ~ nodeocovar, center=TRUE)
To estimate the model, I put
mydata01 <- ergm(gallaxy ~ edges+nodesqrtcovar)
However, whenever I run the codes, I got an error message as followed:
"Error in locate.InitFunction(term, paste0(termroot, "Term"), "ERGM term",
:
ERGM term ?nodeicovar? initialization function ?InitErgmTerm.nodeicovar?
not found."
Are these correct parameters? If not, please let me know the correct
arguments of the parameters and what it should look like in the model
estimation.
Thank you for your help in advance.
Best,
Sejung Park
--
Sejung Park, Ph.D.
Assistant Professor
Tim Russert Department of Communication & Theatre
John Carroll University
University Heights, Ohio 44118
Associate Editor, *Journal of Contemporary Eastern Asia*
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Anja.Osei at uni-konstanz.de Wed Aug 7 05:02:26 2019
From: Anja.Osei at uni-konstanz.de (Anja Osei)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] Heterophily in political networks
Message-ID:
Dear all,
I am collecting data on political networks, mostly in authoritarian
regimes. I am interested in whether actors belonging to different
political parties discuss/cooperate with each other.
Using ERGMs, it turns out that there is a lot of party homophily. This
is unsurprising. But there is also a considerable number of ties between
the groups. I am now especially interested in the determinants of these
ties, and I have some theoretical expectations (Actors with certain
attributes are more likely to form heterophilous ties).
I have not yet found a solution, and I would be happy about some
suggestions on how to predict cross-party ties.
Best regards,
Anja
--
Dr. Anja Osei
Universit?t Konstanz
FB Politik und Verwaltungswissenschaft
Internationale Politik und Konfliktforschung
Postfach 90
78457 Konstanz
07531-88 2389
Raum D 328
From goodreau at uw.edu Tue Aug 13 13:06:33 2019
From: goodreau at uw.edu (Steven Goodreau)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] Fitting question
In-Reply-To:
References:
Message-ID:
Hi Aditya ---
On first pass I have a few thoughts. First, in the code you sent it
seems you added two terms at once (nodemix gender and nodematch race),
but you don't talk about the gender term in the write-up below.? What
happens without that?
Second, you say the model "does not converge as per the default
specifications."? That isn't too surprising given how large the network
is - I'd expect you need to bump up some of the specifications, most
especially the number of iterations (possibly into the hundreds).? Have
you tried that, either for the base model or the full one?
Beyond that, I wonder if dropping one of the degree terms might help -
perhaps you can already get the distribution fit well without one. But I
really don't think you should have to - I think bumping up the
specifications should be enough.
HTH,
Steve
On 7/30/2019 9:00 AM, Khanna, Aditya [MED] wrote:
> Dear All:
>
> I wanted to follow-up on a brief exchange we had last month right before Sunbelt. I am attempting to fit an ERGM on a directed network with 32K nodes. The ERGM includes a mix of dyadic independent and dependent terms, and the targets for these parameters have been estimated from empirical data. The following model does not converge as per the default specifications, but a network simulated from the fit looks somewhat close:
>
> edges+
> idegree(1:3)+
> odegree(1:3)+
> nodemix("young", base=1) #attribute with two levels
>
> I need to add a race mixing term to this ERGM. We have four race categories. Specifying the mixing matrix using nodemix (with a base cell left out) produces a degenerate model. To try something simpler, I specified a nodematch with differential homophily on race, but the model didn't converge, and the simulated networks from the results were quite different from the target. Details on both fits are available at: https://docs.google.com/document/d/1JBKLihbtemgnyVHN9DpmqCb0NJcOKB5UkdWUAAOnh-I/edit?usp=sharing.
>
> I am looking for any possible thoughts from the group on how to approach this fitting problem, and I would appreciate any suggestions you may have. The most recent emails on this topic are included below.
>
> Many thanks,
> Aditya
>
> ?On 6/17/19, 11:54 AM, "statnet_help on behalf of Khanna, Aditya [MED]" wrote:
>
> Hi Martina,
>
> Thanks so much for your response, and I do apologize for the unfortunate timing of my email. I will be Sunbelt, though for a lot less time than I had originally thought - I fly back to Chicago shortly after my talks on Thursday morning. I'll try to catch you in Montreal, but if we don't get a chance, I'll continue this thread by email.
>
> Many thanks again, and safe travels.
> Aditya
>
> -----Original Message-----
> From: martina morris [mailto:morrism@uw.edu]
> Sent: Friday, June 14, 2019 7:44 PM
> To: Khanna, Aditya [MED]
> Cc: statnet_help@u.washington.edu
> Subject: Re: [statnet_help] Fitting question
>
> Hi Aditya,
>
> You've caught us 4 days before Sunbelt, so I'm not sure how quickly we
> can respond to this. You'll be at Sunbelt, as I recall, so perhaps we
> can talk about this there...
>
> best,
> mm
>
> On Fri, 14 Jun 2019, Khanna, Aditya [MED] wrote:
>
> >
> > Hello All,
> >
> >
> >
> > I am attempting to fit an ERGM on a directed network with 32K nodes. The ERGM includes a mix of dyadic
> > independent and dependent terms, and the targets for these parameters have been estimated from empirical data.
> > The following model does not converge as per the default specifications, but a network simulated from the fit
> > looks somewhat close:
> >
> >
> >
> > edges+
> >
> > idegree(1:3)+
> >
> > odegree(1:3)+
> >
> > nodemix("young", base=1) #attribute with two levels
> >
> >
> >
> > Details on the simulated network from this fit are available in this Google Doc: https://urldefense.proofpoint.com/v2/url?u=https-3A__bit.ly_2KiwK7p&d=DwIDbA&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=GM6MYjSnhhfo7j-Hzuu-XciHRHfOgRD0IxNCKIRCI0U&s=iwvMp9u1ODiki1Y8E4T4zpehGbans2hfdWNh_VovN2Q&e=.
> >
> >
> >
> > I need to add a race mixing term to this ERGM. We have four race categories. Specifying the mixing matrix using
> > nodemix (with a base cell left out) produces a degenerate model. The error message recommends increasing the SAN
> > parameters. A ten-fold increase to SAN.maxit=100, SAN.burnin.times=100 did not help. If race mixing is specified
> > using nodemix when i- and o-degree terms are left out, however, the model does converge.
> >
> >
> >
> > I would appreciate any thoughts on what else I could try to include race mixing in this model. One idea that I
> > thought might help is to specify a combination of nodeifactor and nodeofactor with nodematch, instead of
> > nodemix. I can report back once I have tried that, but in the meanwhile I would appreciate any suggestions on
> > alternate specifications.
> >
> >
> >
> > Many thanks,
> > Aditya
> >
> >
> >
> > --
> >
> > Aditya Khanna (Webpage)
> >
> > Research Assistant Professor
> >
> > Director of Network Modeling
> >
> > Chicago Center for HIV Elimination (CCHE)
> >
> > Department of Medicine
> >
> > Division of Biological Sciences
> >
> > University of Chicago
> >
> > 5841 S Maryland Ave - MC 5065
> >
> > Chicago IL 60637
> >
> > office: (773) 834-5635; fax: (773) 702-8998
> >
> >
> >
> > cid:image001.png@01CFCCDE.ACA64EA0 medicine
> >
> > Website: http://hivelimination.uchicago.edu
> > Facebook: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.com_hivelimination&d=DwIDbA&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=GM6MYjSnhhfo7j-Hzuu-XciHRHfOgRD0IxNCKIRCI0U&s=ZuguXMVkAYislw-CD3NkYc57OI3VkDCGhMfvh6NizLg&e=
> > Twitter: @HIVElimination
> >
> >
> >
> >
> >
>
> ****************************************************************
> Professor of Sociology and Statistics
> Box 354322
> University of Washington
> Seattle, WA 98195-4322
>
> Office: (206) 685-3402
> Dept Office: (206) 543-5882, 543-7237
> Fax: (206) 685-7419
>
> morrism@u.washington.edu
> https://urldefense.proofpoint.com/v2/url?u=http-3A__faculty.washington.edu_morrism_&d=DwIDbA&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=GM6MYjSnhhfo7j-Hzuu-XciHRHfOgRD0IxNCKIRCI0U&s=5qk0lq0PCNC170DcTJQxlVURmZEOXKONKnflAVO1C90&e=
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman13.u.washington.edu_mailman_listinfo_statnet-5Fhelp&d=DwIFAw&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=4n9TD1-SDcwp-vutLN2gcez8fA5Cda6z4tTkX6tRKBI&s=ey98wqwN0VNOly93GZSW-3PgCGuygEENOCbbhde8l_M&e=
>
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
--
*****************************************************************
Steven M. Goodreau / Professor / Dept. of Anthropology
Physical address: Denny Hall M236
Mailing address: Campus Box 353100 / 4216 Memorial Way NE
Univ. of Washington / Seattle WA 98195
1-206-685-3870 (phone) /1-206-543-3285 (fax)
http://faculty.washington.edu/goodreau
*****************************************************************
From goodreau at uw.edu Tue Aug 13 13:31:52 2019
From: goodreau at uw.edu (Steven Goodreau)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] ergm.userterms advice: dyad-independent term not
coinciding with logistic regression results
In-Reply-To:
References:
Message-ID: <5278b445-eb8c-ba03-75e8-762f920585c1@uw.edu>
Hi Momin -
I think I've found your issue. Short version: you should make the
following changes throughout your code:
INPUT_PARAM[t] -> INPUT_PARAM[t+1]
INPUT_PARAM[h] -> INPUT_PARAM[h+1]
Longer answer:
INPUT_PARAM is pulling in parameter values from the vector passed in
from R by position.? A trick in this is that R indexes vectors beginning
with 1 and C does so beginning with 0.
In the example you're building off of, there just happens to be one
parameter passed (pow) followed by the vector of attributes.? The
positions of these are thus:
in R: position 1 = pow, position 2:(n+1) = attribute values for nodes 1
through n
in C: position 0 = pow, position 1:(n) = attribute values for nodes 1
through n
From this code, it is easy to think that the macro INPUT_PARAM[x] is
written to always get the attribute value for node x, but really it's
designed to get the parameter in position x; it just happens that in the
above case those line up.
In your term, you've added in an additional parameter, making the
positions as follows:
in R: position 1 = p1, 2 = p2, position 3:(n+2) = attribute values for
nodes 1 through n
in C: position 0 = p1, 1 = p2, position 2:(n+1) = attribute values for
nodes 1 through n
So now to get the attribute values for node t, you need INPUT_PARAM[t+1]
Everything else looks good from my quick perusal, so hopefully that will
fix it.
FYI - the ergm_userterms workshop materials may be useful as you go
beyond this - they're available at
https://github.com/statnet/Workshops/wiki. And indeed, the issue about
indexing and the interpretation of the INPUT_PARAM macro is something we
knew is a sticking point, so we talk about it in there.
As for the sign handling, if you're referring to CHANGE_STAT[0] +=
IS_OUTEDGE(t,h) ? -change : change;
then this is the line that checks to see if the tie already exists (in
which case it's being dissolved so this particular change stat goes
down) or doesn't already exist (in which case it's being formed so this
particular change stat goes up).? Note that this simple relationship
(tie dissolution decreases change stat by x, tie formation increases
change stat by x) holds for many, but not all, terms. (My favorite
counter-example is degree 0).
HTH,
Steve
On 7/28/2019 5:09 PM, Momin M. Malik wrote:
> I've written an ergm userterm for the /product/ of two node
> covariates, as an interaction effect for continuous covariates.
>
> As a check, I did a logistic regression for comparison. The outputs
> are close but not perfectly equal, which makes me nervous, since as I
> understand the statnet estimation defaults to the built-in glm if all
> terms are dyad-independent. I'm hoping to get advice about what might
> be going wrong.
>
> *Details:*
> Here's my changestat. I modeled it on d_absdiff, although I see that
> d_diff has some sign handling which I don't fully understand (other
> than handling pow==0.0, which I could do to improve this).
> CHANGESTAT_FN(d_prod) {
> ? ? double change, p1, p2; Vertex t, h; int i;
> ZERO_ALL_CHANGESTATS(i);
> FOR_EACH_TOGGLE(i) {
> t = TAIL(i); h = HEAD(i);
> p1 = INPUT_PARAM[0];
> p2 = INPUT_PARAM[1];
> if((p1==1.0)&&(p2==1.0)) {
> change = INPUT_PARAM[t]*INPUT_PARAM[h];
> } else {
> change = pow(INPUT_PARAM[t], p1)*pow(INPUT_PARAM[h], p2);
> }
> CHANGE_STAT[0] += IS_OUTEDGE(t,h) ? -change : change;
> TOGGLE_IF_MORE_TO_COME(i);
> }
> UNDO_PREVIOUS_TOGGLES(i);
> }
>
> and the respective InitErgmTerm:
> InitErgmTerm.prod <- function(nw, arglist, ...) {
> ? a <- check.ErgmTerm(nw, arglist, directed = NULL, bipartite = NULL,
> ? ? ? ? ? ? ? ? ? ? ? varnames = c("attrname", "pow1", "pow2"),
> ? ? ? ? ? ? ? ? ? ? ? vartypes = c("character", "numeric", "numeric"),
> ? ? ? ? ? ? ? ? ? ? ? defaultvalues = list(NULL, 1, 1),
> ? ? ? ? ? ? ? ? ? ? ? required = c(TRUE, FALSE, FALSE))
> ? nodecov <- get.node.attr(nw, a$attrname)
> ? list(name = "prod",
> ? ? ? ?coef.names = paste(paste("prod", if(!((a$pow1 == 1) &
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(a$pow2 == 1)))
> ? ? ? ? ?paste(a$pow1, a$pow2, sep = ",") else "", sep = ""),
> ? ? ? ? ?a$attrname, sep = "."),
> ? ? ? ?pkgname = "ergm.userterms",
> ? ? ? ?inputs = c(a$pow1, a$pow2, nodecov),
> ? ? ? ?dependence = FALSE)
> }
>
>
> I'm testing with the Lazega lawyers data:
> temp <- tempfile()
> download.file("https://www.stats.ox.ac.uk/~snijders/siena/LazegaLawyers.zip",temp)
> A <- as.matrix(read.table(unz(temp, "ELfriend.dat")))
> node <- read.table(unz(temp, "ELattr.dat"))
> names(nodes) <- c("seniority",
> ? ? ? ? ? ? ? ? ? "status",
> ? ? ? ? ? ? ? ? ? "sex",
> ? ? ? ? ? ? ? ? ? "office",
> ? ? ? ? ? ? ? ? ? "tenure",
> ? ? ? ? ? ? ? ? ? "age",
> ? ? ? ? ? ? ? ? ? "practice",
> ? ? ? ? ? ? ? ? ? "lawschool")
> n <- nrow(A)
> df <- data.frame(from = rep(1:n, times = n),
> ? ? ? ? ? ? ? ? ?to = rep(1:n, each = n)) # Create a data frame of
> edges, *with* self-loops
> df$y <- as.vector(A)
> df$from.tenure <- rep(nodes$tenure, times = n)
> df$to.tenure <- rep(nodes$tenure, each = n)
> df$diff.tenure <- from.tenure - to.tenure
> df$prod.tenure <- from.tenure*to.tenure
> df <- df[df$from != df$to,] # eliminate self-loops
>
> colnames(A) <- NULL
> lazega <- network(A, directed = T)
> lazega %v% "tenure" <- nodes$tenure
>
> Now, if I use existing dyad-independent terms in the ERGM,
> erg.0 <- ergm(lazega ~ edges + diff("tenure"))
> glm.0 <- glm(y ~ diff.tenure, data = df, family = binomial)
>
> ?as expected, I get identical (up to 4 significant figures) estimates,
> standard errors, z-values, p-values.
> Monte Carlo MLE Results:
> ? ? ? ? ? ? ? ? ?Estimate Std. Error MCMC % z value Pr(>|z|)
> edges ? ? ? ? ? -2.035528 ? 0.044414 ? ? ?0 -45.831 <1e-04 ***
> diff.t-h.tenure -0.004860 ? 0.003266 ? ? ?0 ?-1.488 ?0.137
>
> Coefficients:
> ? ? ? ? ? ? ?Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.035528 ? 0.044413 -45.832 ? <2e-16 ***
> diff.tenure -0.004860 ? 0.003266 ?-1.488 ? ?0.137
>
> But now, when I try out a model with own term, after doing all the R
> CMD build and R CMD INSTALL:
> erg.1 <- ergm(lazega ~ edges + prod("tenure"))
> glm.1 <- glm(y ~ prod.tenure, data = df, family = binomial)
> summary(erg.1)
> summary(glm.1)
>
> The results I get are substantively the same, although now agree only
> to 1 significant figure.
> > summary(erg.1)
> ==========================
> Summary of model fit
> ==========================
>
> Formula: ? lazega ~ edges + prod("tenure")
>
> Iterations: ?4 out of 20
>
> Monte Carlo MLE Results:
> ? ? ? ? ? ? ?Estimate Std. Error MCMC % z value Pr(>|z|)
> edges ? ? ? -2.248700 ? 0.055002 ? ? ?0 -40.884 <1e-04 ***
> prod.tenure ?0.001659 ? 0.000215 ? ? ?0 ? 7.717 <1e-04 ***
> ---
> Signif. codes: ?0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>
> ? ? ?Null Deviance: 6890 ?on 4970 ?degrees of freedom
> ?Residual Deviance: 3508 ?on 4968 ?degrees of freedom
>
> AIC: 3512 ? ?BIC: 3525 ? ?(Smaller is better.)
>
> > summary(glm.1)
>
> Call:
> glm(formula = y ~ prod.tenure, family = binomial, data = df)
>
> Deviance Residuals:
> ? ? Min ? ? ? 1Q ? Median ? ? ? 3Q ? ? ?Max
> -1.0014 ?-0.4800 ?-0.4536 ?-0.4445 ? 2.1798
>
> Coefficients:
> ? ? ? ? ? ? ? Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.2800416 ?0.0553773 -41.173 ? <2e-16 ***
> prod.tenure ?0.0018658 ?0.0002116 ? 8.819 ? <2e-16 ***
> ---
> Signif. codes: ?0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>
> (Dispersion parameter for binomial family taken to be 1)
>
> ? ? Null deviance: 3561.1 ?on 4969 ?degrees of freedom
> Residual deviance: 3492.1 ?on 4968 ?degrees of freedom
> AIC: 3496.1
>
> Number of Fisher Scoring iterations: 4
>
> Any help or advice is appreciated! This is my first foray into
> ergm.userterms.
>
> Momin
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
--
*****************************************************************
Steven M. Goodreau / Professor / Dept. of Anthropology
Physical address: Denny Hall M236
Mailing address: Campus Box 353100 / 4216 Memorial Way NE
Univ. of Washington / Seattle WA 98195
1-206-685-3870 (phone) /1-206-543-3285 (fax)
http://faculty.washington.edu/goodreau
*****************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From morrism at uw.edu Wed Aug 14 10:04:13 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] Fitting question
In-Reply-To:
References:
Message-ID:
Hi Aditya,
We're estimating with popsizes of 50K, so it can be done. We've learned a
bit about how to diagnose issues.
If you haven't already done this,
1. i'm a bit worried about the nodemix + edges + nodematch getting close
to (or actually being) overparameterized. so think through whether you
have the degrees of freedom for this specification.
assuming that's ok...
2. check the summary netstats for all terms, to make sure there are not
problems.
3. as SMG suggests, add one term at a time to see if you can isolate the
problem.
4. look at the mcmc.diagnostics, to make sure the models have converged
properly. esp. if you have some small grps in this large popn, you may
need to use much larger intervals to get convergence.
5. when you send us output, we need to see the actual output from the
fitting process -- any warnings etc. and the fit summary (i.e.:
summary(fitobject). and it helps alot to see the mcmc.diagnostics.
best,
mm
On Tue, 13 Aug 2019, Steven Goodreau wrote:
> Hi Aditya ---
>
> On first pass I have a few thoughts. First, in the code you sent it seems you
> added two terms at once (nodemix gender and nodematch race), but you don't
> talk about the gender term in the write-up below.? What happens without that?
>
> Second, you say the model "does not converge as per the default
> specifications."? That isn't too surprising given how large the network is -
> I'd expect you need to bump up some of the specifications, most especially
> the number of iterations (possibly into the hundreds).? Have you tried that,
> either for the base model or the full one?
>
> Beyond that, I wonder if dropping one of the degree terms might help -
> perhaps you can already get the distribution fit well without one. But I
> really don't think you should have to - I think bumping up the specifications
> should be enough.
>
> HTH,
> Steve
>
>
> On 7/30/2019 9:00 AM, Khanna, Aditya [MED] wrote:
>> Dear All:
>>
>> I wanted to follow-up on a brief exchange we had last month right before
>> Sunbelt. I am attempting to fit an ERGM on a directed network with 32K
>> nodes. The ERGM includes a mix of dyadic independent and dependent terms,
>> and the targets for these parameters have been estimated from empirical
>> data. The following model does not converge as per the default
>> specifications, but a network simulated from the fit looks somewhat close:
>>
>> edges+
>> idegree(1:3)+
>> odegree(1:3)+
>> nodemix("young", base=1) #attribute with two levels
>>
>> I need to add a race mixing term to this ERGM. We have four race
>> categories. Specifying the mixing matrix using nodemix (with a base cell
>> left out) produces a degenerate model. To try something simpler, I
>> specified a nodematch with differential homophily on race, but the model
>> didn't converge, and the simulated networks from the results were quite
>> different from the target. Details on both fits are available at:
>> https://docs.google.com/document/d/1JBKLihbtemgnyVHN9DpmqCb0NJcOKB5UkdWUAAOnh-I/edit?usp=sharing.
>>
>> I am looking for any possible thoughts from the group on how to approach
>> this fitting problem, and I would appreciate any suggestions you may have.
>> The most recent emails on this topic are included below.
>>
>> Many thanks,
>> Aditya
>>
>> ?On 6/17/19, 11:54 AM, "statnet_help on behalf of Khanna, Aditya [MED]"
>> > akhanna@medicine.bsd.uchicago.edu> wrote:
>>
>> Hi Martina,
>> Thanks so much for your response, and I do apologize for the
>> unfortunate timing of my email. I will be Sunbelt, though for a lot less
>> time than I had originally thought - I fly back to Chicago shortly after my
>> talks on Thursday morning. I'll try to catch you in Montreal, but if we
>> don't get a chance, I'll continue this thread by email.
>> Many thanks again, and safe travels.
>> Aditya
>> -----Original Message-----
>> From: martina morris [mailto:morrism@uw.edu]
>> Sent: Friday, June 14, 2019 7:44 PM
>> To: Khanna, Aditya [MED]
>> Cc: statnet_help@u.washington.edu
>> Subject: Re: [statnet_help] Fitting question
>> Hi Aditya,
>> You've caught us 4 days before Sunbelt, so I'm not sure how
>> quickly we
>> can respond to this. You'll be at Sunbelt, as I recall, so perhaps we
>> can talk about this there...
>> best,
>> mm
>> On Fri, 14 Jun 2019, Khanna, Aditya [MED] wrote:
>> >
>> > Hello All,
>> >
>> >
>> >
>> > I am attempting to fit an ERGM on a directed network with 32K nodes.
>> The ERGM includes a mix of dyadic
>> > independent and dependent terms, and the targets for these
>> parameters have been estimated from empirical data.
>> > The following model does not converge as per the default
>> specifications, but a network simulated from the fit
>> > looks somewhat close:
>> >
>> >
>> >
>> > edges+
>> >
>> > idegree(1:3)+
>> >
>> > odegree(1:3)+
>> >
>> > nodemix("young", base=1) #attribute with two levels
>> >
>> >
>> >
>> > Details on the simulated network from this fit are available in this
>> Google Doc:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bit.ly_2KiwK7p&d=DwIDbA&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=GM6MYjSnhhfo7j-Hzuu-XciHRHfOgRD0IxNCKIRCI0U&s=iwvMp9u1ODiki1Y8E4T4zpehGbans2hfdWNh_VovN2Q&e=.
>> >
>> >
>> >
>> > I need to add a race mixing term to this ERGM. We have four race
>> categories. Specifying the mixing matrix using
>> > nodemix (with a base cell left out) produces a degenerate model. The
>> error message recommends increasing the SAN
>> > parameters. A ten-fold increase to SAN.maxit=100,
>> SAN.burnin.times=100 did not help. If race mixing is specified
>> > using nodemix when i- and o-degree terms are left out, however, the
>> model does converge.
>> >
>> >
>> >
>> > I would appreciate any thoughts on what else I could try to include
>> race mixing in this model. One idea that I
>> > thought might help is to specify a combination of nodeifactor and
>> nodeofactor with nodematch, instead of
>> > nodemix. I can report back once I have tried that, but in the
>> meanwhile I would appreciate any suggestions on
>> > alternate specifications.
>> >
>> >
>> >
>> > Many thanks,
>> > Aditya
>> >
>> >
>> >
>> > --
>> >
>> > Aditya Khanna (Webpage)
>> >
>> > Research Assistant Professor
>> >
>> > Director of Network Modeling
>> >
>> > Chicago Center for HIV Elimination (CCHE)
>> >
>> > Department of Medicine
>> >
>> > Division of Biological Sciences
>> >
>> > University of Chicago
>> >
>> > 5841 S Maryland Ave - MC 5065
>> >
>> > Chicago IL 60637
>> >
>> > office: (773) 834-5635; fax: (773) 702-8998
>> >
>> >
>> >
>> > cid:image001.png@01CFCCDE.ACA64EA0 medicine
>> >
>> > Website: http://hivelimination.uchicago.edu
>> > Facebook:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.com_hivelimination&d=DwIDbA&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=GM6MYjSnhhfo7j-Hzuu-XciHRHfOgRD0IxNCKIRCI0U&s=ZuguXMVkAYislw-CD3NkYc57OI3VkDCGhMfvh6NizLg&e=
>> > Twitter: @HIVElimination
>> >
>> >
>> >
>> >
>> >
>> ****************************************************************
>> Professor of Sociology and Statistics
>> Box 354322
>> University of Washington
>> Seattle, WA 98195-4322
>> Office: (206) 685-3402
>> Dept Office: (206) 543-5882, 543-7237
>> Fax: (206) 685-7419
>> morrism@u.washington.edu
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__faculty.washington.edu_morrism_&d=DwIDbA&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=GM6MYjSnhhfo7j-Hzuu-XciHRHfOgRD0IxNCKIRCI0U&s=5qk0lq0PCNC170DcTJQxlVURmZEOXKONKnflAVO1C90&e=
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help@u.washington.edu
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman13.u.washington.edu_mailman_listinfo_statnet-5Fhelp&d=DwIFAw&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=YJkZt1Kj_3QEpjIbPMsRKhBuYwzSaheXr32WdroNv8KZnumyWGDZR6ngZyRvUjOz&m=4n9TD1-SDcwp-vutLN2gcez8fA5Cda6z4tTkX6tRKBI&s=ey98wqwN0VNOly93GZSW-3PgCGuygEENOCbbhde8l_M&e=
>>
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
> --
> *****************************************************************
> Steven M. Goodreau / Professor / Dept. of Anthropology
> Physical address: Denny Hall M236
> Mailing address: Campus Box 353100 / 4216 Memorial Way NE
> Univ. of Washington / Seattle WA 98195
> 1-206-685-3870 (phone) /1-206-543-3285 (fax)
> http://faculty.washington.edu/goodreau
> *****************************************************************
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From kcngae at connect.ust.hk Thu Aug 15 07:55:52 2019
From: kcngae at connect.ust.hk (Ka Chung NG)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] ERGM for p2 model
Message-ID:
Dear Statnet Members,
I have a question about using ergm to estimate a p2 model. I checked ergm.terms and found the sender and receiver effects. However, I cannot figure out how to set them as random effects.
Many thanks !
Best Regards,
Boris Ng
PhD, Department of ISOM, HKUST
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From p.krivitsky at unsw.edu.au Fri Aug 16 02:04:19 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] about valued network
In-Reply-To: <20190802104142.kJ2RwD57SHeRV6qMlzbJLw@sykim0401.hanmail.net>
References: <20190802104142.kJ2RwD57SHeRV6qMlzbJLw@sykim0401.hanmail.net>
Message-ID: <7bacd5e56afd6a6dcfcfa1fcc999a9b17871fb59.camel@unsw.edu.au>
Dear Sungyeun,
This looks like it might be a bug in the term. What versions of ergm and ergm.count are you using?
Best,
Pavel
On Fri, 2019-08-02 at 10:41 +0900, ?? wrote:
Dear all,
I'm analyzing valued network with ergm.
[cid:5e93d208e7a0386fc13a3ee0a4b452955ebf56fa.camel@unsw.edu.au]
When I delete nodeisqrtcovar and nodeosqrtcovar or I use nodesqrtcovar, it worked well.
However I would like to compare the results between valued and bi-valued network.
Hence 1) how can I use nodeisqrtcovar and nodeosqrtcovar?
2) how can I get the results at valued network like indegree and outdegree in the bi-valued network?
3) what is the term in the bi-valued network like nodesqrtcovar in the valued network?
I appreciate your advice and help in advance.
Best regards,
sungyeun
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ergm.png
Type: image/png
Size: 20128 bytes
Desc: ergm.png
URL:
From morrism at uw.edu Fri Aug 16 12:13:18 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] valued ERGM_need helps
In-Reply-To: <20190809031130.M21394@faculty.pccu.edu.tw>
References: <20190809031130.M21394@faculty.pccu.edu.tw>
Message-ID:
Hi Roger,
We do not have GOF implementations for valued ERGMs at this time.
Part of the challenge is that different types of valued ties call for
different types of GoF statistics so GOFs will vary by context. If you
are familiar with R, you can write up a GOF module yourself for your
purposes, using ergm's GOF module as a template. If you do write
something up, and would be willing to share it, we would be happy to
consider adding that to the ergm package.
In general, if the functionality you need is not already built in our
packages, consider making a contribution :). statnet is an open-source
platform, and development of all packages is taking place on GitHub at
https://github.com/statnet/
best,
Martina
On Fri, 9 Aug 2019, RogerChen??? wrote:
> Dear Prof. Morris,
>
> It would be very much appreciated if you could help to look into the question
> below.
>
> I was following a valued ERGM procedure. Then, I got the following
> response:
>
> "Error in gof.ergm(testnet.01, GOF = "model") :
> GoF for valued ERGMs is not implemented at this time"
>
> after I implemented the code:
> ====================================================================
> net1 <- read.csv(file = "201907connet.csv", header=T, row.name=1,
> check.names=F)
> x(net1, attrname= 'strength')
> net1 <- as.network(net1, directed = FALSE, ignore.eval = FALSE,names.eval =
> "strength", loops=FALSE)
>
> nodeInfo <- read.csv (file="201609att_2.csv", header=TRUE,
> stringsAsFactors=FALSE)
> View(nodeInfo)
> netfield1<-network(net1,vertex.attr=(nodeInfo),
> vertex.attrnames=colnames(nodeInfo),
> directed=F, hyper=F, loops=F, multiple=F,
> bipartite=F )
>
> testnet.01<- ergm (netfield1 ? sum+nonzero+
> nodematch("att_full", diff=TRUE, form="sum" )+
> transitiveweights("min", "max", "min"),
> response = "strength", reference = ?Poisson )
>
> plot (gof(testnet.01, GOF= "model"))
> =======================================================
>
> How do I work out a GOF result?
> I have tried to collect answers in google for months, but no luck.
>
> Attached files:
> 201907connet.csv; 201609att_2.csv
>
> My working environment:
> Windows 10
> Version 1903
> os 13862.239
> system 64 x64
> language R
> version R version x64_3.6.0
>
> Sincerely yours
> Roger
> ==============================:)
> Roger S. Chen
> Associate Professor
> Dept of Public Administration and Management
> Chinese Culture University, Taiwan
> Web: http://faculty.pccu.edu.tw/?csr/
> Phone:886-2-28610511-29935
> Mobile: 0956571553
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From carine.pachoud at hotmail.fr Mon Aug 19 02:09:31 2019
From: carine.pachoud at hotmail.fr (Carine Pachoud)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] goodness of fit
Message-ID:
Good morning,
I am Carine Pachoud a PhD student at the Innsbruck University and Cirad. I work on cooperation in mountain areas and I have already written to you last year to resolve a problem for an analysis of an advice network within a producer association in Brazil. This year I am studying an advice network among members of a dairy cooperative in the Dolomites, Italy.
The network is oriented and has 45 nodes and 220 links. The density is 0.11.
I tried to analyze a set of variables: endogenous (mutual, GWESP, GWDSP) and exogenous (size of the farm, seniority in the coop, municipality, member of the board of direction, age, education, etc...).
The model with the lowest AIC retained the following variables: mutual, municipality, cow number, seniority in the coop. However, when it do the GOF function, I can see that the model do not fit... I tried to change some parameters as the number of iterations, but it is the same.
I tried also the GOF with the only exogenous variables (municipality, cow number, seniority in the coop), on directd and undirected network, and the same thing happened.
Moreover when I try to add the terms GWESP and GWDSP (trying to change the different parameters), I always get this message "There may be excessive correlation between model terms, suggesting a poor model for the observed data. If target.stats are specified, try increasing SAN parameters.". I saw in the forum that it could be due to a too high density...
Could you give me some information or tips on what to do to make my model converge?
I enclose a copy of the tables of the nodes and ties.
Carine Pachoud
PhD student
Institut f?r Geographie/Universit?t Innsbruck
UR Green/Cirad
Post-doc
DAFNAE/UNIPD
+33 6 72 15 23 76
[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif] Garanti sans virus. www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: links_primiero.csv
Type: application/vnd.ms-excel
Size: 1445 bytes
Desc: links_primiero.csv
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nodes_primiero_ergm.csv
Type: application/vnd.ms-excel
Size: 3219 bytes
Desc: nodes_primiero_ergm.csv
URL:
From morrism at uw.edu Tue Aug 20 16:17:02 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] goodness of fit
In-Reply-To:
References:
Message-ID:
Hi Carine,
You're right that when networks get dense, this increases the correlation
between the edges term and the gwesp term -- especially gwesp(0). The
reason is because in dense networks the edges are more likely to form
triangles by chance, so each additional edge also adds to the gwesp(0)
count, leading to high correlation in these terms.
What would be helpful to see is the GOF plots you get from the "best
fitting" model.
Can you send these?
best,
mm
On Mon, 19 Aug 2019, Carine Pachoud wrote:
> Good morning,
>
> I am Carine Pachoud a PhD student at the Innsbruck University and Cirad. I work on cooperation in mountain areas and I
> have already written to you last year to resolve a problem for an analysis of an advice network within a producer
> association in Brazil. This year I am studying an advice network among members of a dairy cooperative in the Dolomites,
> Italy.
> The network is oriented and has 45 nodes and 220 links. The density is 0.11.
>
> I tried to analyze a set of variables: endogenous (mutual, GWESP, GWDSP) and exogenous (size of the farm, seniority in
> the coop, municipality, member of the board of direction, age, education, etc...).
>
> The model with the lowest AIC retained the following variables: mutual, municipality, cow number, seniority in the coop.
> However, when it do the GOF function, I can see that the model do not fit... I tried to change some parameters as the
> number of iterations, but it is the same.
> I tried also the GOF with the only exogenous variables (municipality, cow number, seniority in the coop), on directd? and
> undirected network, and the same thing happened.
> Moreover when I try to add the terms GWESP and GWDSP (trying to change the different parameters), I always get this
> message "There may be excessive correlation between model terms, suggesting a poor model for the observed data. If
> target.stats are specified, try increasing SAN parameters.". I saw in the forum that it could be due to a too high
> density...
>
> Could you give me some information or tips on what to do to make my model converge?
>
> I enclose a copy of the tables of the nodes and ties.
>
> Carine Pachoud
>
>
> PhD student
>
> Institut f?r Geographie/Universit?t Innsbruck
>
> UR Green/Cirad
>
> Post-doc
>
> DAFNAE/UNIPD
>
> +33 6 72 15 23 76
>
>
>
> [icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]
> Garanti sans virus. www.avast.com
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From carine.pachoud at hotmail.fr Wed Aug 21 00:40:36 2019
From: carine.pachoud at hotmail.fr (Carine Pachoud)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] goodness of fit
In-Reply-To:
References: ,
Message-ID:
Hi Martina,
thanks a lot for your help. Attached I send you the GOF plots.
best regards,
Carine
________________________________
De : martina morris
Envoy? : mardi 20 ao?t 2019 20:17
? : Carine Pachoud
Cc : statnet_help@u.washington.edu
Objet : Re: [statnet_help] goodness of fit
Hi Carine,
You're right that when networks get dense, this increases the correlation
between the edges term and the gwesp term -- especially gwesp(0). The
reason is because in dense networks the edges are more likely to form
triangles by chance, so each additional edge also adds to the gwesp(0)
count, leading to high correlation in these terms.
What would be helpful to see is the GOF plots you get from the "best
fitting" model.
Can you send these?
best,
mm
On Mon, 19 Aug 2019, Carine Pachoud wrote:
> Good morning,
>
> I am Carine Pachoud a PhD student at the Innsbruck University and Cirad. I work on cooperation in mountain areas and I
> have already written to you last year to resolve a problem for an analysis of an advice network within a producer
> association in Brazil. This year I am studying an advice network among members of a dairy cooperative in the Dolomites,
> Italy.
> The network is oriented and has 45 nodes and 220 links. The density is 0.11.
>
> I tried to analyze a set of variables: endogenous (mutual, GWESP, GWDSP) and exogenous (size of the farm, seniority in
> the coop, municipality, member of the board of direction, age, education, etc...).
>
> The model with the lowest AIC retained the following variables: mutual, municipality, cow number, seniority in the coop.
> However, when it do the GOF function, I can see that the model do not fit... I tried to change some parameters as the
> number of iterations, but it is the same.
> I tried also the GOF with the only exogenous variables (municipality, cow number, seniority in the coop), on directd and
> undirected network, and the same thing happened.
> Moreover when I try to add the terms GWESP and GWDSP (trying to change the different parameters), I always get this
> message "There may be excessive correlation between model terms, suggesting a poor model for the observed data. If
> target.stats are specified, try increasing SAN parameters.". I saw in the forum that it could be due to a too high
> density...
>
> Could you give me some information or tips on what to do to make my model converge?
>
> I enclose a copy of the tables of the nodes and ties.
>
> Carine Pachoud
>
>
> PhD student
>
> Institut f?r Geographie/Universit?t Innsbruck
>
> UR Green/Cirad
>
> Post-doc
>
> DAFNAE/UNIPD
>
> +33 6 72 15 23 76
>
>
>
> [icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]
> Garanti sans virus. www.avast.com
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GOF plots_Carine Pachoud.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 485068 bytes
Desc: GOF plots_Carine Pachoud.docx
URL:
From morrism at uw.edu Wed Aug 21 13:38:11 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] goodness of fit
In-Reply-To:
References: ,
Message-ID:
Long response, because directed networks are more complicated.
What I'm seeing in your GOF plots is this:
* convergence for terms in this model is fine
* underestimates of indegree 0
* underestimates of shared partners 1-4
* overestimates of short geodesics 1-2
The nature of the indegree and shared partner lack of fit suggests a gwesp
term might help. One impact of triad formation is the production of
isolates, so that could potentially fix the indegree distribution.
There are a couple of ways to proceed.
1. Since your network is directed, you probably want to add a directed
version of the gwesp term: dgwesp. The directed versions of triads have
several configurations -- there are a total of 16, but only the 5 most
common are implemented in ergm. From the entry for this term in the
ergm-terms help file:
Outgoing Two-path ("OTP")
vertex k is an OTP shared partner of ordered pair (i,j) iff i->k->j. Also
known as "transitive shared partner".
Incoming Two-path ("ITP")
vertex k is an ITP shared partner of ordered pair (i,j) iff j->k->i. Also
known as "cyclical shared partner"
Outgoing Shared Partner ("OSP")
vertex k is an OSP shared partner of ordered pair (i,j) iff i->k, j->k.
Incoming Shared Partner ("ISP")
vertex k is an ISP shared partner of ordered pair (i,j) iff k->i, k->j.
Reciprocated Two-path ("RTP"}
vertex k is an RTP shared partner of ordered pair (i,j) iff i<->k<->j.
So, this would probably require a bit more diagnostic analysis of your
current model, to assess which of these directed triads your current model
is not predicting well.
We don't have the code in gof to automate this, but you can do it
yourself:
* simulate networks from your current model
* calculate the (nonparametric) desp distributions for each sim, for each
desp type
summary(sim ~ desp(0:20, type="OTP") and for "ITP", etc.
* compare the desp distributions from your network to the desp
distributions from your sims.
2. You could instead use the general gwesp term as you did before. Note
that on a directed network, the term implements the OTP version of the
triads. If you want to go this route, try adding *only* it to the model
and see if you get convergence with different decay settings, I'm guessing
lower values will induce high correlations with the edges term, so look
for something in the 0.2-0.5 range. In theory, you can estimate the decay
parameter as well, but with a single network, there is often not enough
information available. If you had multiple networks, estimation of the
decay parameter is more robust (see our new paper:
https://www.sciencedirect.com/science/article/abs/pii/S0378873318303174)
HTH,
mm
On Wed, 21 Aug 2019, Carine Pachoud wrote:
> Hi Martina,
>
> thanks a lot for your help.? Attached I send you the GOF plots.
>
> best regards,
>
> Carine
>
> _________________________________________________________________________________________________________________________
> De : martina morris
> Envoy? : mardi 20 ao?t 2019 20:17
> ? : Carine Pachoud
> Cc?: statnet_help@u.washington.edu
> Objet : Re: [statnet_help] goodness of fit
> Hi Carine,
>
> You're right that when networks get dense, this increases the correlation
> between the edges term and the gwesp term -- especially gwesp(0).? The
> reason is because in dense networks the edges are more likely to form
> triangles by chance, so each additional edge also adds to the gwesp(0)
> count, leading to high correlation in these terms.
>
> What would be helpful to see is the GOF plots you get from the "best
> fitting" model.
>
> Can you send these?
>
> best,
> mm
>
> On Mon, 19 Aug 2019, Carine Pachoud wrote:
>
> > Good morning,
> >
> > I am Carine Pachoud a PhD student at the Innsbruck University and Cirad. I work on cooperation in mountain areas and I
> > have already written to you last year to resolve a problem for an analysis of an advice network within a producer
> > association in Brazil. This year I am studying an advice network among members of a dairy cooperative in the Dolomites,
> > Italy.
> > The network is oriented and has 45 nodes and 220 links. The density is 0.11.
> >
> > I tried to analyze a set of variables: endogenous (mutual, GWESP, GWDSP) and exogenous (size of the farm, seniority in
> > the coop, municipality, member of the board of direction, age, education, etc...).
> >
> > The model with the lowest AIC retained the following variables: mutual, municipality, cow number, seniority in the
> coop.
> > However, when it do the GOF function, I can see that the model do not fit... I tried to change some parameters as the
> > number of iterations, but it is the same.
> > I tried also the GOF with the only exogenous variables (municipality, cow number, seniority in the coop), on directd
> and
> > undirected network, and the same thing happened.
> > Moreover when I try to add the terms GWESP and GWDSP (trying to change the different parameters), I always get this
> > message "There may be excessive correlation between model terms, suggesting a poor model for the observed data. If
> > target.stats are specified, try increasing SAN parameters.". I saw in the forum that it could be due to a too high
> > density...
> >
> > Could you give me some information or tips on what to do to make my model converge?
> >
> > I enclose a copy of the tables of the nodes and ties.
> >
> > Carine Pachoud
> >
> >
> > PhD student
> >
> > Institut f?r Geographie/Universit?t Innsbruck
> >
> > UR Green/Cirad
> >
> > Post-doc
> >
> > DAFNAE/UNIPD
> >
> > +33 6 72 15 23 76
> >
> >
> >
> > [icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]
> > Garanti sans virus. www.avast.com
> >
> >
>
> ****************************************************************
> ? Professor of Sociology and Statistics
> ? Box 354322
> ? University of Washington
> ? Seattle, WA 98195-4322
>
> ? Office:??????? (206) 685-3402
> ? Dept Office:?? (206) 543-5882, 543-7237
> ? Fax:?????????? (206) 685-7419
>
> morrism@u.washington.edu
> http://faculty.washington.edu/morrism/
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From carine.pachoud at hotmail.fr Thu Aug 22 01:51:25 2019
From: carine.pachoud at hotmail.fr (Carine Pachoud)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] goodness of fit
In-Reply-To:
References: ,
,
Message-ID:
Good Morning,
thanks a lot for your suggestions Martina. It really helped me to understand better how the GWESP term works on directed network.
I tried to implement different decay settings and with 0.5 the goodness of fit was much better!
best regards,
Carine
________________________________
De : martina morris
Envoy? : mercredi 21 ao?t 2019 17:38
? : Carine Pachoud
Cc : statnet_help@u.washington.edu
Objet : RE: [statnet_help] goodness of fit
Long response, because directed networks are more complicated.
What I'm seeing in your GOF plots is this:
* convergence for terms in this model is fine
* underestimates of indegree 0
* underestimates of shared partners 1-4
* overestimates of short geodesics 1-2
The nature of the indegree and shared partner lack of fit suggests a gwesp
term might help. One impact of triad formation is the production of
isolates, so that could potentially fix the indegree distribution.
There are a couple of ways to proceed.
1. Since your network is directed, you probably want to add a directed
version of the gwesp term: dgwesp. The directed versions of triads have
several configurations -- there are a total of 16, but only the 5 most
common are implemented in ergm. From the entry for this term in the
ergm-terms help file:
Outgoing Two-path ("OTP")
vertex k is an OTP shared partner of ordered pair (i,j) iff i->k->j. Also
known as "transitive shared partner".
Incoming Two-path ("ITP")
vertex k is an ITP shared partner of ordered pair (i,j) iff j->k->i. Also
known as "cyclical shared partner"
Outgoing Shared Partner ("OSP")
vertex k is an OSP shared partner of ordered pair (i,j) iff i->k, j->k.
Incoming Shared Partner ("ISP")
vertex k is an ISP shared partner of ordered pair (i,j) iff k->i, k->j.
Reciprocated Two-path ("RTP"}
vertex k is an RTP shared partner of ordered pair (i,j) iff i<->k<->j.
So, this would probably require a bit more diagnostic analysis of your
current model, to assess which of these directed triads your current model
is not predicting well.
We don't have the code in gof to automate this, but you can do it
yourself:
* simulate networks from your current model
* calculate the (nonparametric) desp distributions for each sim, for each
desp type
summary(sim ~ desp(0:20, type="OTP") and for "ITP", etc.
* compare the desp distributions from your network to the desp
distributions from your sims.
2. You could instead use the general gwesp term as you did before. Note
that on a directed network, the term implements the OTP version of the
triads. If you want to go this route, try adding *only* it to the model
and see if you get convergence with different decay settings, I'm guessing
lower values will induce high correlations with the edges term, so look
for something in the 0.2-0.5 range. In theory, you can estimate the decay
parameter as well, but with a single network, there is often not enough
information available. If you had multiple networks, estimation of the
decay parameter is more robust (see our new paper:
https://www.sciencedirect.com/science/article/abs/pii/S0378873318303174)
HTH,
mm
On Wed, 21 Aug 2019, Carine Pachoud wrote:
> Hi Martina,
>
> thanks a lot for your help. Attached I send you the GOF plots.
>
> best regards,
>
> Carine
>
> _________________________________________________________________________________________________________________________
> De : martina morris
> Envoy? : mardi 20 ao?t 2019 20:17
> ? : Carine Pachoud
> Cc : statnet_help@u.washington.edu
> Objet : Re: [statnet_help] goodness of fit
> Hi Carine,
>
> You're right that when networks get dense, this increases the correlation
> between the edges term and the gwesp term -- especially gwesp(0). The
> reason is because in dense networks the edges are more likely to form
> triangles by chance, so each additional edge also adds to the gwesp(0)
> count, leading to high correlation in these terms.
>
> What would be helpful to see is the GOF plots you get from the "best
> fitting" model.
>
> Can you send these?
>
> best,
> mm
>
> On Mon, 19 Aug 2019, Carine Pachoud wrote:
>
> > Good morning,
> >
> > I am Carine Pachoud a PhD student at the Innsbruck University and Cirad. I work on cooperation in mountain areas and I
> > have already written to you last year to resolve a problem for an analysis of an advice network within a producer
> > association in Brazil. This year I am studying an advice network among members of a dairy cooperative in the Dolomites,
> > Italy.
> > The network is oriented and has 45 nodes and 220 links. The density is 0.11.
> >
> > I tried to analyze a set of variables: endogenous (mutual, GWESP, GWDSP) and exogenous (size of the farm, seniority in
> > the coop, municipality, member of the board of direction, age, education, etc...).
> >
> > The model with the lowest AIC retained the following variables: mutual, municipality, cow number, seniority in the
> coop.
> > However, when it do the GOF function, I can see that the model do not fit... I tried to change some parameters as the
> > number of iterations, but it is the same.
> > I tried also the GOF with the only exogenous variables (municipality, cow number, seniority in the coop), on directd
> and
> > undirected network, and the same thing happened.
> > Moreover when I try to add the terms GWESP and GWDSP (trying to change the different parameters), I always get this
> > message "There may be excessive correlation between model terms, suggesting a poor model for the observed data. If
> > target.stats are specified, try increasing SAN parameters.". I saw in the forum that it could be due to a too high
> > density...
> >
> > Could you give me some information or tips on what to do to make my model converge?
> >
> > I enclose a copy of the tables of the nodes and ties.
> >
> > Carine Pachoud
> >
> >
> > PhD student
> >
> > Institut f?r Geographie/Universit?t Innsbruck
> >
> > UR Green/Cirad
> >
> > Post-doc
> >
> > DAFNAE/UNIPD
> >
> > +33 6 72 15 23 76
> >
> >
> >
> > [icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]
> > Garanti sans virus. www.avast.com
> >
> >
>
> ****************************************************************
> Professor of Sociology and Statistics
> Box 354322
> University of Washington
> Seattle, WA 98195-4322
>
> Office: (206) 685-3402
> Dept Office: (206) 543-5882, 543-7237
> Fax: (206) 685-7419
>
> morrism@u.washington.edu
> http://faculty.washington.edu/morrism/
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From lzhao at fas.harvard.edu Thu Aug 22 14:12:48 2019
From: lzhao at fas.harvard.edu (Zhao, Linda)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] hierarchy principle GWESP
Message-ID:
Dear STATNET help,
I'm new at ERGMs and could use some advice. I heard about the "hierarchy principle", in which all subgraphs of a graph need to be included, when reading about SOAM but I'm intending to use ERGMs because of cross-sectional data.
Does this principle also apply ERGMs? My network is directed and I want to include closure (gwesp). Does that mean that I should include all the possible subgraphs, meaning m2star, ostar(2) and istar(2) as well as edges + mutual? In the tutorials that I have been reading it seems that sometimes people just include edges + mutual + gwesp. What I'm curious about is whether this is okay and why, or whether best practices have been updated?
Thanks very much,
Linda
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From morrism at uw.edu Thu Aug 22 16:28:58 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To:
References:
Message-ID:
Hi Linda,
To the extent that the hierarchy principle applies, you would want to
include a gwdegree term (not the star terms), and a gwdsp term (to control
for the two-path prevalence.
But since your network is directed, you need to consider using one of the
directed gw*sp terms, and the gwidegree/odegree. The directed triads have
16 possible configurations, so things get complicated. In the ergm
package we have the 5 most commonly tested configurations available; you
can get more info using help("ergm-terms").
HTH,
Martina
On Thu, 22 Aug 2019, Zhao, Linda wrote:
> Dear STATNET help,
> I'm new at ERGMs and could use some advice. I heard about the?"hierarchy?principle", in which all subgraphs of a graph
> need to be included, when reading about SOAM but I'm intending to use ERGMs because of cross-sectional data.
>
> Does this principle also apply ERGMs? My network is directed and I want to include closure (gwesp).?Does that mean that I
> should include all the possible subgraphs, meaning m2star, ostar(2) and istar(2) as well as edges + mutual? In the
> tutorials that I have been reading it seems that sometimes people just include edges?+ mutual?+ gwesp. What I'm curious
> about is whether this is okay and why, or whether best practices have been updated?
> Thanks very much,
> Linda
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From lzhao at fas.harvard.edu Thu Aug 22 19:37:12 2019
From: lzhao at fas.harvard.edu (Zhao, Linda)
Date: Tue Aug 3 21:58:12 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To:
References:
Message-ID:
Hi Martina,
That's really helpful! Could I follow up on two points and ask just one more (unrelated) question? To follow up:
(1) Could you please point me to a reference that explains the hierarchy principle? I would like to try to understand the intuition better
(2) I am right in understanding gwdegree terms as showing dispersion in popularity - more negative = more dispersion in popularity?
One more question: I am looking through older posts and I see that you helped refer somebody to Pavel Krivitsky's paper on applying offsets to help make dyadic-independent terms comparable across networks (e.g. if you want to compare nodematch coefficients across different networks). How would I apply this? If I apply offset(edges) - what would I need to pass to offset.coef.diss? How would I figure that out? Sorry if that doesn't make sense... I'm not sure I understand what the offset is doing.
Thanks again,
Linda
On Thu, Aug 22, 2019 at 7:29 PM martina morris > wrote:
Hi Linda,
To the extent that the hierarchy principle applies, you would want to
include a gwdegree term (not the star terms), and a gwdsp term (to control
for the two-path prevalence.
But since your network is directed, you need to consider using one of the
directed gw*sp terms, and the gwidegree/odegree. The directed triads have
16 possible configurations, so things get complicated. In the ergm
package we have the 5 most commonly tested configurations available; you
can get more info using help("ergm-terms").
HTH,
Martina
On Thu, 22 Aug 2019, Zhao, Linda wrote:
> Dear STATNET help,
> I'm new at ERGMs and could use some advice. I heard about the "hierarchy principle", in which all subgraphs of a graph
> need to be included, when reading about SOAM but I'm intending to use ERGMs because of cross-sectional data.
>
> Does this principle also apply ERGMs? My network is directed and I want to include closure (gwesp). Does that mean that I
> should include all the possible subgraphs, meaning m2star, ostar(2) and istar(2) as well as edges + mutual? In the
> tutorials that I have been reading it seems that sometimes people just include edges + mutual + gwesp. What I'm curious
> about is whether this is okay and why, or whether best practices have been updated?
> Thanks very much,
> Linda
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From buttsc at uci.edu Thu Aug 22 20:51:53 2019
From: buttsc at uci.edu (Carter T. Butts)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To:
References:
Message-ID: <4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
Hi, Linda -
As a general matter, it is /not/ the case that one should always include
all subgraphs of a given network statistic (whether in SOAMs, ERGMs, or
anything else).? There may be particular settings in which it may make
sense to do this, but it is neither universally necessary nor even
harmless (since adding unnecessary terms can lead to such exciting
problems as overfitting, numerical instability, and poor extrapolative
performance).? Typically, one's goal is to include those terms (and
/only/ those terms) that best approximate the generative process that
produced one's observed network; with rare exceptions, mechanically
including terms by fixed rules that are not informed by the problem at
hand leads one unto ruin and woe.? Unfortunately, rules of that sort are
sometimes promulgated, generally as a well-intentioned effort to give
newcomers heuristics to aid in model building.? In my view, this can do
more harm than good, particularly when the context and/or nuance behind
the use of the heuristic is lost and it morphs into a "rule."? But at
any rate, this heuristic is not one that I would advocate for general use.
Hope that helps,
-Carter
On 8/22/19 2:12 PM, Zhao, Linda wrote:
> Dear STATNET help,
>
> I'm new at ERGMs and could use some advice. I heard about
> the?"hierarchy?principle", in which all subgraphs of a graph need to
> be included, when reading about SOAM but I'm intending to use ERGMs
> because of cross-sectional data.
>
> Does this principle also apply ERGMs? My network is directed and I
> want to include closure (gwesp).?Does that mean that I should include
> all the possible subgraphs, meaning m2star, ostar(2) and istar(2) as
> well as edges + mutual? In the tutorials that I have been reading it
> seems that sometimes people just include edges?+ mutual?+ gwesp. What
> I'm curious about is whether this is okay and why, or whether best
> practices have been updated?
>
> Thanks very much,
> Linda
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From c.e.g.steglich at rug.nl Fri Aug 23 00:07:50 2019
From: c.e.g.steglich at rug.nl (Christian Steglich)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To: <4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
References:
<4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
Message-ID: <67b2f672-c3bd-a3af-f3e2-362eebe428f3@rug.nl>
Dear Linda, Carter, Martina:
let me jump in to articulate a point of view that is much more
sympathetic to the hierarchy principle, as a tool to avoid rushing to a
bad model specification.
The hierarchy principle is I think best understood as a way to guide
your /thinking /about the model specification than to actually /do it/.
It is 100% analogous to the linear regression principle of thinking
about all lower-order interactions as simpler explanations (Occam's
razor) before estimating and interpreting a higher-order interaction
effect. Does that mean you need to include all lower order interactions
in a linear regression? /It depends... /on what the data allow, on what
is statistically possible, but mainly on what makes sense from a subject
matter, theory point of view. Likewise, it depends on these things in
network modelling. Particularly the small single networks that are
traditionally analysed with ERGMs usually do not afford estimation of
big models, so you just cannot do it without invoking statistical damage
as Carter said.
I would summarise Carter's point about approximating the generative
process as "theoretical insights trump statistical orthodoxy", and I
would fully agree. But the problem with many people starting to analyse
networks in my experience is that their theoretical framework on network
mechanisms is very embryonic or even non-existent. So to get back to the
hierarchy principle as a way of /thinking/ rather than /doing/ in your
concrete case, Linda: Before including a closure term, it certainly is
good to think about all the other, nested subgraph effects you
mentioned, and consider whether they make sense and are supported by
prior evidence in your particular research context.
In addition, there are certainly good statistical reasons why
lower-order subgraphs should be included IF (big if) the data set
affords it. For example, if your reason to include the closure term is
that you want to estimate evidence for a transitive closure mechanism,
then this mechanism requires a two-path as input and produces a closed
triangle. A model in which also the prevalence of two-paths (as a
subgraph) is explicitly modelled by including such an effect will
usually stabilise the whole model estimation. (Yes, there may be
exceptions - if the data are in a high density r?gime or so.) In
certer's terms, if the generative process includes closure, then it is
good to also consider how the generative process produces conditions
under which closure can occur. If there are no effects in your model
specification producing these conditions, you will have a bad model. The
hierarchy principle helps you systematically think about this.
All the best, Christian
On 8/23/2019 5:51 AM, Carter T. Butts wrote:
>
> Hi, Linda -
>
> As a general matter, it is /not/ the case that one should always
> include all subgraphs of a given network statistic (whether in SOAMs,
> ERGMs, or anything else).? There may be particular settings in which
> it may make sense to do this, but it is neither universally necessary
> nor even harmless (since adding unnecessary terms can lead to such
> exciting problems as overfitting, numerical instability, and poor
> extrapolative performance).? Typically, one's goal is to include those
> terms (and /only/ those terms) that best approximate the generative
> process that produced one's observed network; with rare exceptions,
> mechanically including terms by fixed rules that are not informed by
> the problem at hand leads one unto ruin and woe.? Unfortunately, rules
> of that sort are sometimes promulgated, generally as a
> well-intentioned effort to give newcomers heuristics to aid in model
> building.? In my view, this can do more harm than good, particularly
> when the context and/or nuance behind the use of the heuristic is lost
> and it morphs into a "rule."? But at any rate, this heuristic is not
> one that I would advocate for general use.
>
> Hope that helps,
>
> -Carter
>
> On 8/22/19 2:12 PM, Zhao, Linda wrote:
>> Dear STATNET help,
>>
>> I'm new at ERGMs and could use some advice. I heard about
>> the?"hierarchy?principle", in which all subgraphs of a graph need to
>> be included, when reading about SOAM but I'm intending to use ERGMs
>> because of cross-sectional data.
>>
>> Does this principle also apply ERGMs? My network is directed and I
>> want to include closure (gwesp).?Does that mean that I should include
>> all the possible subgraphs, meaning m2star, ostar(2) and istar(2) as
>> well as edges + mutual? In the tutorials that I have been reading it
>> seems that sometimes people just include edges?+ mutual?+ gwesp. What
>> I'm curious about is whether this is okay and why, or whether best
>> practices have been updated?
>>
>> Thanks very much,
>> Linda
>>
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
--
------------------------------------------------------------------------
Interuniversity Centre for Social Science Theory & Methodology
Department of Sociology
Grote Rozenstraat 31
NL-9712 TG GRONINGEN
steglich.gmw.rug.nl
------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From buttsc at uci.edu Fri Aug 23 00:52:15 2019
From: buttsc at uci.edu (Carter T. Butts)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To: <67b2f672-c3bd-a3af-f3e2-362eebe428f3@rug.nl>
References:
<4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
<67b2f672-c3bd-a3af-f3e2-362eebe428f3@rug.nl>
Message-ID: <8e74aa64-f8a4-3857-c0a6-a6bc28bd14ca@uci.edu>
Hi, all -
I think this is a very reasonable way to think of the issues, and is
nicely put.? From a conceptual point of view, it is useful to be
reminded that an observed structural bias is sometimes being driven by
something else, and lower-order structures are often a good place to
look.? (Covariate effects, in particular - which are usually
"edge-level" - are often underutilized.? In my experience, many problems
that folks encounter with getting models to converge comes from trying
to use homogeneous clustering forces to explain heterogeneous clustering
that is obviously coming from an exogenous source.)? So I would agree
with the importance of being aware of the nestedness of subgraph
structures in model construction and interpretation, and concur that
this can be useful when thinking about what models to consider.? It's
when this morphs from "a useful tool for thinking about the space of
models" into a "rule for what you must always include in a model
(without consideration of whether it either works in practice or makes
theoretical sense)" that I become concerned.? The tendency for the
former to convert to the latter through retelling is assuredly worth a
study in its own right!? :-)
Best,
-Carter
On 8/23/19 12:07 AM, Christian Steglich wrote:
>
> Dear Linda, Carter, Martina:
>
> let me jump in to articulate a point of view that is much more
> sympathetic to the hierarchy principle, as a tool to avoid rushing to
> a bad model specification.
>
> The hierarchy principle is I think best understood as a way to guide
> your /thinking /about the model specification than to actually /do it/.
>
> It is 100% analogous to the linear regression principle of thinking
> about all lower-order interactions as simpler explanations (Occam's
> razor) before estimating and interpreting a higher-order interaction
> effect. Does that mean you need to include all lower order
> interactions in a linear regression? /It depends... /on what the data
> allow, on what is statistically possible, but mainly on what makes
> sense from a subject matter, theory point of view. Likewise, it
> depends on these things in network modelling. Particularly the small
> single networks that are traditionally analysed with ERGMs usually do
> not afford estimation of big models, so you just cannot do it without
> invoking statistical damage as Carter said.
>
> I would summarise Carter's point about approximating the generative
> process as "theoretical insights trump statistical orthodoxy", and I
> would fully agree. But the problem with many people starting to
> analyse networks in my experience is that their theoretical framework
> on network mechanisms is very embryonic or even non-existent. So to
> get back to the hierarchy principle as a way of /thinking/ rather than
> /doing/ in your concrete case, Linda: Before including a closure term,
> it certainly is good to think about all the other, nested subgraph
> effects you mentioned, and consider whether they make sense and are
> supported by prior evidence in your particular research context.
>
> In addition, there are certainly good statistical reasons why
> lower-order subgraphs should be included IF (big if) the data set
> affords it. For example, if your reason to include the closure term is
> that you want to estimate evidence for a transitive closure mechanism,
> then this mechanism requires a two-path as input and produces a closed
> triangle. A model in which also the prevalence of two-paths (as a
> subgraph) is explicitly modelled by including such an effect will
> usually stabilise the whole model estimation. (Yes, there may be
> exceptions - if the data are in a high density r?gime or so.) In
> certer's terms, if the generative process includes closure, then it is
> good to also consider how the generative process produces conditions
> under which closure can occur. If there are no effects in your model
> specification producing these conditions, you will have a bad model.
> The hierarchy principle helps you systematically think about this.
>
> All the best, Christian
>
>
> On 8/23/2019 5:51 AM, Carter T. Butts wrote:
>>
>> Hi, Linda -
>>
>> As a general matter, it is /not/ the case that one should always
>> include all subgraphs of a given network statistic (whether in SOAMs,
>> ERGMs, or anything else).? There may be particular settings in which
>> it may make sense to do this, but it is neither universally necessary
>> nor even harmless (since adding unnecessary terms can lead to such
>> exciting problems as overfitting, numerical instability, and poor
>> extrapolative performance).? Typically, one's goal is to include
>> those terms (and /only/ those terms) that best approximate the
>> generative process that produced one's observed network; with rare
>> exceptions, mechanically including terms by fixed rules that are not
>> informed by the problem at hand leads one unto ruin and woe.?
>> Unfortunately, rules of that sort are sometimes promulgated,
>> generally as a well-intentioned effort to give newcomers heuristics
>> to aid in model building.? In my view, this can do more harm than
>> good, particularly when the context and/or nuance behind the use of
>> the heuristic is lost and it morphs into a "rule."? But at any rate,
>> this heuristic is not one that I would advocate for general use.
>>
>> Hope that helps,
>>
>> -Carter
>>
>> On 8/22/19 2:12 PM, Zhao, Linda wrote:
>>> Dear STATNET help,
>>>
>>> I'm new at ERGMs and could use some advice. I heard about
>>> the?"hierarchy?principle", in which all subgraphs of a graph need to
>>> be included, when reading about SOAM but I'm intending to use ERGMs
>>> because of cross-sectional data.
>>>
>>> Does this principle also apply ERGMs? My network is directed and I
>>> want to include closure (gwesp).?Does that mean that I should
>>> include all the possible subgraphs, meaning m2star, ostar(2) and
>>> istar(2) as well as edges + mutual? In the tutorials that I have
>>> been reading it seems that sometimes people just include edges?+
>>> mutual?+ gwesp. What I'm curious about is whether this is okay and
>>> why, or whether best practices have been updated?
>>>
>>> Thanks very much,
>>> Linda
>>>
>>> _______________________________________________
>>> statnet_help mailing list
>>> statnet_help@u.washington.edu
>>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>>
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
> --
> ------------------------------------------------------------------------
>
> Interuniversity Centre for Social Science Theory & Methodology
> Department of Sociology
> Grote Rozenstraat 31
> NL-9712 TG GRONINGEN
> steglich.gmw.rug.nl
> ------------------------------------------------------------------------
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From lzhao at fas.harvard.edu Fri Aug 23 07:52:45 2019
From: lzhao at fas.harvard.edu (Zhao, Linda)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To: <8e74aa64-f8a4-3857-c0a6-a6bc28bd14ca@uci.edu>
References:
<4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
<67b2f672-c3bd-a3af-f3e2-362eebe428f3@rug.nl>
<8e74aa64-f8a4-3857-c0a6-a6bc28bd14ca@uci.edu>
Message-ID:
Hi Carter, Christian, Martina,
That makes a lot of sense - I really appreciate the helpful discussion and the explanation. Glad to know the reason for the idea and to know it's not a hard and fast rule.
Could I also please get your thoughts on the other issue I have been having? It seems like when running meta-analysis of ERGM coefficients, the terms are not comparable especially because network size very strongly influences model parameters. I've seen scholars just run a meta-analysis in the past without addressing this issue, but that's problematic, and something that should be addressed going forward, right? Looking at previous posts, it seems like to make the dyadic-indendent terms comparable, one strategy would be to set offset.coef to ?log(n) and apply the offset to edges. Am I understanding this correctly? And how does this change the interpretation of the edges term? Sorry if that doesn't make sense... I'm still trying to wrap my head around what this is doing and why.
Thanks,
Linda
On Fri, Aug 23, 2019 at 3:53 AM Carter T. Butts > wrote:
Hi, all -
I think this is a very reasonable way to think of the issues, and is nicely put. From a conceptual point of view, it is useful to be reminded that an observed structural bias is sometimes being driven by something else, and lower-order structures are often a good place to look. (Covariate effects, in particular - which are usually "edge-level" - are often underutilized. In my experience, many problems that folks encounter with getting models to converge comes from trying to use homogeneous clustering forces to explain heterogeneous clustering that is obviously coming from an exogenous source.) So I would agree with the importance of being aware of the nestedness of subgraph structures in model construction and interpretation, and concur that this can be useful when thinking about what models to consider. It's when this morphs from "a useful tool for thinking about the space of models" into a "rule for what you must always include in a model (without consideration of whether it either works in practice or makes theoretical sense)" that I become concerned. The tendency for the former to convert to the latter through retelling is assuredly worth a study in its own right! :-)
Best,
-Carter
On 8/23/19 12:07 AM, Christian Steglich wrote:
Dear Linda, Carter, Martina:
let me jump in to articulate a point of view that is much more sympathetic to the hierarchy principle, as a tool to avoid rushing to a bad model specification.
The hierarchy principle is I think best understood as a way to guide your thinking about the model specification than to actually do it.
It is 100% analogous to the linear regression principle of thinking about all lower-order interactions as simpler explanations (Occam's razor) before estimating and interpreting a higher-order interaction effect. Does that mean you need to include all lower order interactions in a linear regression? It depends... on what the data allow, on what is statistically possible, but mainly on what makes sense from a subject matter, theory point of view. Likewise, it depends on these things in network modelling. Particularly the small single networks that are traditionally analysed with ERGMs usually do not afford estimation of big models, so you just cannot do it without invoking statistical damage as Carter said.
I would summarise Carter's point about approximating the generative process as "theoretical insights trump statistical orthodoxy", and I would fully agree. But the problem with many people starting to analyse networks in my experience is that their theoretical framework on network mechanisms is very embryonic or even non-existent. So to get back to the hierarchy principle as a way of thinking rather than doing in your concrete case, Linda: Before including a closure term, it certainly is good to think about all the other, nested subgraph effects you mentioned, and consider whether they make sense and are supported by prior evidence in your particular research context.
In addition, there are certainly good statistical reasons why lower-order subgraphs should be included IF (big if) the data set affords it. For example, if your reason to include the closure term is that you want to estimate evidence for a transitive closure mechanism, then this mechanism requires a two-path as input and produces a closed triangle. A model in which also the prevalence of two-paths (as a subgraph) is explicitly modelled by including such an effect will usually stabilise the whole model estimation. (Yes, there may be exceptions - if the data are in a high density r?gime or so.) In certer's terms, if the generative process includes closure, then it is good to also consider how the generative process produces conditions under which closure can occur. If there are no effects in your model specification producing these conditions, you will have a bad model. The hierarchy principle helps you systematically think about this.
All the best, Christian
On 8/23/2019 5:51 AM, Carter T. Butts wrote:
Hi, Linda -
As a general matter, it is not the case that one should always include all subgraphs of a given network statistic (whether in SOAMs, ERGMs, or anything else). There may be particular settings in which it may make sense to do this, but it is neither universally necessary nor even harmless (since adding unnecessary terms can lead to such exciting problems as overfitting, numerical instability, and poor extrapolative performance). Typically, one's goal is to include those terms (and only those terms) that best approximate the generative process that produced one's observed network; with rare exceptions, mechanically including terms by fixed rules that are not informed by the problem at hand leads one unto ruin and woe. Unfortunately, rules of that sort are sometimes promulgated, generally as a well-intentioned effort to give newcomers heuristics to aid in model building. In my view, this can do more harm than good, particularly when the context and/or nuance behind the use of the heuristic is lost and it morphs into a "rule." But at any rate, this heuristic is not one that I would advocate for general use.
Hope that helps,
-Carter
On 8/22/19 2:12 PM, Zhao, Linda wrote:
Dear STATNET help,
I'm new at ERGMs and could use some advice. I heard about the "hierarchy principle", in which all subgraphs of a graph need to be included, when reading about SOAM but I'm intending to use ERGMs because of cross-sectional data.
Does this principle also apply ERGMs? My network is directed and I want to include closure (gwesp). Does that mean that I should include all the possible subgraphs, meaning m2star, ostar(2) and istar(2) as well as edges + mutual? In the tutorials that I have been reading it seems that sometimes people just include edges + mutual + gwesp. What I'm curious about is whether this is okay and why, or whether best practices have been updated?
Thanks very much,
Linda
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
--
________________________________
[http://www.rug.nl/about-us/how-to-find-us/huisstijl/logobank/logobestandenfaculteiten/rugr_fgmw_logoen_zwart_rgb.jpg]
Interuniversity Centre for Social Science Theory & Methodology
Department of Sociology
Grote Rozenstraat 31
NL-9712 TG GRONINGEN
steglich.gmw.rug.nl
________________________________
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From r.w.krause at rug.nl Fri Aug 23 08:30:08 2019
From: r.w.krause at rug.nl (Krause, R.W.)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To:
References:
<4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
<67b2f672-c3bd-a3af-f3e2-362eebe428f3@rug.nl>
<8e74aa64-f8a4-3857-c0a6-a6bc28bd14ca@uci.edu>
Message-ID:
Dear Linda,
The problem with meta-analysis goes beyond the sample size issue. If you do
a meta analysis on the parameter level you need to take the dependency of
the parameters into account, especially the dependency on the edge term. A
reciprocity (mutual) parameter = 2 leads to a different amount of
reciprocated ties if the edge term is = -3, or edge = 0 or edge = 4. It
would be great if we had an easy function to get the average marginal
effects (AMEs) for ERGMs. But, AFAIK, that does not exist - yet. You can of
course calculate the probability of a tie x_{ij } given, for instance,
x_{ji} = 1 and x_{ji} = 0, keeping everything else the same. This way you
can see the marginal effect of the reciprocity parameter. There are several
papers with SAOMs where people do this, however, they usually (always?)
take the case of two otherwise isolated actors, ignoring all other
parameters in the model (unfortunately some even forget to include the
density parameter and the actual parameter weights). Ignoring the other
parameters (highly) inflates the importance of the parameter in question,
because in places where ties are formed, people are usually not isolated
(e.g. clustering of ties in triads).
If done properly, AMEs are comparable across different models and data sets
(at least in logistic regression see Mood 2010).
If the exact parameter values/probabilities are not too important, you can
do a meta-analysis on the p-value level, I think that one is called
Fisher's p-value analysis, but don't quote me on that one...
I plan to work on AMEs as a side project in my postdoc, but maybe the
Statnet crew has already some code for calculating marginal probabilities
or some thing similar to Indlekofer's Relative Importance (Indlekofer &
Brandes 2013), but for ERGMs.
Cheers,
Robert Krause
ICS Sociology, PhD Candidate
University of Groningen
Grote Rozenstraat 31,
Room B119
9712 TG Groningen, The Netherlands
On Fri, Aug 23, 2019 at 5:00 PM Zhao, Linda wrote:
> Hi Carter, Christian, Martina,
>
> That makes a lot of sense - I really appreciate the helpful discussion and
> the explanation. Glad to know the reason for the idea and to know it's not
> a hard and fast rule.
>
> Could I also please get your thoughts on the other issue I have been
> having? It seems like when running meta-analysis of ERGM coefficients, the
> terms are not comparable especially because network size very strongly
> influences model parameters. I've seen scholars just run a meta-analysis in
> the past without addressing this issue, but that's problematic, and
> something that should be addressed going forward, right? Looking at
> previous posts, it seems like to make the dyadic-indendent terms
> comparable, one strategy would be to set offset.coef to ?log(n) and apply
> the offset to edges. Am I understanding this correctly? And how does this
> change the interpretation of the edges term? Sorry if that doesn't make
> sense... I'm still trying to wrap my head around what this is doing and why.
>
> Thanks,
> Linda
>
> On Fri, Aug 23, 2019 at 3:53 AM Carter T. Butts wrote:
>
>> Hi, all -
>>
>> I think this is a very reasonable way to think of the issues, and is
>> nicely put. From a conceptual point of view, it is useful to be reminded
>> that an observed structural bias is sometimes being driven by something
>> else, and lower-order structures are often a good place to look.
>> (Covariate effects, in particular - which are usually "edge-level" - are
>> often underutilized. In my experience, many problems that folks encounter
>> with getting models to converge comes from trying to use homogeneous
>> clustering forces to explain heterogeneous clustering that is obviously
>> coming from an exogenous source.) So I would agree with the importance of
>> being aware of the nestedness of subgraph structures in model construction
>> and interpretation, and concur that this can be useful when thinking about
>> what models to consider. It's when this morphs from "a useful tool for
>> thinking about the space of models" into a "rule for what you must always
>> include in a model (without consideration of whether it either works in
>> practice or makes theoretical sense)" that I become concerned. The
>> tendency for the former to convert to the latter through retelling is
>> assuredly worth a study in its own right! :-)
>>
>> Best,
>>
>> -Carter
>> On 8/23/19 12:07 AM, Christian Steglich wrote:
>>
>> Dear Linda, Carter, Martina:
>>
>> let me jump in to articulate a point of view that is much more
>> sympathetic to the hierarchy principle, as a tool to avoid rushing to a bad
>> model specification.
>>
>> The hierarchy principle is I think best understood as a way to guide your *thinking
>> *about the model specification than to actually *do it*.
>>
>> It is 100% analogous to the linear regression principle of thinking about
>> all lower-order interactions as simpler explanations (Occam's razor) before
>> estimating and interpreting a higher-order interaction effect. Does that
>> mean you need to include all lower order interactions in a linear
>> regression? *It depends... *on what the data allow, on what is
>> statistically possible, but mainly on what makes sense from a subject
>> matter, theory point of view. Likewise, it depends on these things in
>> network modelling. Particularly the small single networks that are
>> traditionally analysed with ERGMs usually do not afford estimation of big
>> models, so you just cannot do it without invoking statistical damage as
>> Carter said.
>>
>> I would summarise Carter's point about approximating the generative
>> process as "theoretical insights trump statistical orthodoxy", and I would
>> fully agree. But the problem with many people starting to analyse networks
>> in my experience is that their theoretical framework on network mechanisms
>> is very embryonic or even non-existent. So to get back to the hierarchy
>> principle as a way of *thinking* rather than *doing* in your concrete
>> case, Linda: Before including a closure term, it certainly is good to think
>> about all the other, nested subgraph effects you mentioned, and consider
>> whether they make sense and are supported by prior evidence in your
>> particular research context.
>>
>> In addition, there are certainly good statistical reasons why lower-order
>> subgraphs should be included IF (big if) the data set affords it. For
>> example, if your reason to include the closure term is that you want to
>> estimate evidence for a transitive closure mechanism, then this mechanism
>> requires a two-path as input and produces a closed triangle. A model in
>> which also the prevalence of two-paths (as a subgraph) is explicitly
>> modelled by including such an effect will usually stabilise the whole model
>> estimation. (Yes, there may be exceptions - if the data are in a high
>> density r?gime or so.) In certer's terms, if the generative process
>> includes closure, then it is good to also consider how the generative
>> process produces conditions under which closure can occur. If there are no
>> effects in your model specification producing these conditions, you will
>> have a bad model. The hierarchy principle helps you systematically think
>> about this.
>>
>> All the best, Christian
>>
>>
>> On 8/23/2019 5:51 AM, Carter T. Butts wrote:
>>
>> Hi, Linda -
>>
>> As a general matter, it is *not* the case that one should always include
>> all subgraphs of a given network statistic (whether in SOAMs, ERGMs, or
>> anything else). There may be particular settings in which it may make
>> sense to do this, but it is neither universally necessary nor even harmless
>> (since adding unnecessary terms can lead to such exciting problems as
>> overfitting, numerical instability, and poor extrapolative performance).
>> Typically, one's goal is to include those terms (and *only* those terms)
>> that best approximate the generative process that produced one's observed
>> network; with rare exceptions, mechanically including terms by fixed rules
>> that are not informed by the problem at hand leads one unto ruin and woe.
>> Unfortunately, rules of that sort are sometimes promulgated, generally as a
>> well-intentioned effort to give newcomers heuristics to aid in model
>> building. In my view, this can do more harm than good, particularly when
>> the context and/or nuance behind the use of the heuristic is lost and it
>> morphs into a "rule." But at any rate, this heuristic is not one that I
>> would advocate for general use.
>>
>> Hope that helps,
>>
>> -Carter
>> On 8/22/19 2:12 PM, Zhao, Linda wrote:
>>
>> Dear STATNET help,
>>
>> I'm new at ERGMs and could use some advice. I heard about the "hierarchy principle",
>> in which all subgraphs of a graph need to be included, when reading about
>> SOAM but I'm intending to use ERGMs because of cross-sectional data.
>>
>> Does this principle also apply ERGMs? My network is directed and I want
>> to include closure (gwesp). Does that mean that I should include all the
>> possible subgraphs, meaning m2star, ostar(2) and istar(2) as well as edges
>> + mutual? In the tutorials that I have been reading it seems that sometimes
>> people just include edges + mutual + gwesp. What I'm curious about is
>> whether this is okay and why, or whether best practices have been updated?
>>
>> Thanks very much,
>> Linda
>>
>> _______________________________________________
>> statnet_help mailing liststatnet_help@u.washington.eduhttp://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>>
>>
>> _______________________________________________
>> statnet_help mailing liststatnet_help@u.washington.eduhttp://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>>
>> --
>> ------------------------------
>>
>> Interuniversity Centre for Social Science Theory & Methodology
>> Department of Sociology
>> Grote Rozenstraat 31
>> NL-9712 TG GRONINGEN
>> steglich.gmw.rug.nl
>>
>> ------------------------------
>>
>> _______________________________________________
>> statnet_help mailing liststatnet_help@u.washington.eduhttp://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>>
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From buttsc at uci.edu Fri Aug 23 11:25:18 2019
From: buttsc at uci.edu (Carter T. Butts)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To:
References:
<4c54a26e-52e4-ecdc-25d1-bbff4398e466@uci.edu>
<67b2f672-c3bd-a3af-f3e2-362eebe428f3@rug.nl>
<8e74aa64-f8a4-3857-c0a6-a6bc28bd14ca@uci.edu>
Message-ID: <54d8c780-625c-1b16-697a-afbf43bffb52@uci.edu>
Hi, Linda -
On 8/23/19 7:52 AM, Zhao, Linda wrote:
> Hi Carter, Christian, Martina,
>
> That makes a lot of sense - I really appreciate the helpful discussion
> and the explanation.?Glad to know the reason for the idea and to know
> it's not a hard and fast rule.
>
> Could I also please get your thoughts on the other issue I have been
> having? It seems like when running meta-analysis of ERGM coefficients,
> the terms are not comparable especially because network size very
> strongly influences model parameters. I've seen scholars just run a
> meta-analysis in the past without addressing this issue, but that's
> problematic, and something that should be addressed going forward,
> right? Looking at previous posts, it seems like to make the
> dyadic-indendent terms comparable, one strategy would be to set
> offset.coef to ?log(n) and apply the offset to edges. Am I
> understanding this correctly? And how does this change the
> interpretation of the edges term? Sorry if that doesn't make sense...
> I'm still trying to wrap my head around what this is doing and why.
>
This is a wonderful topic, and there's a lot to unpack here!? Let me try
to hit the highlights:
1. You are right that, for most social networks, model parameters are
related to network size.? The "whys" of that are complex, and an area of
active study.? (It isn't simply a technical issue, because in many cases
large networks are structured by contextual factors (e.g., geography)
that can be approximately ignored at small scales.? A model that makes
sense when studying interactions in a cocktail party is unlikely to make
sense when studying interactions for an entire city.)? The good news,
however, is that - for networks that are similar in terms of these
background factors (or where they can be properly controlled for) - we
often find that most of the difference in parameters is really related
to mean degree scaling (and possibly reciprocity scaling, in the
directed case).? While there are always exceptions, it is often the case
that mean degree changes very slowly with size, or is approximately
constant (and edgewise reciprocity is often approximately constant).? In
such settings, controlling for this goes a very long way towards
capturing size effects.
2. Where mean degree can be treated as approximately constant in N,
adding a "Krivitsky offset" of -log(N) to the edge term typically leads
to a good correction so long as the graphs are not too small.? When the
mean degree is not quite constant, but can be approximated as varying as
an arbitrary power law in N, one can instead add an offset equal to
(gamma-1)*log(N), where gamma is equal to the exponent of the power
law.? (See Butts and Almquist, JMS, 2015 for details.)? Note that the
Krivitsky offset arises as the special case when gamma=0 (i.e., the 0th
power of N, which is a constant) and the usual edge effect (no offset)
arises as the special case when gamma=1 (i.e., N^1, which means that
mean degree scales linearly in N).? With multiple networks, you can also
estimate the mean degree scaling by including log(N)*edges in your model
rather than using an offset; see the above paper for details.
3. For directed networks with approximately constant edgewise
reciprocity, a good approximate correction is obtained by adding a
log(N) (not -log(N)) offset to the mutuality term.? This essentially
"undoes" the effect of the edge offset for reciprocating edges, which
leads their baseline probability to be approximately constant in N.?
(This result is due to Krivitsky and Kolaczyc, 2015, so one might call
it a Krivitsky-Kolaczyc offset.)
4. As to why all this stuff works, there are different levels of
answers.? Butts and Almquist (2015) and Krivitsky and Kolaczyc (2015)
will give you the most basic one: when you work out the math, these
terms modify density and/or reciprocity in just the right way to
(asymptotically) make the mean degree and/or reciprocity scale the way
you want.? If you want a deeper answer, these "offsets" really represent
changes to the reference measure underlying the graph, which itself
reflects the idea that not all graphs are equally likely in the
underlying baseline model.? At a deeper level, this is a statement about
the entropy of the graph micro states, with some having more entropy
than others; one argument for why that is, is because the graph we see
is the result of many unobserved micro-level processes that shape the
network, and there are essentially more ways for those processes to
produce some graphs rather than others.? An example of a mechanistic,
micro-level interpretation of the Krivitsky offset (really, the
Krivitsky reference measure) can be found in Butts, JMS, 2019, which
also shows how this effect can arise from an unobserved mixing process
where ties can only be formed when people encounter each other (but can
always be broken).? That model also allows one to derive alternative
scaling rules, based on changes the underlying demographic process.?
(The same thing can be done for the reciprocity term, but that paper
isn't finished yet.)? That gives a "deep" answer to why this stuff
works, but it should be noted that it's not the only one.? There are
other ways that micro-processes can lead to non-uniform reference
measures, and this is a very interesting area of theoretical inquiry.
5. As a final caveat, remember that it's not always a given that mean
degree will be constant, or even that it will not scale linearly in N
(which is what the standard edge term implicitly assumes).? I've seen
cases with ensembles of smallish networks where the default actually
works well.? Approximately constant baseline mean degree is usually a
very good guess for most interpersonal networks above "group level" size
(say, greater than 20-50 people), especially if the network sizes vary
by an order of magnitude or more, but you want to check to be sure.
In sum, it is frequently the case that you can get comparability across
N in social networks by (1) controlling for size and/or reciprocity
scaling using offsets, and (2) ensuring that you have the right
covariates required to control for any exogenous differences in context
that would e.g. introduce or remove barriers to mixing.? This is not
magic, and it is not guaranteed to solve all problems in all cases, but
in practice it can work very well.? There are also good reasons (both
technical and substantive) for why this approach often works, though
there is a lot that is still being worked out.? The above papers should
give you a good start, if you want to dig deeper.
Hope that helps!
-Carter
> Thanks,
> Linda
>
> On Fri, Aug 23, 2019 at 3:53 AM Carter T. Butts > wrote:
>
> Hi, all -
>
> I think this is a very reasonable way to think of the issues, and
> is nicely put.? From a conceptual point of view, it is useful to
> be reminded that an observed structural bias is sometimes being
> driven by something else, and lower-order structures are often a
> good place to look.? (Covariate effects, in particular - which are
> usually "edge-level" - are often underutilized.? In my experience,
> many problems that folks encounter with getting models to converge
> comes from trying to use homogeneous clustering forces to explain
> heterogeneous clustering that is obviously coming from an
> exogenous source.)? So I would agree with the importance of being
> aware of the nestedness of subgraph structures in model
> construction and interpretation, and concur that this can be
> useful when thinking about what models to consider. It's when this
> morphs from "a useful tool for thinking about the space of models"
> into a "rule for what you must always include in a model (without
> consideration of whether it either works in practice or makes
> theoretical sense)" that I become concerned.? The tendency for the
> former to convert to the latter through retelling is assuredly
> worth a study in its own right!? :-)
>
> Best,
>
> -Carter
>
> On 8/23/19 12:07 AM, Christian Steglich wrote:
>>
>> Dear Linda, Carter, Martina:
>>
>> let me jump in to articulate a point of view that is much more
>> sympathetic to the hierarchy principle, as a tool to avoid
>> rushing to a bad model specification.
>>
>> The hierarchy principle is I think best understood as a way to
>> guide your /thinking /about the model specification than to
>> actually /do it/.
>>
>> It is 100% analogous to the linear regression principle of
>> thinking about all lower-order interactions as simpler
>> explanations (Occam's razor) before estimating and interpreting a
>> higher-order interaction effect. Does that mean you need to
>> include all lower order interactions in a linear regression? /It
>> depends... /on what the data allow, on what is statistically
>> possible, but mainly on what makes sense from a subject matter,
>> theory point of view. Likewise, it depends on these things in
>> network modelling. Particularly the small single networks that
>> are traditionally analysed with ERGMs usually do not afford
>> estimation of big models, so you just cannot do it without
>> invoking statistical damage as Carter said.
>>
>> I would summarise Carter's point about approximating the
>> generative process as "theoretical insights trump statistical
>> orthodoxy", and I would fully agree. But the problem with many
>> people starting to analyse networks in my experience is that
>> their theoretical framework on network mechanisms is very
>> embryonic or even non-existent. So to get back to the hierarchy
>> principle as a way of /thinking/ rather than /doing/ in your
>> concrete case, Linda: Before including a closure term, it
>> certainly is good to think about all the other, nested subgraph
>> effects you mentioned, and consider whether they make sense and
>> are supported by prior evidence in your particular research context.
>>
>> In addition, there are certainly good statistical reasons why
>> lower-order subgraphs should be included IF (big if) the data set
>> affords it. For example, if your reason to include the closure
>> term is that you want to estimate evidence for a transitive
>> closure mechanism, then this mechanism requires a two-path as
>> input and produces a closed triangle. A model in which also the
>> prevalence of two-paths (as a subgraph) is explicitly modelled by
>> including such an effect will usually stabilise the whole model
>> estimation. (Yes, there may be exceptions - if the data are in a
>> high density r?gime or so.) In certer's terms, if the generative
>> process includes closure, then it is good to also consider how
>> the generative process produces conditions under which closure
>> can occur. If there are no effects in your model specification
>> producing these conditions, you will have a bad model. The
>> hierarchy principle helps you systematically think about this.
>>
>> All the best, Christian
>>
>>
>> On 8/23/2019 5:51 AM, Carter T. Butts wrote:
>>>
>>> Hi, Linda -
>>>
>>> As a general matter, it is /not/ the case that one should always
>>> include all subgraphs of a given network statistic (whether in
>>> SOAMs, ERGMs, or anything else).? There may be particular
>>> settings in which it may make sense to do this, but it is
>>> neither universally necessary nor even harmless (since adding
>>> unnecessary terms can lead to such exciting problems as
>>> overfitting, numerical instability, and poor extrapolative
>>> performance).? Typically, one's goal is to include those terms
>>> (and /only/ those terms) that best approximate the generative
>>> process that produced one's observed network; with rare
>>> exceptions, mechanically including terms by fixed rules that are
>>> not informed by the problem at hand leads one unto ruin and woe.
>>> Unfortunately, rules of that sort are sometimes promulgated,
>>> generally as a well-intentioned effort to give newcomers
>>> heuristics to aid in model building. In my view, this can do
>>> more harm than good, particularly when the context and/or nuance
>>> behind the use of the heuristic is lost and it morphs into a
>>> "rule."? But at any rate, this heuristic is not one that I would
>>> advocate for general use.
>>>
>>> Hope that helps,
>>>
>>> -Carter
>>>
>>> On 8/22/19 2:12 PM, Zhao, Linda wrote:
>>>> Dear STATNET help,
>>>>
>>>> I'm new at ERGMs and could use some advice. I heard about
>>>> the?"hierarchy?principle", in which all subgraphs of a graph
>>>> need to be included, when reading about SOAM but I'm intending
>>>> to use ERGMs because of cross-sectional data.
>>>>
>>>> Does this principle also apply ERGMs? My network is directed
>>>> and I want to include closure (gwesp).?Does that mean that I
>>>> should include all the possible subgraphs, meaning m2star,
>>>> ostar(2) and istar(2) as well as edges + mutual? In the
>>>> tutorials that I have been reading it seems that sometimes
>>>> people just include edges?+ mutual?+ gwesp. What I'm curious
>>>> about is whether this is okay and why, or whether best
>>>> practices have been updated?
>>>>
>>>> Thanks very much,
>>>> Linda
>>>>
>>>> _______________________________________________
>>>> statnet_help mailing list
>>>> statnet_help@u.washington.edu
>>>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>>>
>>> _______________________________________________
>>> statnet_help mailing list
>>> statnet_help@u.washington.edu
>>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>> --
>> ------------------------------------------------------------------------
>>
>> Interuniversity Centre for Social Science Theory & Methodology
>> Department of Sociology
>> Grote Rozenstraat 31
>> NL-9712 TG GRONINGEN
>> steglich.gmw.rug.nl
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> statnet_help mailing list
>> statnet_help@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From morrism at uw.edu Fri Aug 23 18:48:09 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] hierarchy principle GWESP
In-Reply-To:
References:
Message-ID:
On Fri, 23 Aug 2019, Zhao, Linda wrote:
> Hi Martina,
> That's really helpful! Could I follow up on two points and ask just one more (unrelated) question? To follow up:
...
> (2) I am right in understanding gwdegree terms as showing dispersion in popularity - more negative = more dispersion in
> popularity?
It's a bit complicated, and depends on both the decay parameter ("alpha")
and the estimated coefficient. Michael Levy has a nice shiny app that can
help you gain intuition: https://michaellevy.shinyapps.io/gwdegree/
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From tascott at ucdavis.edu Tue Aug 27 17:56:56 2019
From: tascott at ucdavis.edu (Tyler Scott)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Faking a directed bipartite ERGM?
Message-ID:
Greetings all,
The ERGM package does not directly support directed bipartite
networks. My (possibly quite naive and ridiculous) question is how
disastrous would it be to make an (N1+N2) * (N1+N2) adjacency matrix with
directed ties, and then use an -Inf offset to disallow any within-level
ties? I know that this approach makes certain terms non-viable, but I'm
curious if there are likely to be any important underlying consequences for
estimation.
For instance, something like:
library(statnet)
seed = 24
l1 = 10
l2 = 15
g1 = (matrix(runif({l1+l2}^2),ncol = l1+l2,nrow = l1+l2) > 0.6) + 0
g1[1:l1,1:l2] <- NA
g1[l1+1:l2,l2 + 1:l1] <- NA
same_level = is.na(g1) + 0
ergm(g1 ~ edges + istar(2) + ostar(2) +
offset(edgecov(same_level)),offset.coef = -Inf)
-tyler
--
Tyler Scott
tascott@ucdavis.edu
Department of Environmental Science and Policy
University of California, Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From morrism at uw.edu Tue Aug 27 22:40:27 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Faking a directed bipartite ERGM?
In-Reply-To:
References:
Message-ID:
We use offsets like that often. It will take longer to estimate - but
we have a fix for that in the works :).
Once we have a development version of the new code (a couple of weeks, I
hope) we can let you take it for a run.
best,
Martina
On Tue, 27 Aug 2019, Tyler Scott wrote:
> Greetings all,? ? ?The ERGM package does not directly support directed bipartite networks. My (possibly quite naive and
> ridiculous) question is how disastrous would it be to make an (N1+N2) * (N1+N2) adjacency matrix with directed ties, and
> then use an -Inf offset to disallow any within-level ties? I know that this approach makes certain terms non-viable, but
> I'm curious if there are likely to be any important underlying consequences for estimation.
>
> For instance, something like:
>
> library(statnet)
> seed = 24
> l1 = 10
> l2 = 15
> g1 = (matrix(runif({l1+l2}^2),ncol = l1+l2,nrow = l1+l2) > 0.6) + 0
> g1[1:l1,1:l2] <- NA
> g1[l1+1:l2,l2 + 1:l1] <- NA
> same_level = is.na(g1) + 0
> ergm(g1 ~ edges + istar(2) + ostar(2) + offset(edgecov(same_level)),offset.coef = -Inf)
>
>
> -tyler
>
> --
> Tyler Scotttascott@ucdavis.edu
> Department of Environmental Science and Policy
> University of California, Davis
>
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From malena.haenni at unisg.ch Wed Aug 28 02:19:40 2019
From: malena.haenni at unisg.ch (Haenni, Malena)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] =?windows-1252?q?Any_news_on_=22New_mcmc=2Ediagnos?=
=?windows-1252?q?tic_behavior=3F=22_=96_Having_the_same_problem?=
Message-ID:
Hi there
Maybe it is not good courtesey and the mailing list not the right place to ask... But is there any news regarding the issue "New mcmc.diagnostic behavior?" (http://mailman13.u.washington.edu/pipermail/statnet_help/2019/002795.html) posted on June 22 and 25 respectively?
I have exactly the same problem when fitting a number of valued ergm models that include several nodecov and edgecov terms. As soon as I add both nodecov and edgecov terms or more than one edgecov term the mcmc.diagnostics fails producing the plots. In my case displaying the warning (I am using the German version):
"Fehler in `levels<-`(`*tmp*`, value = as.character(labels)) :
factor level [3] is duplicated"
The number in brackets varies from model to model.
In case this helps in finding the bug please find my session info and an example of my model code below.
Please keep me posted on the issue. I would be very grateful for your help. My own problem solving approaches as going back to the older version of statnet did not work out. Thank you in advance.
Kind regards
Malena Haenni
Phd candidate
[https://owa.unisg.ch/owa/service.svc/s/GetFileAttachment?id=AAMkAGVkMjc4ZDQ2LWE2MTgtNGU2Zi1iMjM0LWMwYzM3N2RkNGM3MABGAAAAAACiVTGePE42TKTx82ovfOpiBwDZ09ADcZZYTK%2F53pderis%2BAAAAAAEJAADZ09ADcZZYTK%2F53pderis%2BAAAAAG1kAAABEgAQAHPgAW%2Fgj3xGso5x3j7BpJI%3D&X-OWA-CANARY=0fTg9RdP3kSUDpQ7yUTodZV9c_1tetQIsS4O3xbzUQzQbfvE3V3TsksfqzFbVgKFFsv07hIw8IM.]
Institut f?r Systemisches Management und Public Governance | (IMP-HSG)
Universit?t St.Gallen (HSG) | Dufourstr. 40a | CH-9000 St.Gallen
malena.haenni@unisg.ch | www.imp.unisg.ch
Code for the model that produced the above-mentioned error (the edge covariates being partly valued and partly binary network attributes):
Model_2o<-ergm(Koop_nw~sum
+edgecov("Distanz")
+edgecov("Grenze")
+edgecov("Sprache")
+edgecov("Deltakath")
+edgecov("Gem_partei")
, response="Koop_count", reference=~Poisson,
control=control.ergm(MCMLE.trustregion=1000, seed=12345))
summary(Model_2o)
mcmc.diagnostics(Model_2o)
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] de_CH.UTF-8/de_CH.UTF-8/de_CH.UTF-8/C/de_CH.UTF-8/de_CH.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] statnet_2019.6 tsna_0.3.0 sna_2.4
[4] statnet.common_4.3.0 ergm.count_3.4.0 tergm_3.6.1
[7] networkDynamic_0.10.0 ergm_3.10.4 network_1.15
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 magrittr_1.5 MASS_7.3-51.4 tidyselect_0.2.5
[5] lattice_0.20-38 R6_2.4.0 rlang_0.4.0 dplyr_0.8.3
[9] tools_3.6.1 parallel_3.6.1 grid_3.6.1 nlme_3.1-141
[13] lpSolve_5.6.13.3 coda_0.19-3 assertthat_0.2.1 tibble_2.1.3
[17] crayon_1.3.4 Matrix_1.2-17 purrr_0.3.2 trust_0.1-7
[21] glue_1.3.1 robustbase_0.93-5 compiler_3.6.1 DEoptimR_1.0-8
[25] pillar_1.4.2 pkgconfig_2.0.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From esquirec at gmail.com Wed Aug 28 17:20:32 2019
From: esquirec at gmail.com (Wallace Chipidza)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] non-significant edges term
Message-ID:
Hi,
I fitted an ergm model onto an advice network, and in the results the edges
term is not significant: parameter estimate = -.55, p-value is .27, and SE
= .51. This model fits better than the baseline model according to the AIC,
and the goodness-of-fit diagnostics support the model as well. Is it normal
to have a non-significant edges effect? If so, how do I interpret the
parameter?
Wallace
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From r.w.krause at rug.nl Wed Aug 28 23:39:38 2019
From: r.w.krause at rug.nl (Krause, R.W.)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] non-significant edges term
In-Reply-To:
References:
Message-ID:
Dear Wallace,
Could you give more information about your model and the data?
In any case, non significant edge-terms are nothing to worry about. You can
find those often, if you have other degree related terms. Basically, if you
model the degree distribution already sufficiently with other terms, then
the amount of ties is not (necessarily) different than would have been
expected by chance, given the other parameters in the model.
Cheers,
Robert Krause
ICS Sociology, PhD Candidate
University of Groningen
Grote Rozenstraat 31,
Room B119
9712 TG Groningen, The Netherlands
On Thu, Aug 29, 2019 at 2:25 AM Wallace Chipidza wrote:
> Hi,
>
> I fitted an ergm model onto an advice network, and in the results the
> edges term is not significant: parameter estimate = -.55, p-value is .27,
> and SE = .51. This model fits better than the baseline model according to
> the AIC, and the goodness-of-fit diagnostics support the model as well. Is
> it normal to have a non-significant edges effect? If so, how do I interpret
> the parameter?
>
> Wallace
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From p.krivitsky at unsw.edu.au Thu Aug 29 08:40:05 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help]
=?utf-8?q?Any_news_on_=22New_mcmc=2Ediagnostic_beh?=
=?utf-8?q?avior=3F=22_=E2=80=93_Having_the_same_problem?=
In-Reply-To:
References:
Message-ID: <13d99e4cb4b0c2f41c6441e488adcb6aa0ce3b1b.camel@unsw.edu.au>
Hi, Malena,
Thanks for the reminder! It turned out to be a limitation of densityplot.mcmc.list() function in coda, and I've added a workaround.
Best Regards,
Pavel
P.S. No worries about asking on the mailing list. However, the quickest way to get something fixed is probably to open an issue on GitHub with a minimal reproducible example.
On Wed, 2019-08-28 at 09:19 +0000, Haenni, Malena wrote:
Hi there
Maybe it is not good courtesey and the mailing list not the right place to ask... But is there any news regarding the issue "New mcmc.diagnostic behavior?" (http://mailman13.u.washington.edu/pipermail/statnet_help/2019/002795.html) posted on June 22 and 25 respectively?
I have exactly the same problem when fitting a number of valued ergm models that include several nodecov and edgecov terms. As soon as I add both nodecov and edgecov terms or more than one edgecov term the mcmc.diagnostics fails producing the plots. In my case displaying the warning (I am using the German version):
"Fehler in `levels<-`(`*tmp*`, value = as.character(labels)) :
factor level [3] is duplicated"
The number in brackets varies from model to model.
In case this helps in finding the bug please find my session info and an example of my model code below.
Please keep me posted on the issue. I would be very grateful for your help. My own problem solving approaches as going back to the older version of statnet did not work out. Thank you in advance.
Kind regards
Malena Haenni
Phd candidate
[https://owa.unisg.ch/owa/service.svc/s/GetFileAttachment?id=AAMkAGVkMjc4ZDQ2LWE2MTgtNGU2Zi1iMjM0LWMwYzM3N2RkNGM3MABGAAAAAACiVTGePE42TKTx82ovfOpiBwDZ09ADcZZYTK%2F53pderis%2BAAAAAAEJAADZ09ADcZZYTK%2F53pderis%2BAAAAAG1kAAABEgAQAHPgAW%2Fgj3xGso5x3j7BpJI%3D&X-OWA-CANARY=0fTg9RdP3kSUDpQ7yUTodZV9c_1tetQIsS4O3xbzUQzQbfvE3V3TsksfqzFbVgKFFsv07hIw8IM.]
Institut f?r Systemisches Management und Public Governance | (IMP-HSG)
Universit?t St.Gallen (HSG) | Dufourstr. 40a | CH-9000 St.Gallen
malena.haenni@unisg.ch | www.imp.unisg.ch
Code for the model that produced the above-mentioned error (the edge covariates being partly valued and partly binary network attributes):
Model_2o<-ergm(Koop_nw~sum
+edgecov("Distanz")
+edgecov("Grenze")
+edgecov("Sprache")
+edgecov("Deltakath")
+edgecov("Gem_partei")
, response="Koop_count", reference=~Poisson,
control=control.ergm(MCMLE.trustregion=1000, seed=12345))
summary(Model_2o)
mcmc.diagnostics(Model_2o)
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] de_CH.UTF-8/de_CH.UTF-8/de_CH.UTF-8/C/de_CH.UTF-8/de_CH.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] statnet_2019.6 tsna_0.3.0 sna_2.4
[4] statnet.common_4.3.0 ergm.count_3.4.0 tergm_3.6.1
[7] networkDynamic_0.10.0 ergm_3.10.4 network_1.15
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 magrittr_1.5 MASS_7.3-51.4 tidyselect_0.2.5
[5] lattice_0.20-38 R6_2.4.0 rlang_0.4.0 dplyr_0.8.3
[9] tools_3.6.1 parallel_3.6.1 grid_3.6.1 nlme_3.1-141
[13] lpSolve_5.6.13.3 coda_0.19-3 assertthat_0.2.1 tibble_2.1.3
[17] crayon_1.3.4 Matrix_1.2-17 purrr_0.3.2 trust_0.1-7
[21] glue_1.3.1 robustbase_0.93-5 compiler_3.6.1 DEoptimR_1.0-8
[25] pillar_1.4.2 pkgconfig_2.0.2
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From malena.haenni at unisg.ch Mon Sep 2 01:52:22 2019
From: malena.haenni at unisg.ch (Haenni, Malena)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help]
=?windows-1252?q?Any_news_on_=22New_mcmc=2Ediagnos?=
=?windows-1252?q?tic_behavior=3F=22_=96_Having_the_same_problem?=
In-Reply-To: <13d99e4cb4b0c2f41c6441e488adcb6aa0ce3b1b.camel@unsw.edu.au>
References: ,
<13d99e4cb4b0c2f41c6441e488adcb6aa0ce3b1b.camel@unsw.edu.au>
Message-ID:
Hi Pavel,
Thank you so much for your effort and your kindness. How can I take advantage of the workaround you mentioned? Will this be in an update to come? I tried updating the statnet package today and when re-running my models I had the same problems still.
Kind regards
Malena
________________________________
Von: Pavel Krivitsky
Gesendet: Donnerstag, 29. August 2019 17:40
An: statnet_help@u.washington.edu; Haenni, Malena
Betreff: Re: [statnet_help] Any news on "New mcmc.diagnostic behavior?" ? Having the same problem
Hi, Malena,
Thanks for the reminder! It turned out to be a limitation of densityplot.mcmc.list() function in coda, and I've added a workaround.
Best Regards,
Pavel
P.S. No worries about asking on the mailing list. However, the quickest way to get something fixed is probably to open an issue on GitHub with a minimal reproducible example.
On Wed, 2019-08-28 at 09:19 +0000, Haenni, Malena wrote:
Hi there
Maybe it is not good courtesey and the mailing list not the right place to ask... But is there any news regarding the issue "New mcmc.diagnostic behavior?" (http://mailman13.u.washington.edu/pipermail/statnet_help/2019/002795.html) posted on June 22 and 25 respectively?
I have exactly the same problem when fitting a number of valued ergm models that include several nodecov and edgecov terms. As soon as I add both nodecov and edgecov terms or more than one edgecov term the mcmc.diagnostics fails producing the plots. In my case displaying the warning (I am using the German version):
"Fehler in `levels<-`(`*tmp*`, value = as.character(labels)) :
factor level [3] is duplicated"
The number in brackets varies from model to model.
In case this helps in finding the bug please find my session info and an example of my model code below.
Please keep me posted on the issue. I would be very grateful for your help. My own problem solving approaches as going back to the older version of statnet did not work out. Thank you in advance.
Kind regards
Malena Haenni
Phd candidate
[https://owa.unisg.ch/owa/service.svc/s/GetFileAttachment?id=AAMkAGVkMjc4ZDQ2LWE2MTgtNGU2Zi1iMjM0LWMwYzM3N2RkNGM3MABGAAAAAACiVTGePE42TKTx82ovfOpiBwDZ09ADcZZYTK%2F53pderis%2BAAAAAAEJAADZ09ADcZZYTK%2F53pderis%2BAAAAAG1kAAABEgAQAHPgAW%2Fgj3xGso5x3j7BpJI%3D&X-OWA-CANARY=0fTg9RdP3kSUDpQ7yUTodZV9c_1tetQIsS4O3xbzUQzQbfvE3V3TsksfqzFbVgKFFsv07hIw8IM.]
Institut f?r Systemisches Management und Public Governance | (IMP-HSG)
Universit?t St.Gallen (HSG) | Dufourstr. 40a | CH-9000 St.Gallen
malena.haenni@unisg.ch | www.imp.unisg.ch
Code for the model that produced the above-mentioned error (the edge covariates being partly valued and partly binary network attributes):
Model_2o<-ergm(Koop_nw~sum
+edgecov("Distanz")
+edgecov("Grenze")
+edgecov("Sprache")
+edgecov("Deltakath")
+edgecov("Gem_partei")
, response="Koop_count", reference=~Poisson,
control=control.ergm(MCMLE.trustregion=1000, seed=12345))
summary(Model_2o)
mcmc.diagnostics(Model_2o)
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] de_CH.UTF-8/de_CH.UTF-8/de_CH.UTF-8/C/de_CH.UTF-8/de_CH.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] statnet_2019.6 tsna_0.3.0 sna_2.4
[4] statnet.common_4.3.0 ergm.count_3.4.0 tergm_3.6.1
[7] networkDynamic_0.10.0 ergm_3.10.4 network_1.15
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 magrittr_1.5 MASS_7.3-51.4 tidyselect_0.2.5
[5] lattice_0.20-38 R6_2.4.0 rlang_0.4.0 dplyr_0.8.3
[9] tools_3.6.1 parallel_3.6.1 grid_3.6.1 nlme_3.1-141
[13] lpSolve_5.6.13.3 coda_0.19-3 assertthat_0.2.1 tibble_2.1.3
[17] crayon_1.3.4 Matrix_1.2-17 purrr_0.3.2 trust_0.1-7
[21] glue_1.3.1 robustbase_0.93-5 compiler_3.6.1 DEoptimR_1.0-8
[25] pillar_1.4.2 pkgconfig_2.0.2
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From p.krivitsky at unsw.edu.au Mon Sep 2 01:57:52 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help]
=?utf-8?q?Any_news_on_=22New_mcmc=2Ediagnostic_beh?=
=?utf-8?q?avior=3F=22_=E2=80=93_Having_the_same_problem?=
In-Reply-To:
References:
,<13d99e4cb4b0c2f41c6441e488adcb6aa0ce3b1b.camel@unsw.edu.au>
Message-ID:
Hi, Malena,
To take advantage of improvements committed to the GitHub repository but not yet released to CRAN, you need to install from there. Take a look at https://cran.r-project.org/web/packages/githubinstall/vignettes/githubinstall.html for instructions.
I hope this helps,
Pavel
On Mon, 2019-09-02 at 08:52 +0000, Haenni, Malena wrote:
Hi Pavel,
Thank you so much for your effort and your kindness. How can I take advantage of the workaround you mentioned? Will this be in an update to come? I tried updating the statnet package today and when re-running my models I had the same problems still.
Kind regards
Malena
________________________________
Von: Pavel Krivitsky
Gesendet: Donnerstag, 29. August 2019 17:40
An: statnet_help@u.washington.edu; Haenni, Malena
Betreff: Re: [statnet_help] Any news on "New mcmc.diagnostic behavior?" ? Having the same problem
Hi, Malena,
Thanks for the reminder! It turned out to be a limitation of densityplot.mcmc.list() function in coda, and I've added a workaround.
Best Regards,
Pavel
P.S. No worries about asking on the mailing list. However, the quickest way to get something fixed is probably to open an issue on GitHub with a minimal reproducible example.
On Wed, 2019-08-28 at 09:19 +0000, Haenni, Malena wrote:
Hi there
Maybe it is not good courtesey and the mailing list not the right place to ask... But is there any news regarding the issue "New mcmc.diagnostic behavior?" (http://mailman13.u.washington.edu/pipermail/statnet_help/2019/002795.html) posted on June 22 and 25 respectively?
I have exactly the same problem when fitting a number of valued ergm models that include several nodecov and edgecov terms. As soon as I add both nodecov and edgecov terms or more than one edgecov term the mcmc.diagnostics fails producing the plots. In my case displaying the warning (I am using the German version):
"Fehler in `levels<-`(`*tmp*`, value = as.character(labels)) :
factor level [3] is duplicated"
The number in brackets varies from model to model.
In case this helps in finding the bug please find my session info and an example of my model code below.
Please keep me posted on the issue. I would be very grateful for your help. My own problem solving approaches as going back to the older version of statnet did not work out. Thank you in advance.
Kind regards
Malena Haenni
Phd candidate
[https://owa.unisg.ch/owa/service.svc/s/GetFileAttachment?id=AAMkAGVkMjc4ZDQ2LWE2MTgtNGU2Zi1iMjM0LWMwYzM3N2RkNGM3MABGAAAAAACiVTGePE42TKTx82ovfOpiBwDZ09ADcZZYTK%2F53pderis%2BAAAAAAEJAADZ09ADcZZYTK%2F53pderis%2BAAAAAG1kAAABEgAQAHPgAW%2Fgj3xGso5x3j7BpJI%3D&X-OWA-CANARY=0fTg9RdP3kSUDpQ7yUTodZV9c_1tetQIsS4O3xbzUQzQbfvE3V3TsksfqzFbVgKFFsv07hIw8IM.]
Institut f?r Systemisches Management und Public Governance | (IMP-HSG)
Universit?t St.Gallen (HSG) | Dufourstr. 40a | CH-9000 St.Gallen
malena.haenni@unisg.ch | www.imp.unisg.ch
Code for the model that produced the above-mentioned error (the edge covariates being partly valued and partly binary network attributes):
Model_2o<-ergm(Koop_nw~sum
+edgecov("Distanz")
+edgecov("Grenze")
+edgecov("Sprache")
+edgecov("Deltakath")
+edgecov("Gem_partei")
, response="Koop_count", reference=~Poisson,
control=control.ergm(MCMLE.trustregion=1000, seed=12345))
summary(Model_2o)
mcmc.diagnostics(Model_2o)
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] de_CH.UTF-8/de_CH.UTF-8/de_CH.UTF-8/C/de_CH.UTF-8/de_CH.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] statnet_2019.6 tsna_0.3.0 sna_2.4
[4] statnet.common_4.3.0 ergm.count_3.4.0 tergm_3.6.1
[7] networkDynamic_0.10.0 ergm_3.10.4 network_1.15
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 magrittr_1.5 MASS_7.3-51.4 tidyselect_0.2.5
[5] lattice_0.20-38 R6_2.4.0 rlang_0.4.0 dplyr_0.8.3
[9] tools_3.6.1 parallel_3.6.1 grid_3.6.1 nlme_3.1-141
[13] lpSolve_5.6.13.3 coda_0.19-3 assertthat_0.2.1 tibble_2.1.3
[17] crayon_1.3.4 Matrix_1.2-17 purrr_0.3.2 trust_0.1-7
[21] glue_1.3.1 robustbase_0.93-5 compiler_3.6.1 DEoptimR_1.0-8
[25] pillar_1.4.2 pkgconfig_2.0.2
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ap69 at st-andrews.ac.uk Mon Sep 2 04:08:21 2019
From: ap69 at st-andrews.ac.uk (Andre Phillips)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] (Convergence?) Issues Running Valued ERGM with
NodeMix and NodeFactor
Message-ID:
Hello,
My Name is Andre Phillips working out of St Andrews University and have been using statnet to try and analyse how males of a species of fish compete in sperm competition amongst each other when using different mating tactics (territorial or sneaker).
Apologies if this is the wrong place to ask about this issue but I have been unable to find a solution from books or scouring the internet.
I have been having issues not being able to understand why when I have nodemix and nodefactor in the same model the model appears to not be converging.
This is an issue as Nodemix and NodeFactor are important questions I want to ask of the data. (What are the probabilities of a ties between all combinations, and which factor has has the most ties). I have tried a higher iteration model with no success.
Model summary output (diagnostics in PS):
==========================
Summary of model fit
==========================
Formula: c.filt1 ~ sum + nodemix("tactic", base = 1) + nodefactor("tactic") +
nodecov("E/Muss") + mutual("min")
Iterations: 3 out of 20
Monte Carlo MLE Results:
Estimate Std. Error MCMC% z value Pr(>|z|)
sum 1.282e+00 1.591e-01 0 8.060 <1e-04 ***
mix.tactic.t.ss 1.516e-01 2.610e+05 100 0.000 1
mix.tactic.ss.t 7.542e-02 2.610e+05 100 0.000 1
mix.tactic.t.t 5.687e-01 5.220e+05 100 0.000 1
nodefactor.sum.tactic.t -2.638e-01 2.610e+05 100 0.000 1
nodecov.sum.E/Muss 8.338e-02 1.319e-02 0 6.323 <1e-04 ***
mutual.min -8.959e-01 8.602e-02 0 -10.415 <1e-04 ***
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Null Deviance: 0 on 132 degrees of freedom
Residual Deviance: -1877 on 125 degrees of freedom
Note that the null model likelihood and deviance are defined to be 0. This means that all likelihood-based inference (LRT, Analysis of Deviance, AIC, BIC, etc.) is only valid between models with the same reference distribution and constraints.
AIC: -1863 BIC: -1843 (Smaller is better.)
I have attached my code and data so hope you will be able to replicate my models. Any help will be massively appreciated and I hope this work will reveal some interesting information about sperm competition by investigating it in a more complex manner than previously attempted.
Thank you very much for your time,
Andre
PS mcmc.diagnostics for the above model:
Sample statistics summary:
Iterations = 16384:4209664
Thinning interval = 1024
Number of chains = 1
Sample size per chain = 4096
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
sum -0.79126 29.04 0.4537 0.5414
mix.tactic.t.ss 1.33228 22.13 0.3457 0.6336
mix.tactic.ss.t -0.39160 20.25 0.3164 0.6043
mix.tactic.t.t -0.43823 15.67 0.2448 0.2826
nodefactor.sum.tactic.t 0.06421 37.28 0.5826 0.6933
nodecov.sum.E/Muss -17.50000 365.31 5.7079 6.8205
mutual.min 0.30200 14.67 0.2292 0.2664
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
sum -57.0 -21.0 -1.00 20.0 54.0
mix.tactic.t.ss -42.0 -14.0 1.00 16.0 44.0
mix.tactic.ss.t -41.0 -14.0 0.00 14.0 38.0
mix.tactic.t.t -31.0 -11.0 0.00 10.0 31.0
nodefactor.sum.tactic.t -72.0 -25.0 0.00 25.0 73.0
nodecov.sum.E/Muss -729.9 -264.2 -20.05 238.9 681.9
mutual.min -29.0 -9.0 1.00 10.0 28.0
Sample statistics cross-correlations:
sum mix.tactic.t.ss mix.tactic.ss.t mix.tactic.t.t nodefactor.sum.tactic.t nodecov.sum.E/Muss mutual.min
sum 1.0000000 0.382822467 0.29865751 0.532864774 0.8371899 0.9722899 0.5915027
mix.tactic.t.ss 0.3828225 1.000000000 -0.52976438 0.003100067 0.3083251 0.3757069 0.1525991
mix.tactic.ss.t 0.2986575 -0.529764381 1.00000000 -0.016333567 0.2150496 0.2844547 0.2556484
mix.tactic.t.t 0.5328648 0.003100067 -0.01633357 1.000000000 0.8332746 0.5814505 0.3015219
nodefactor.sum.tactic.t 0.8371899 0.308325115 0.21504961 0.833274614 1.0000000 0.8660792 0.4827973
nodecov.sum.E/Muss 0.9722899 0.375706894 0.28445473 0.581450481 0.8660792 1.0000000 0.5751162
mutual.min 0.5915027 0.152599146 0.25564841 0.301521948 0.4827973 0.5751162 1.0000000
Sample statistics auto-correlation:
Chain 1
sum mix.tactic.t.ss mix.tactic.ss.t mix.tactic.t.t nodefactor.sum.tactic.t nodecov.sum.E/Muss mutual.min
Lag 0 1.00000000 1.00000000 1.00000000 1.00000000 1.000000000 1.000000000 1.000000000
Lag 1024 0.17470368 0.48667045 0.51837032 0.18608078 0.172100862 0.176093839 0.149085397
Lag 2048 0.03764507 0.29308593 0.32992848 0.04672700 0.044289212 0.040176025 0.025757863
Lag 3072 -0.01322977 0.17459489 0.22884705 0.01343201 0.001900294 -0.018277910 0.008205692
Lag 4096 -0.01872013 0.12435937 0.15585097 -0.02211220 -0.026749425 -0.008303491 -0.004669403
Lag 5120 0.01153633 0.08800767 0.08302213 -0.04117159 -0.022585695 0.009873491 0.012877551
Sample statistics burn-in diagnostic (Geweke):
Chain 1
Fraction in 1st window = 0.1
Fraction in 2nd window = 0.5
sum mix.tactic.t.ss mix.tactic.ss.t mix.tactic.t.t nodefactor.sum.tactic.t
0.06009 0.35703 -0.85110 0.51847 -0.05539
nodecov.sum.E/Muss mutual.min
0.13393 0.15044
Individual P-values (lower = worse):
sum mix.tactic.t.ss mix.tactic.ss.t mix.tactic.t.t nodefactor.sum.tactic.t
0.9520811 0.7210718 0.3947144 0.6041328 0.9558278
nodecov.sum.E/Muss mutual.min
0.8934614 0.8804177
Joint P-value (lower = worse): 0.9276397 .
MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: EjacNetworkData.txt
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Shortened Analysis.R
Type: application/octet-stream
Size: 12801 bytes
Desc: Shortened Analysis.R
URL:
From morrism at uw.edu Mon Sep 2 07:12:32 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] (Convergence?) Issues Running Valued ERGM with
NodeMix and NodeFactor
In-Reply-To:
References:
Message-ID:
Hi Andre
I suspect the problem is that you have exhausted the df for the tactic
attribute. Think of nodemix as fitting each cell in a matrix defined by
that nodal attribute mixing, minus 1 for the "reference group" (ss.ss for
you), which is then fit by the edges term. At that point the matrix is
fully specified, so there are no df left for the nodefactor terms. In the
standard GLM setting, you'd get an error saying some of these terms were
"aliased" because your model is overspecified.
You might consider using nodematch rather than nodemix. Since you only
have 2 levels for this attribute, you still don't have alot of df in this
mixing matrix, so I'd suggest starting with nodematch("tactic", diff=F)
which is the default. You then have 2 df left, use 1 for comparing
tactic.ss to tactic.t (you'll need to specify which level to omit).
Note that in the new release of ergm (3.10) we have updated the syntax for
specifying "base" factor values. So nodefactor("tactic", base=1) becomes
nodefactor("tactic", levels= -1). More info from ?"nodefactor"
HTH, Martina
On Mon, 2 Sep 2019, Andre Phillips wrote:
> Hello,
>
> My Name is Andre Phillips working out of St Andrews University and have been using statnet to try and analyse how males
> of a species of fish compete in sperm competition amongst each other when using different mating tactics (territorial or
> sneaker).
>
> Apologies if this is the wrong place to ask about this issue but I have been unable to find a solution from books or
> scouring the internet.
>
> I have been having issues not being able to understand why when I have nodemix and nodefactor in the same model the model
> appears to not be converging.
> This is an issue as Nodemix and NodeFactor are important questions I want to ask of the data. (What are the probabilities
> of a ties between all combinations, and which factor has has the most ties). I have tried a higher iteration model with
> no success.
>
> Model summary output (diagnostics in PS):
> ==========================
> Summary of model fit
> ==========================
>
> Formula: ? c.filt1 ~ sum + nodemix("tactic", base = 1) + nodefactor("tactic") +
> ? ? nodecov("E/Muss") + mutual("min")
>
> Iterations: ?3 out of 20
>
> Monte Carlo MLE Results:
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Estimate? ? ? ? ?Std. Error? ?MCMC%? ?z value? ?Pr(>|z|)
> sum? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1.282e+00 ?1.591e-01 ? ? ?0? ? ? ? ? 8.060? ? ? <1e-04 ***
> mix.tactic.t.ss? ? ? ? ? ? ? ? 1.516e-01 ?2.610e+05 ? ?100? ? ? ?0.000 ? ? ? ?1
> mix.tactic.ss.t? ? ? ? ? ? ? ? ?7.542e-02 ?2.610e+05 ? ?100? ? ? 0.000 ? ? ? ?1
> mix.tactic.t.t? ? ? ? ? ? ? ? ? ? 5.687e-01 ?5.220e+05 ? ?100? ? ?0.000 ? ? ? ?1
> nodefactor.sum.tactic.t -2.638e-01 ?2.610e+05 ? ?100? ? ?0.000 ? ? ? ?1
> nodecov.sum.E/Muss? ? ?8.338e-02 ?1.319e-02 ? ? ?0? ? ? ?6.323? ? ?<1e-04 ***
> mutual.min? ? ? ? ? ? ? ? ? ? ?-8.959e-01 ?8.602e-02 ? ? ?0? ? ? -10.415? ? <1e-04 ***
> ---
> Signif. codes: ?0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>
> ? ? ?Null Deviance: ? ? 0 ?on 132 ?degrees of freedom
> ?Residual Deviance: -1877 ?on 125 ?degrees of freedom
>
> Note that the null model likelihood and deviance are defined to be 0. This means that all likelihood-based inference
> (LRT, Analysis of Deviance, AIC, BIC, etc.) is only valid between models with the same reference distribution and
> constraints.
>
> AIC: -1863 ? ?BIC: -1843 ? ?(Smaller is better.)
>
>
> I have attached my code and data so hope you will be able to replicate my models. Any help will be massively appreciated
> and I hope this work will reveal some interesting information about sperm competition by investigating it in a more
> complex manner than previously attempted.
>
> Thank you very much for your time,
>
> Andre
>
> PS mcmc.diagnostics for the above model:
> Sample statistics summary:
>
> Iterations = 16384:4209664
> Thinning interval = 1024
> Number of chains = 1
> Sample size per chain = 4096
>
> 1. Empirical mean and standard deviation for each variable,
> ? ?plus standard error of the mean:
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Mean ? ? SD Naive SE Time-series SE
> sum ? ? ? ? ? ? ? ? ? ? ?-0.79126 ?29.04 ? 0.4537 ? ? ? ? 0.5414
> mix.tactic.t.ss ? ? ? ? ? 1.33228 ?22.13 ? 0.3457 ? ? ? ? 0.6336
> mix.tactic.ss.t ? ? ? ? ?-0.39160 ?20.25 ? 0.3164 ? ? ? ? 0.6043
> mix.tactic.t.t ? ? ? ? ? -0.43823 ?15.67 ? 0.2448 ? ? ? ? 0.2826
> nodefactor.sum.tactic.t ? 0.06421 ?37.28 ? 0.5826 ? ? ? ? 0.6933
> nodecov.sum.E/Muss ? ? ?-17.50000 365.31 ? 5.7079 ? ? ? ? 6.8205
> mutual.min ? ? ? ? ? ? ? ?0.30200 ?14.67 ? 0.2292 ? ? ? ? 0.2664
>
> 2. Quantiles for each variable:
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? 2.5% ? ?25% ? ?50% ? 75% 97.5%
> sum ? ? ? ? ? ? ? ? ? ? ?-57.0 ?-21.0 ?-1.00 ?20.0 ?54.0
> mix.tactic.t.ss ? ? ? ? ?-42.0 ?-14.0 ? 1.00 ?16.0 ?44.0
> mix.tactic.ss.t ? ? ? ? ?-41.0 ?-14.0 ? 0.00 ?14.0 ?38.0
> mix.tactic.t.t ? ? ? ? ? -31.0 ?-11.0 ? 0.00 ?10.0 ?31.0
> nodefactor.sum.tactic.t ?-72.0 ?-25.0 ? 0.00 ?25.0 ?73.0
> nodecov.sum.E/Muss ? ? ?-729.9 -264.2 -20.05 238.9 681.9
> mutual.min ? ? ? ? ? ? ? -29.0 ? -9.0 ? 1.00 ?10.0 ?28.0
>
>
> Sample statistics cross-correlations:
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sum mix.tactic.t.ss mix.tactic.ss.t mix.tactic.t.t nodefactor.sum.tactic.t
> nodecov.sum.E/Muss mutual.min
> sum ? ? ? ? ? ? ? ? ? ? 1.0000000 ? ? 0.382822467 ? ? ?0.29865751 ? ?0.532864774 ? ? ? ? ? ? ? 0.8371899
> ?0.9722899 ?0.5915027
> mix.tactic.t.ss ? ? ? ? 0.3828225 ? ? 1.000000000 ? ? -0.52976438 ? ?0.003100067 ? ? ? ? ? ? ? 0.3083251
> ?0.3757069 ?0.1525991
> mix.tactic.ss.t ? ? ? ? 0.2986575 ? ?-0.529764381 ? ? ?1.00000000 ? -0.016333567 ? ? ? ? ? ? ? 0.2150496
> ?0.2844547 ?0.2556484
> mix.tactic.t.t ? ? ? ? ?0.5328648 ? ? 0.003100067 ? ? -0.01633357 ? ?1.000000000 ? ? ? ? ? ? ? 0.8332746
> ?0.5814505 ?0.3015219
> nodefactor.sum.tactic.t 0.8371899 ? ? 0.308325115 ? ? ?0.21504961 ? ?0.833274614 ? ? ? ? ? ? ? 1.0000000
> ?0.8660792 ?0.4827973
> nodecov.sum.E/Muss ? ? ?0.9722899 ? ? 0.375706894 ? ? ?0.28445473 ? ?0.581450481 ? ? ? ? ? ? ? 0.8660792
> ?1.0000000 ?0.5751162
> mutual.min ? ? ? ? ? ? ?0.5915027 ? ? 0.152599146 ? ? ?0.25564841 ? ?0.301521948 ? ? ? ? ? ? ? 0.4827973
> ?0.5751162 ?1.0000000
>
> Sample statistics auto-correlation:
> Chain 1
> ? ? ? ? ? ? ? ? ?sum mix.tactic.t.ss mix.tactic.ss.t mix.tactic.t.t nodefactor.sum.tactic.t nodecov.sum.E/Muss
> mutual.min
> Lag 0 ? ? 1.00000000 ? ? ?1.00000000 ? ? ?1.00000000 ? ? 1.00000000 ? ? ? ? ? ? 1.000000000 ? ? ? ?1.000000000
> ?1.000000000
> Lag 1024 ?0.17470368 ? ? ?0.48667045 ? ? ?0.51837032 ? ? 0.18608078 ? ? ? ? ? ? 0.172100862 ? ? ? ?0.176093839
> ?0.149085397
> Lag 2048 ?0.03764507 ? ? ?0.29308593 ? ? ?0.32992848 ? ? 0.04672700 ? ? ? ? ? ? 0.044289212 ? ? ? ?0.040176025
> ?0.025757863
> Lag 3072 -0.01322977 ? ? ?0.17459489 ? ? ?0.22884705 ? ? 0.01343201 ? ? ? ? ? ? 0.001900294 ? ? ? -0.018277910
> ?0.008205692
> Lag 4096 -0.01872013 ? ? ?0.12435937 ? ? ?0.15585097 ? ?-0.02211220 ? ? ? ? ? ?-0.026749425 ? ? ? -0.008303491
> -0.004669403
> Lag 5120 ?0.01153633 ? ? ?0.08800767 ? ? ?0.08302213 ? ?-0.04117159 ? ? ? ? ? ?-0.022585695 ? ? ? ?0.009873491
> ?0.012877551
>
> Sample statistics burn-in diagnostic (Geweke):
> Chain 1
>
> Fraction in 1st window = 0.1
> Fraction in 2nd window = 0.5
>
> ? ? ? ? ? ? ? ? ? ? sum ? ? ? ? mix.tactic.t.ss ? ? ? ? mix.tactic.ss.t ? ? ? ? ?mix.tactic.t.t nodefactor.sum.tactic.t
> ? ? ? ? ? ? ? ? 0.06009 ? ? ? ? ? ? ? ? 0.35703 ? ? ? ? ? ? ? ?-0.85110 ? ? ? ? ? ? ? ? 0.51847 ? ? ? ? ? ? ? ?-0.05539
> ? ? ?nodecov.sum.E/Muss ? ? ? ? ? ? ?mutual.min
> ? ? ? ? ? ? ? ? 0.13393 ? ? ? ? ? ? ? ? 0.15044
>
> Individual P-values (lower = worse):
> ? ? ? ? ? ? ? ? ? ? sum ? ? ? ? mix.tactic.t.ss ? ? ? ? mix.tactic.ss.t ? ? ? ? ?mix.tactic.t.t nodefactor.sum.tactic.t
> ? ? ? ? ? ? ? 0.9520811 ? ? ? ? ? ? ? 0.7210718 ? ? ? ? ? ? ? 0.3947144 ? ? ? ? ? ? ? 0.6041328 ? ? ? ? ? ? ? 0.9558278
> ? ? ?nodecov.sum.E/Muss ? ? ? ? ? ? ?mutual.min
> ? ? ? ? ? ? ? 0.8934614 ? ? ? ? ? ? ? 0.8804177
> Joint P-value (lower = worse): ?0.9276397 .
>
> MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates.
> Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model
> performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command:
> gof(ergmFitObject, GOF=~model).
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From chlai at g2.nctu.edu.tw Tue Sep 3 07:04:34 2019
From: chlai at g2.nctu.edu.tw (=?UTF-8?B?Q2hpaC1IdWkgTGFpICjos7Toh7Pmhacp?=)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Stergm for two-mode networks
Message-ID:
Dear all,
I?d like to use STERGM to analyze the evolution of multiwave two-mode
networks. But I looked through the manual and didn?t find the corresponding
explanations or examples for this type of situation.
Wondering whether anyone has the experience of using STERGM (the packages
of ergm+networkDynamic) to analyze two-mode networks?
Any insight or suggestion for references would be highly appreciated! Thank
you!
Best regards,
Chih-Hui
--
Chin-Hui Lai (???), PhD
Associate Professor
Department of Communication & Technology
National Chiao Tung University
Email: chlai @g2.nctu.edu.tw
Mobile:0966192712
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From p.krivitsky at unsw.edu.au Thu Sep 5 08:41:28 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Stergm for two-mode networks
In-Reply-To:
References:
Message-ID: <6dd65feb73bd44c9be0882bdc682f3d350e50934.camel@unsw.edu.au>
Dear Chih-Hui,
There are no instructions for STERGMs on two-mode networks as such, but stergm() handles two-mode networks without any additional setup. Just set up a series of bipartite networks (using the network package), and feed them to stergm() as you would one-mode networks.
I hope this helps,
Pavel
On Tue, 2019-09-03 at 22:04 +0800, Chih-Hui Lai (???) wrote:
Dear all,
I?d like to use STERGM to analyze the evolution of multiwave two-mode networks. But I looked through the manual and didn?t find the corresponding explanations or examples for this type of situation.
Wondering whether anyone has the experience of using STERGM (the packages of ergm+networkDynamic) to analyze two-mode networks?
Any insight or suggestion for references would be highly appreciated! Thank you!
Best regards,
Chih-Hui
--
Chin-Hui Lai (???), PhD
Associate Professor
Department of Communication & Technology
National Chiao Tung University
Email: chlai @g2.nctu.edu.tw
Mobile:0966192712
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From chlai at g2.nctu.edu.tw Thu Sep 5 08:45:37 2019
From: chlai at g2.nctu.edu.tw (=?UTF-8?B?Q2hpaC1IdWkgTGFpICjos7Toh7Pmhacp?=)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Stergm for two-mode networks
In-Reply-To: <6dd65feb73bd44c9be0882bdc682f3d350e50934.camel@unsw.edu.au>
References:
<6dd65feb73bd44c9be0882bdc682f3d350e50934.camel@unsw.edu.au>
Message-ID:
Thank you, Pavel! I will give it a try.
On Thu, Sep 5, 2019 at 23:41 Pavel Krivitsky
wrote:
> Dear Chih-Hui,
>
> There are no instructions for STERGMs on two-mode networks as such, but
> stergm() handles two-mode networks without any additional setup. Just set
> up a series of bipartite networks (using the network package), and feed
> them to stergm() as you would one-mode networks.
>
> I hope this helps,
> Pavel
>
> On Tue, 2019-09-03 at 22:04 +0800, Chih-Hui Lai (???) wrote:
>
> Dear all,
> I?d like to use STERGM to analyze the evolution of multiwave two-mode
> networks. But I looked through the manual and didn?t find the corresponding
> explanations or examples for this type of situation.
>
> Wondering whether anyone has the experience of using STERGM (the packages
> of ergm+networkDynamic) to analyze two-mode networks?
>
> Any insight or suggestion for references would be highly appreciated!
> Thank you!
>
>
> Best regards,
> Chih-Hui
> --
> Chin-Hui Lai (???), PhD
> Associate Professor
> Department of Communication & Technology
> National Chiao Tung University
> Email: chlai @g2.nctu.edu.tw
> Mobile:0966192712
>
> _______________________________________________
>
> statnet_help mailing list
>
> statnet_help@u.washington.edu
>
>
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
>
> --
Chin-Hui Lai (???), PhD
Associate Professor
Department of Communication & Technology
National Chiao Tung University
Email: chlai @g2.nctu.edu.tw
Mobile:0966192712
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From pauline.fernandez at gmail.com Sun Sep 8 21:05:57 2019
From: pauline.fernandez at gmail.com (Pauline Fernandez)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Stochastic Block Modeling
Message-ID:
Hi,
I am a grad student at CSULB, working on my thesis on social network
modeling. I am trying to specify and fit a stochastic block model for my
data. Unfortunately, the method that I am trying t use (which is mixer) is
no longer available in R. I'm looking through the blockmodeling function as
well as blockmodel.gen function, but unfortunately, I am not able to find
many examples and resources online. Do you have any other resources where I
can learn more about stochastic block modeling in R?
Thank you,
Pauline Fernandez
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From feng_pengfei at cnu.edu.cn Tue Sep 24 05:18:44 2019
From: feng_pengfei at cnu.edu.cn (=?utf-8?B?5Yav6bmP6aOeRmVuZ1BlbmdmZWk=?=)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Valued network for TERGM
Message-ID:
Dear members in Stanet group,
I plan to build a model of TERGM based on valued & directed networks.
Relevant tutorials such as https://statnet.github.io/Workshops/valued.html and
https://statnet.github.io/Workshops/tergm_tutorial.html provide great help for me.
However, there is not such a tutorial tackling my research question in statnet.github as I know.
I tried to create a dynamic valued network object in RStudio by building a list including 9 valued networks firstly, and then used the "networkDynamic" term:
patlist<-list(patentNet8,patentNet9,patentNet10,patentNet11,patentNet12,
patentNet13,patentNet14,patentNet15,patentNet16)
patdyn<-networkDynamic(network.list = patlist)
I got such a result where the attribute of edges was missing:
> patdyn
NetworkDynamic properties:
distinct change times: 10
maximal time range: 0 until 9
Includes optional net.obs.period attribute:
Network observation period info:
Number of observation spells: 1
Maximal time range observed: 0 until 9
Temporal mode: discrete
Time unit: step
Suggested time increment: 1
Network attributes:
vertices = 13
directed = TRUE
hyper = FALSE
loops = FALSE
multiple = FALSE
bipartite = FALSE
net.obs.period: (not shown)
total edges= 96
missing edges= 0
non-missing edges= 96
Vertex attribute names:
active avGdp foreign plicDen vertex.names
Edge attribute names:
active
It seems possible that activate.edge.attribute term may be useful to add attributes to the edges in the dynamic network. But it is too complex and time-consuming for me as values of all edges in each networks are different .
Could you tell me how to built a temporal valued network directly using a set of valued matrixes data?
Thanks!
Feng Pengfei,24/09/2019
PHD Students in College of Resource Environment and Tourism,
Capital Normal Universtiy, Peking, P.R.China
Email: feng_pengfei@cnu.edu.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From p.krivitsky at unsw.edu.au Wed Sep 25 00:06:17 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Valued network for TERGM
In-Reply-To:
References:
Message-ID:
Dear Feng,
Unfortunately, we don't have support for valued TERGMs at this time. This is something we are hoping to do eventually, time and funding permitting. You might be able to specify such a model with clever use of constraints and perhaps custom statistics, but that would depend on exactly what you are trying to model and how.
Best Regards,
Pavel
On Tue, 2019-09-24 at 20:18 +0800, ???FengPengfei wrote:
Dear members in Stanet group,
I plan to build a model of TERGM based on valued & directed networks.
Relevant tutorials such as https://statnet.github.io/Workshops/valued.html and
https://statnet.github.io/Workshops/tergm_tutorial.html provide great help for me.
However, there is not such a tutorial tackling my research question in statnet.github as I know.
I tried to create a dynamic valued network object in RStudio by building a list including 9 valued networks firstly, and then used the "networkDynamic" term:
patlist<-list(patentNet8,patentNet9,patentNet10,patentNet11,patentNet12,
patentNet13,patentNet14,patentNet15,patentNet16)
patdyn<-networkDynamic(network.list = patlist)
I got such a result where the attribute of edges was missing:
> patdyn
NetworkDynamic properties:
distinct change times: 10
maximal time range: 0 until 9
Includes optional net.obs.period attribute:
Network observation period info:
Number of observation spells: 1
Maximal time range observed: 0 until 9
Temporal mode: discrete
Time unit: step
Suggested time increment: 1
Network attributes:
vertices = 13
directed = TRUE
hyper = FALSE
loops = FALSE
multiple = FALSE
bipartite = FALSE
net.obs.period: (not shown)
total edges= 96
missing edges= 0
non-missing edges= 96
Vertex attribute names:
active avGdp foreign plicDen vertex.names
Edge attribute names:
active
It seems possible that activate.edge.attribute term may be useful to add attributes to the edges in the dynamic network. But it is too complex and time-consuming for me as values of all edges in each networks are different .
Could you tell me how to built a temporal valued network directly using a set of valued matrixes data?
Thanks!
Feng Pengfei,24/09/2019
PHD Students in College of Resource Environment and Tourism,
Capital Normal Universtiy, Peking, P.R.China
Email: feng_pengfei@cnu.edu.cn
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From j.hoffmann at uni-heidelberg.de Wed Oct 2 06:46:32 2019
From: j.hoffmann at uni-heidelberg.de (Hoffmann, Jakob)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Inverse nodematch statistic
Message-ID: <94963d246e6f444cbabf74b56aecb5f2@exch04.ad.uni-heidelberg.de>
Dear statnet community,
I am looking for a relatively simple ergm statistic which I however was not able to reconstruct from the available terms.
The statistic would be akin to an 'inverse' of the nodematch statistic in that it computes for (a selection of levels of) a nodal grouping attribute not the count of group-internal ties but the count of ties between groups. For specific pairs of levels of the grouping attribute this could be done with the mm() term but what I am looking for would be the sum of several of those pair-wise counts.
Did I miss something or would anyone know how to construct such a statistic from the existing terms?
Many thanks and all the best
Jakob
Jakob Hoffmann
Research Associate
Economic Geography Group
Institute of Geography, Heidelberg University
Berliner Str. 48, D-69120 Heidelberg, Germany
Fon +49 (6221) 54 4581
Email j.hoffmann@uni-heidelberg.de
www.uni-heidelberg.de/economic-geography
http://www.geog.uni-heidelberg.de/wiso/institutionalchange.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michal2992 at gmail.com Wed Oct 2 08:46:28 2019
From: michal2992 at gmail.com (=?UTF-8?Q?Micha=C5=82_Bojanowski?=)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Inverse nodematch statistic
In-Reply-To: <94963d246e6f444cbabf74b56aecb5f2@exch04.ad.uni-heidelberg.de>
References: <94963d246e6f444cbabf74b56aecb5f2@exch04.ad.uni-heidelberg.de>
Message-ID:
Jakob,
I believe you can obtain what you need by computing one or more binary
matrices which have 1s for dyads that you consider between group, 0s
otherwise, and then using them as input for `dyadcov` term. You will
have a complete freedom which dyads you consider a match or a
non-match.
In fact the `nodematch` term is indeed equivalent to one (for
dichotomous node attribute) or more (for polytomous node attribute)
binary dyadic covariates. In the dichotomous case `nodematch` is
equivalent to a `dyadcov` term with an input matrix that has 1s
whenever the nodes in a dyad have the same value of the nodal
attribute and 0 otherwise.
I will be happy to elaborate if the above is too terse....
hth,
Michal
On Wed, Oct 2, 2019 at 3:47 PM Hoffmann, Jakob
wrote:
>
> Dear statnet community,
>
>
>
> I am looking for a relatively simple ergm statistic which I however was not able to reconstruct from the available terms.
>
> The statistic would be akin to an ?inverse? of the nodematch statistic in that it computes for (a selection of levels of) a nodal grouping attribute not the count of group-internal ties but the count of ties between groups. For specific pairs of levels of the grouping attribute this could be done with the mm() term but what I am looking for would be the sum of several of those pair-wise counts.
>
>
>
> Did I miss something or would anyone know how to construct such a statistic from the existing terms?
>
>
>
> Many thanks and all the best
>
> Jakob
>
>
>
>
>
> Jakob Hoffmann
>
> Research Associate
>
> Economic Geography Group
>
> Institute of Geography, Heidelberg University
>
> Berliner Str. 48, D-69120 Heidelberg, Germany
>
>
>
> Fon +49 (6221) 54 4581
>
> Email j.hoffmann@uni-heidelberg.de
>
> www.uni-heidelberg.de/economic-geography
>
> http://www.geog.uni-heidelberg.de/wiso/institutionalchange.html
>
>
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
From sunnylee78 at gmail.com Sun Oct 6 12:51:13 2019
From: sunnylee78 at gmail.com (Sunny Lee)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Valued ERGM
Message-ID:
Hi all,
I am running valued ERGM for both formal and informal communication
networks of my data (construction meetings of 26 members).
I was able to find a pretty good fit with the formal network, with Poisson
distribution as the reference, and tested the GOF with cyclicalweights
("min", "max", "min").
I was also able to model the informal network with a similar set of
parameters, but when I tried GOF, it keeps giving me this error message:
*In cbind(m, get.edge.attribute(x$mel, attrname, na.omit = FALSE, :
number of rows of result is not a multiple of vector length (arg 2)*
Do you have any idea why I may be getting this, and how to fix the problem?
Best,
Sunny
--
Sun Kyong (Sunny) Lee, Ph.D.
Associate Professor
Department of Communication
The University of Oklahoma
email: sunnylee78@gmail.com ; sunklee@ou.edu
610 Elem Ave., Norman, OK
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Anja.Osei at uni-konstanz.de Sat Nov 2 03:31:57 2019
From: Anja.Osei at uni-konstanz.de (Anja Osei)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Warning message:,
`set_attrs()` is deprecated as of rlang 0.3.0
Message-ID: <97319f64-f18f-0277-c5e2-0ed5887e592d@uni-konstanz.de>
Dear all,
I got following warning message after ergm fitting:
Warning message:
`set_attrs()` is deprecated as of rlang 0.3.0
What exactly does it mean?
I'll be grateful for some guidance on this.
Best regards,
Anja
--
Dr. Anja Osei
Universit?t Konstanz
FB Politik und Verwaltungswissenschaft
Internationale Politik und Konfliktforschung
Postfach 90
78457 Konstanz
07531-88 2389
Raum D 328
From public at careaga.net Sat Nov 2 12:48:27 2019
From: public at careaga.net (Richard Careaga)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] statnet_help Digest, Vol 159, Issue 1
In-Reply-To:
References:
Message-ID:
According to the rlang git repository
,
it is being retired in favor of structure().
The warning is just notice that set_attrs() shouldn?t be used for any new
or updated programs that rely on it, because it may disappear entirely at
some point.
Richard @technocrat
On November 2, 2019 at 12:04:09 PM,
statnet_help-request@mailman13.u.washington.edu (
statnet_help-request@mailman13.u.washington.edu) wrote:
Send statnet_help mailing list submissions to
statnet_help@u.washington.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
or, via email, send a message with subject or body 'help' to
statnet_help-request@mailman13.u.washington.edu
You can reach the person managing the list at
statnet_help-owner@mailman13.u.washington.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of statnet_help digest..."
Today's Topics:
1. Warning message:, `set_attrs()` is deprecated as of rlang
0.3.0 (Anja Osei)
Dear all,
I got following warning message after ergm fitting:
Warning message:
`set_attrs()` is deprecated as of rlang 0.3.0
What exactly does it mean?
I'll be grateful for some guidance on this.
Best regards,
Anja
--
Dr. Anja Osei
Universit?t Konstanz
FB Politik und Verwaltungswissenschaft
Internationale Politik und Konfliktforschung
Postfach 90
78457 Konstanz
07531-88 2389
Raum D 328
_______________________________________________
statnet_help mailing list
statnet_help@mailman13.u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From momin.malik at gmail.com Wed Nov 6 13:57:56 2019
From: momin.malik at gmail.com (Momin M. Malik)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] ergm.userterms advice: dyad-independent term not
coinciding with logistic regression results
In-Reply-To:
References:
Message-ID:
I missed this response two months ago in the statnet digest!
Thank you for this, Steve, it was a great explanation. Things are working
better, but now I might be getting into numerical stability issues?
For an "edges + sender_covar*receiver_covar" model (not written like that,
but basically, an "edges and interaction-only" model),
- the GLM (IRLS) estimate of the intercept is -2.2800416 (0.0553773),
- the ERGM (IRLS) estimate of the edges parameter is -2.248700 (0.055002).
- the GLM estimate of the sender_covar*receiver_covar term is 0.0018658
(0.0002116),
- the ERGM estimate of the sender_covar*receiver_covar term is 0.001659
(0.000215).
My main question:
*How much should the ERGM estimates (for a dyad-independent-terms-only
model) differ from the logistic regression ones before I should start to
worry? *
Again, as far as I understand, for a model with only dyad-independent
terms, the pseudolikelihood is equal to the likelihood. So, for a simple
likelihood surface, I would expect the MCMC and IRLS to be almost exactly
the same. As my exemplar, I considered an edges/intercept-only model, where
the estimated coefficients agree to 7 significant figures and the estimated
standard errors agree to 4 significant figures. Clearly, the above figures
don't agree anywhere as well.
As a related question, the way I defined prod(), prod(, 1, 0) should do the
same thing as nodeocov, and prod(, 0, 1) should do the same thing as
nodeicov. But the estimates don't agree (much worse than the above) for
various minimal models. Looking at the C++ code for the changestats of
nodeocov and nodeicov, there's an extra "oshift" term . I don't follow what
that does. Is that something for numerical stability? Maybe that's the
missing piece that I should add to my function as well?
To show what my goal has been, I've attached the plots of the estimated
5th-order polynomial surfaces for sender-receiver "tenure" interaction in
the Lazega friendship network. Not that this is my actual modeling target,
it's just some test data to plug in. This shows better than does the
numerical comparison how GLM and ERGM substantively depart, although I note
this is a model with 22 terms (the edges/intercept term, all 6 fifth-order
interaction terms, all 5 fourth-order interaction terms, etc.) so it might
just be an issue of estimation being delicate for so many terms. In terms
of estimates themselves, there's a decent .96 pearson correlation between
the two estimations, but there are a few pretty bad outliers out of those
22 terms and the spearman correlation is much worse, around .46.
Thank you again!
Momin
--
Momin M. Malik, PhD
Postdoctoral Data Science Research Fellow
Berkman Klein Center for Internet & Society
at Harvard University
On Tue, Aug 13, 2019 at 4:32 PM <
statnet_help-request@mailman13.u.washington.edu> wrote:
> Send statnet_help mailing list submissions to
> statnet_help@u.washington.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
> or, via email, send a message with subject or body 'help' to
> statnet_help-request@mailman13.u.washington.edu
>
> You can reach the person managing the list at
> statnet_help-owner@mailman13.u.washington.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of statnet_help digest..."
> Today's Topics:
>
> 2. Re: ergm.userterms advice: dyad-independent term not
> coinciding with logistic regression results (Steven Goodreau)
>
> ---------- Forwarded message ----------
> From: Steven Goodreau
> To: statnet_help@u.washington.edu
> Cc:
> Bcc:
> Date: Tue, 13 Aug 2019 13:31:52 -0700
> Subject: Re: [statnet_help] ergm.userterms advice: dyad-independent term
> not coinciding with logistic regression results
> Hi Momin -
>
> I think I've found your issue. Short version: you should make the
> following changes throughout your code:
> INPUT_PARAM[t] -> INPUT_PARAM[t+1]
> INPUT_PARAM[h] -> INPUT_PARAM[h+1]
>
> Longer answer:
> INPUT_PARAM is pulling in parameter values from the vector passed in from
> R by position. A trick in this is that R indexes vectors beginning with 1
> and C does so beginning with 0.
>
> In the example you're building off of, there just happens to be one
> parameter passed (pow) followed by the vector of attributes. The positions
> of these are thus:
>
> in R: position 1 = pow, position 2:(n+1) = attribute values for nodes 1
> through n
> in C: position 0 = pow, position 1:(n) = attribute values for nodes 1
> through n
>
> From this code, it is easy to think that the macro INPUT_PARAM[x] is
> written to always get the attribute value for node x, but really it's
> designed to get the parameter in position x; it just happens that in the
> above case those line up.
>
> In your term, you've added in an additional parameter, making the
> positions as follows:
>
> in R: position 1 = p1, 2 = p2, position 3:(n+2) = attribute values for
> nodes 1 through n
> in C: position 0 = p1, 1 = p2, position 2:(n+1) = attribute values for
> nodes 1 through n
>
> So now to get the attribute values for node t, you need INPUT_PARAM[t+1]
>
> Everything else looks good from my quick perusal, so hopefully that will
> fix it.
>
> FYI - the ergm_userterms workshop materials may be useful as you go beyond
> this - they're available at https://github.com/statnet/Workshops/wiki.
> And indeed, the issue about indexing and the interpretation of the INPUT_PARAM
> macro is something we knew is a sticking point, so we talk about it in
> there.
>
> As for the sign handling, if you're referring to CHANGE_STAT[0] +=
> IS_OUTEDGE(t,h) ? -change : change;
> then this is the line that checks to see if the tie already exists (in
> which case it's being dissolved so this particular change stat goes down)
> or doesn't already exist (in which case it's being formed so this
> particular change stat goes up). Note that this simple relationship (tie
> dissolution decreases change stat by x, tie formation increases change stat
> by x) holds for many, but not all, terms. (My favorite counter-example is
> degree 0).
>
> HTH,
> Steve
>
> On 7/28/2019 5:09 PM, Momin M. Malik wrote:
>
> I've written an ergm userterm for the *product* of two node covariates,
> as an interaction effect for continuous covariates.
>
> As a check, I did a logistic regression for comparison. The outputs are
> close but not perfectly equal, which makes me nervous, since as I
> understand the statnet estimation defaults to the built-in glm if all terms
> are dyad-independent. I'm hoping to get advice about what might be going
> wrong.
>
> *Details:*
> Here's my changestat. I modeled it on d_absdiff, although I see that
> d_diff has some sign handling which I don't fully understand (other than
> handling pow==0.0, which I could do to improve this).
> CHANGESTAT_FN(d_prod) {
> double change, p1, p2; Vertex t, h; int i;
> ZERO_ALL_CHANGESTATS(i);
> FOR_EACH_TOGGLE(i) {
> t = TAIL(i); h = HEAD(i);
> p1 = INPUT_PARAM[0];
> p2 = INPUT_PARAM[1];
> if((p1==1.0)&&(p2==1.0)) {
> change = INPUT_PARAM[t]*INPUT_PARAM[h];
> } else {
> change = pow(INPUT_PARAM[t], p1)*pow(INPUT_PARAM[h], p2);
> }
> CHANGE_STAT[0] += IS_OUTEDGE(t,h) ? -change : change;
> TOGGLE_IF_MORE_TO_COME(i);
> }
> UNDO_PREVIOUS_TOGGLES(i);
> }
>
> and the respective InitErgmTerm:
> InitErgmTerm.prod <- function(nw, arglist, ...) {
> a <- check.ErgmTerm(nw, arglist, directed = NULL, bipartite = NULL,
> varnames = c("attrname", "pow1", "pow2"),
> vartypes = c("character", "numeric", "numeric"),
> defaultvalues = list(NULL, 1, 1),
> required = c(TRUE, FALSE, FALSE))
> nodecov <- get.node.attr(nw, a$attrname)
> list(name = "prod",
> coef.names = paste(paste("prod", if(!((a$pow1 == 1) &
> (a$pow2 == 1)))
> paste(a$pow1, a$pow2, sep = ",") else "", sep = ""),
> a$attrname, sep = "."),
> pkgname = "ergm.userterms",
> inputs = c(a$pow1, a$pow2, nodecov),
> dependence = FALSE)
> }
>
>
> I'm testing with the Lazega lawyers data:
> temp <- tempfile()
> download.file("
> https://www.stats.ox.ac.uk/~snijders/siena/LazegaLawyers.zip",temp)
> A <- as.matrix(read.table(unz(temp, "ELfriend.dat")))
> node <- read.table(unz(temp, "ELattr.dat"))
> names(nodes) <- c("seniority",
> "status",
> "sex",
> "office",
> "tenure",
> "age",
> "practice",
> "lawschool")
> n <- nrow(A)
> df <- data.frame(from = rep(1:n, times = n),
> to = rep(1:n, each = n)) # Create a data frame of edges,
> *with* self-loops
> df$y <- as.vector(A)
> df$from.tenure <- rep(nodes$tenure, times = n)
> df$to.tenure <- rep(nodes$tenure, each = n)
> df$diff.tenure <- from.tenure - to.tenure
> df$prod.tenure <- from.tenure*to.tenure
> df <- df[df$from != df$to,] # eliminate self-loops
>
> colnames(A) <- NULL
> lazega <- network(A, directed = T)
> lazega %v% "tenure" <- nodes$tenure
>
> Now, if I use existing dyad-independent terms in the ERGM,
> erg.0 <- ergm(lazega ~ edges + diff("tenure"))
> glm.0 <- glm(y ~ diff.tenure, data = df, family = binomial)
>
> ?as expected, I get identical (up to 4 significant figures) estimates,
> standard errors, z-values, p-values.
> Monte Carlo MLE Results:
> Estimate Std. Error MCMC % z value Pr(>|z|)
> edges -2.035528 0.044414 0 -45.831 <1e-04 ***
> diff.t-h.tenure -0.004860 0.003266 0 -1.488 0.137
>
> Coefficients:
> Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.035528 0.044413 -45.832 <2e-16 ***
> diff.tenure -0.004860 0.003266 -1.488 0.137
>
> But now, when I try out a model with own term, after doing all the R CMD
> build and R CMD INSTALL:
> erg.1 <- ergm(lazega ~ edges + prod("tenure"))
> glm.1 <- glm(y ~ prod.tenure, data = df, family = binomial)
> summary(erg.1)
> summary(glm.1)
>
> The results I get are substantively the same, although now agree only to 1
> significant figure.
> > summary(erg.1)
> ==========================
> Summary of model fit
> ==========================
>
> Formula: lazega ~ edges + prod("tenure")
>
> Iterations: 4 out of 20
>
> Monte Carlo MLE Results:
> Estimate Std. Error MCMC % z value Pr(>|z|)
> edges -2.248700 0.055002 0 -40.884 <1e-04 ***
> prod.tenure 0.001659 0.000215 0 7.717 <1e-04 ***
> ---
> Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>
> Null Deviance: 6890 on 4970 degrees of freedom
> Residual Deviance: 3508 on 4968 degrees of freedom
>
> AIC: 3512 BIC: 3525 (Smaller is better.)
>
> > summary(glm.1)
>
> Call:
> glm(formula = y ~ prod.tenure, family = binomial, data = df)
>
> Deviance Residuals:
> Min 1Q Median 3Q Max
> -1.0014 -0.4800 -0.4536 -0.4445 2.1798
>
> Coefficients:
> Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.2800416 0.0553773 -41.173 <2e-16 ***
> prod.tenure 0.0018658 0.0002116 8.819 <2e-16 ***
> ---
> Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>
> (Dispersion parameter for binomial family taken to be 1)
>
> Null deviance: 3561.1 on 4969 degrees of freedom
> Residual deviance: 3492.1 on 4968 degrees of freedom
> AIC: 3496.1
>
> Number of Fisher Scoring iterations: 4
>
> Any help or advice is appreciated! This is my first foray into
> ergm.userterms.
>
> Momin
>
> _______________________________________________
> statnet_help mailing liststatnet_help@u.washington.eduhttp://mailman13.u.washington.edu/mailman/listinfo/statnet_help
>
>
> --
> *****************************************************************
> Steven M. Goodreau / Professor / Dept. of Anthropology
> Physical address: Denny Hall M236
> Mailing address: Campus Box 353100 / 4216 Memorial Way NE
> Univ. of Washington / Seattle WA 98195
> 1-206-685-3870 (phone) /1-206-543-3285 (fax)http://faculty.washington.edu/goodreau
> *****************************************************************
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@mailman13.u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazega_tenure_ergm.png
Type: image/png
Size: 97818 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazega_tenure_glm.png
Type: image/png
Size: 112491 bytes
Desc: not available
URL:
From c.e.g.steglich at rug.nl Tue Nov 12 15:45:49 2019
From: c.e.g.steglich at rug.nl (Christian Steglich)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] question on necessity of dependencies
Message-ID: <8896254d-a6d8-d009-ca88-38fb25a232db@rug.nl>
Dear all,
it seems the ergm package for a while has been dependent on a lot of
intransparent stuff, including the tidyverse, which seems inconvenient
from a programming tidyness point of view - here what happened right now
upon giving the install.packages('ergm') command to a clean R environment:
also installing the dependencies ?backports?, ?ellipsis?, ?digest?,
?zeallot?, ?utf8?, ?vctrs?, ?magrittr?, ?DEoptimR?, ?cli?, ?crayon?,
?fansi?, ?pillar?, ?pkgconfig?, ?assertthat?, ?glue?, ?R6?, ?Rcpp?,
?tidyselect?, ?BH?, ?plogr?, ?network?, ?robustbase?, ?coda?, ?trust?,
?lpSolve?, ?statnet.common?, ?purrr?, ?rlang?, ?tibble?, ?dplyr?
What is this needed for? Can it be bypassed or undone somehow? Or can
someone explain the underlying policy to me?
Best, Christian
--
------------------------------------------------------------------------
*Interuniversity Centre for Social Science Theory & Methodology*
Department of Sociology, Grote Rozenstraat 31, NL-9712 TG GRONINGEN
steglich.gmw.rug.nl
------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michal2992 at gmail.com Wed Nov 13 06:57:54 2019
From: michal2992 at gmail.com (=?UTF-8?Q?Micha=C5=82_Bojanowski?=)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] question on necessity of dependencies
In-Reply-To: <8896254d-a6d8-d009-ca88-38fb25a232db@rug.nl>
References: <8896254d-a6d8-d009-ca88-38fb25a232db@rug.nl>
Message-ID:
Hi Christian,
Briefly speaking, among the direct dependencies (Imports) we currently
have purr, rlang, tibble, and dplyr. The first two are primarily used
for more advanced "computing on the language" which include better
condition handling in the code of model terms, manipulation of model
formulas and associated environments. Other tidyverse-related packages
(pillar, cli, etc.) are second-order (distance 2 in dependency graph)
and are primarily brought by tibble and dplyr, which perhaps is
suboptimal. We try to scrutinize this as much as possible. Loading
ergm strives to be as namespace-friendly as possible: the dependency
packages are loaded but not attached (apart from 'network') so it
should not interfere with your tidy tidyverse-free code.
Do you run into any specific problems or is it just the installation time?
Michal
On Wed, Nov 13, 2019 at 12:46 AM Christian Steglich
wrote:
>
> Dear all,
>
> it seems the ergm package for a while has been dependent on a lot of intransparent stuff, including the tidyverse, which seems inconvenient from a programming tidyness point of view - here what happened right now upon giving the install.packages('ergm') command to a clean R environment:
>
> also installing the dependencies ?backports?, ?ellipsis?, ?digest?, ?zeallot?, ?utf8?, ?vctrs?, ?magrittr?, ?DEoptimR?, ?cli?, ?crayon?, ?fansi?, ?pillar?, ?pkgconfig?, ?assertthat?, ?glue?, ?R6?, ?Rcpp?, ?tidyselect?, ?BH?, ?plogr?, ?network?, ?robustbase?, ?coda?, ?trust?, ?lpSolve?, ?statnet.common?, ?purrr?, ?rlang?, ?tibble?, ?dplyr?
>
> What is this needed for? Can it be bypassed or undone somehow? Or can someone explain the underlying policy to me?
>
> Best, Christian
>
> --
> ________________________________
> Interuniversity Centre for Social Science Theory & Methodology
> Department of Sociology, Grote Rozenstraat 31, NL-9712 TG GRONINGEN
> steglich.gmw.rug.nl
> ________________________________
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
From p.krivitsky at unsw.edu.au Wed Nov 13 21:02:32 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Valued ERGM
In-Reply-To:
References:
Message-ID: <4fc988f8c8024444c9fe135357a13edf72913601.camel@unsw.edu.au>
Hi,
Unfortunately, we don't have gof() for valued networks yet. I am surprised that it didn't give you a more informative error message, e.g.,
> library(ergm.count)
> example(zach)
zach> data(zach)
zach> oldpal <- palette()
zach> palette(gray((1:8)/8))
zach> plot(zach, vertex.col="role", displaylabels=TRUE, edge.col="contexts")
zach> palette(oldpal)
zach> ## No test:
zach> # Fit a binomial-reference ERGM.
zach>
zach> zach.fit1 <- ergm(zach~nonzero+sum+nodefactor("role",base=2)+absdiffcat("faction.id"),
zach+ response="contexts", reference=~Binomial(8),
zach+ control=control.ergm(MCMLE.trustregion=1000))
...
zach> mcmc.diagnostics(zach.fit1)
...
zach> summary(zach.fit1)
> gof(zach.fit1)
Error in gof.ergm(zach.fit1) :
GoF for valued ERGMs is not implemented at this time.
Best,
Pavel
On Mon, 2019-10-07 at 04:51 +0900, Sunny Lee wrote:
Hi all,
I am running valued ERGM for both formal and informal communication networks of my data (construction meetings of 26 members).
I was able to find a pretty good fit with the formal network, with Poisson distribution as the reference, and tested the GOF with cyclicalweights ("min", "max", "min").
I was also able to model the informal network with a similar set of parameters, but when I tried GOF, it keeps giving me this error message: In cbind(m, get.edge.attribute(x$mel, attrname, na.omit = FALSE, :
number of rows of result is not a multiple of vector length (arg 2)
Do you have any idea why I may be getting this, and how to fix the problem?
Best,
Sunny
_______________________________________________
statnet_help mailing list
statnet_help@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From p.krivitsky at unsw.edu.au Wed Nov 13 21:03:53 2019
From: p.krivitsky at unsw.edu.au (Pavel Krivitsky)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] Warning message:,
`set_attrs()` is deprecated as of rlang 0.3.0
In-Reply-To: <97319f64-f18f-0277-c5e2-0ed5887e592d@uni-konstanz.de>
References: <97319f64-f18f-0277-c5e2-0ed5887e592d@uni-konstanz.de>
Message-ID: <1c6287e663e6488317d702916aed46b1a2b1999d.camel@unsw.edu.au>
Hi, Ana,
It's a spurious warning. It'll be fixed in the next release.
Best,
Pavel
On Sat, 2019-11-02 at 11:31 +0100, Anja Osei wrote:
> Dear all,
>
> I got following warning message after ergm fitting:
>
> Warning message:
> `set_attrs()` is deprecated as of rlang 0.3.0
>
> What exactly does it mean?
>
> I'll be grateful for some guidance on this.
>
> Best regards,
> Anja
>
> --
> Dr. Anja Osei
> Universit?t Konstanz
> FB Politik und Verwaltungswissenschaft
> Internationale Politik und Konfliktforschung
> Postfach 90
> 78457 Konstanz
>
> 07531-88 2389
> Raum D 328
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
From ssk170 at scarletmail.rutgers.edu Sat Nov 16 14:28:40 2019
From: ssk170 at scarletmail.rutgers.edu (Sergei Kostiaev)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] custom layout, node attributes
Message-ID:
good evening,
i'm new to network analysis
i've created this dataset and i'm working on it with this code
see dataset and rmd files attached
at the moment, i want to plot the network of organizations in a way that
organizations that have attribute "-1" are on the left side of the screen
of the computer, and organizations that have attribute "1" are on the right
additionally, i need those with "1" to be red and those with "-1" to be blue
it's bipartite network
Best regards,
Dr. Sergei Kostiaev
PhD Candidate
Edward J. Bloustein School of Planning and Public Policy;
Part-Time Lecturer
Political Science Department
Rutgers University;
U.S. cell +1(202)361-7672
http://bloustein.rutgers.edu/kostiaev/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kostiaev project for network class.Rmd
Type: application/octet-stream
Size: 2908 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coalitionsAHPs.csv
Type: text/csv
Size: 55389 bytes
Desc: not available
URL:
From buttsc at uci.edu Sat Nov 16 22:57:47 2019
From: buttsc at uci.edu (Carter T. Butts)
Date: Tue Aug 3 21:58:13 2021
Subject: [statnet_help] custom layout, node attributes
In-Reply-To:
References:
Message-ID:
Hi, Sergei -
Take a look at the "coord" argument in the help for gplot, gplot3d, or
plot.network (whichever you are using).? The "interactive" argument can
also be helpful for refining an auto-generated layout, and you can
create new layout functions as well (see ?gplot.layout or
?network.layout for more details). Information on vertex coloring and
such can also be found on the appropriate help pages.
Hope that helps,
-Carter
On 11/16/19 2:28 PM, Sergei Kostiaev wrote:
> good evening,
>
> i'm new to network analysis
> i've?created this dataset and i'm working on it with this code
> see dataset and rmd files attached
> at the moment, i want to plot the network of organizations in a way
> that organizations that have attribute "-1" are on the left side of
> the screen of the computer, and organizations that have attribute "1"
> are on the right
> additionally, i need those with "1" to be red and those with "-1" to
> be blue
> it's bipartite network
>
>
> Best regards,
> Dr. Sergei Kostiaev
> PhD Candidate
> Edward J. Bloustein School of Planning and Public Policy;
> Part-Time Lecturer
> Political Science Department
> Rutgers University;
> U.S. cell +1(202)361-7672
> http://bloustein.rutgers.edu/kostiaev/
>
>
>
>
> _______________________________________________
> statnet_help mailing list
> statnet_help@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ssk170 at scarletmail.rutgers.edu Sun Nov 17 10:51:16 2019
From: ssk170 at scarletmail.rutgers.edu (Sergei Kostiaev)
Date: Tue Aug 3 21:58:14 2021
Subject: [statnet_help] variable names in dataset are treated as vertices in
network
Message-ID:
good afternoon,
i'm new to R and network analysis
i've attempted to create network object from dataset i've collected
i noticed that after i ran
network.vertex.names(cN)
line 71 in rmd file
i have variable names "organization" "signatory_to", "supports" treated as
vertices in network object
can anybody tell me what's wrong:
did i import data from cvs file in the wrong way? (but i had first rows as
names of variables)
or i created network object in the wrong way?
rmd file and datasets are attached
Best regards,
Dr. Sergei Kostiaev
PhD Candidate
Edward J. Bloustein School of Planning and Public Policy;
Part-Time Lecturer
Political Science Department
Rutgers University;
U.S. cell +1(202)361-7672
http://bloustein.rutgers.edu/kostiaev/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kostiaev project for network class.Rmd
Type: application/octet-stream
Size: 4105 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coalitionsAHPs.csv
Type: text/csv
Size: 55389 bytes
Desc: not available
URL:
From guiotmarianne at gmail.com Mon Nov 18 07:49:16 2019
From: guiotmarianne at gmail.com (Marianne Guiot)
Date: Tue Aug 3 21:58:14 2021
Subject: [statnet_help] Question on networkDynamic and Shiny
Message-ID:
Dear Sir/Madam,
I am currently working on a Shiny application that makes use of the
networkDynamic package for R for a network visualization over time. I have
run into a small problem and was wondering if you could help me out.
First of all, congratulations for such a nice tool. The graphics work
beautifully and from what I have seen on the statnet page, you are working
hard to solve all of the issues and make the package a little bit better
every day.
I had a question concerning the implementation of the network dynamic
?renderNdtvAnimationWidget? on the server side.
I have a dataset that I have set up as an edgelist and the animation works
beautifully. In the animation, nodes/vertices that come into existence
(joiners) and nodes/vertices that leave the network for good (leavers)
change color (green/red). This is part of the renderNdtvAnimationWidget. I
wanted to also include a graph of the joiners and leavers that would change
at the same time as the animation but I can?t seem to output the dynamic
?time slice? of the animation to another function in the server side of my
app.
Do you think that it would be at all possible to find a variable of the
network animation that holds the information of the current time slice that
the animation is playing in that same moment?
Apologies if this isn?t very clear and if you would like some more precise
explanations please don?t hesitate to get back at me.
Thank you for your help!
*Kind regards,*
*Marianne Guiot*
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From morrism at uw.edu Thu Nov 21 14:25:20 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:14 2021
Subject: [statnet_help] large ERGMs and sampling
In-Reply-To:
References:
Message-ID:
Hey Kevin,
This old email was still in my inbox. We're running ergm/tergm based
simulations on 800K networks these days, and this has led to some
modifications to the MCMC algorithm, SAN and the implementation of offsets
and constraints that lead to massive improvements in speed (from 6 days to
30 min on a network of size 50K).
Not sure where you are these days on these issues, but wanted to let you
(and others) know that good things are coming.
best,
mm
On Thu, 17 Jul 2014, Lewis, Kevin wrote:
>
> Hi all,
>
>
>
> I hope this is not a na?ve question- and I am aware there is a literature on network sampling, so if the answer is that I
> need to go read it please feel free to tell me!
>
>
>
> I have a very large network (N=165,000) and (in an ideal world) I would like to run a dyadic independence ERGM on it.
>
>
>
> 1. Based on my experience, this far exceeds the computational capacity of statnet (given that we are talking about
> billions of possible ties). Is this correct? (I can provide the specific error message I receive if anyone wants it- it
> was not quite the message I expected.)
>
>
>
> 2. If so, I understand the general problems of taking a ?random sample? from a social network- in short, because the very
> network structure we care about gets carved up and important stuff might be left behind. However, it seems to me that
> this is less of a problem (and in fact, not a problem at all?) if I truly believe that ties were generated independently
> of one another- such that basically the only ?cost? of randomly sampling from the larger network and running an ERGM on
> the sampled network instead is that I?ll have less statistical power and parameter estimates should be less precise. Is
> this correct?
>
>
>
> 3. If so, does it make a difference whether I ?randomly sample? by taking a random sample of dyads or a random sample of
> nodes? On one hand, I?m not really sure how to run an ERGM on the former in practice (I imagine I would have to take my
> network dataset; somehow convert it into a more traditional data format [e.g. that Stata can handle]; then sample dyads
> and run logistic regression). On the other hand, while the latter sounds intuitively suspicious (though I have a hard
> time articulating why), it seems to be producing parameter estimates (aside from the density coefficient) that aren?t
> unreasonably different from the values of the same coefficients that I?m computing for the entire network ?by hand.?
>
>
>
> Any thoughts/guidance on the above would be appreciated! (I am also happy to provide more context on why I am running up
> this strange tree if that is helpful.)
>
>
>
> Best wishes,
>
> Kevin
>
>
>
> Kevin Lewis
>
> Assistant Professor of Sociology
>
> University of California, San Diego
>
>
>
>
>
****************************************************************
Professor of Sociology and Statistics
Box 354322
University of Washington
Seattle, WA 98195-4322
Office: (206) 685-3402
Dept Office: (206) 543-5882, 543-7237
Fax: (206) 685-7419
morrism@u.washington.edu
http://faculty.washington.edu/morrism/
From ssk170 at scarletmail.rutgers.edu Sun Dec 1 11:41:17 2019
From: ssk170 at scarletmail.rutgers.edu (Sergei Kostiaev)
Date: Tue Aug 3 21:58:14 2021
Subject: [statnet_help] ergm specifications for bipartite network
Message-ID:
good afternoon,
does statnet package allow ergm specifications for bipartite network?
4-cycle assumption and things like that
i have found how to do it in bpnet package in python
but i cannot find it in statnet in R
i know R a bit but i do not know python
Best regards,
Dr. Sergei Kostiaev
PhD Candidate
Edward J. Bloustein School of Planning and Public Policy;
Part-Time Lecturer
Political Science Department
Rutgers University;
U.S. cell +1(202)361-7672
http://bloustein.rutgers.edu/kostiaev/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From morrism at uw.edu Sun Dec 1 13:30:32 2019
From: morrism at uw.edu (martina morris)
Date: Tue Aug 3 21:58:14 2021
Subject: [statnet_help] ergm specifications for bipartite network
In-Reply-To:
References:
Message-ID: