LISTSERV mailing list manager LISTSERV 16.0

Help for SOCNET Archives


SOCNET Archives

SOCNET Archives


SOCNET@LISTS.UFL.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SOCNET Home

SOCNET Home

SOCNET  June 2019

SOCNET June 2019

Subject:

Re: Error message in btergm

From:

Philip Leifeld <[log in to unmask]>

Reply-To:

Philip Leifeld <[log in to unmask]>

Date:

Tue, 18 Jun 2019 16:16:51 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (126 lines)

*****  To join INSNA, visit http://www.insna.org  *****

Dear Meng-Hao,

One of the following two steps should fix this:

1. Use library("btergm") instead of library("xergm")

Or

2. Remove the lme4 package before you use btergm's gof function.

The reason is a bit complex and is related to name spaces in R, but I'll 
try to explain it briefly:

xergm is a meta-package that loads btergm, tnam, GERGM, rem, and 
xergm.common -- several network analysis packages my colleagues and I 
wrote. You are using the btergm package, but are loading all these other 
packages. One of those packages, tnam, depends on lme4, a package for 
mixed-effects modeling. lme4 contains a method for the simulate function 
in the methods package for "formula" objects. The ergm package, on which 
btergm depends, also has a simulate method for formula objects. The gof 
function in btergm relies on this formula method of the simulate 
function in the ergm package, but not in lme4. If both packages, ergm 
and lme4, are loaded, there are situations in which the wrong formula 
method of the simulate function is picked when it is used. This causes 
the error message you are seeing. Therefore you can fix the problem by 
either loading the btergm package instead of the xergm package (thereby 
avoiding loading tnam and hence lme4, which causes the conflict) or by 
removing the lme4 package so it's no longer loaded when xergm is loaded. 
This was not a problem until very recently, when the statnet team (the 
developers of the ergm package) changed the way the formula method of 
the simulate function is supplied in the ergm package. We reacted to 
these changes in the ergm package in the most recent version (in 
coordination with the statnet folks) by changing the code in btergm from 
calling simulate.formula to calling simulate to make btergm compatible 
with the most recent ergm version. Unfortunately, this apparently also 
introduced the conflict between ergm and lme4. I will look into better 
ways to resolve this namespace conflict.

Meanwhile, if you would like to follow up, please post to the issue 
tracker on GitHub. I have opened a ticket here: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_leifeld_btergm_issues_13&d=DwIFAw&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=adrOHNbSkQEDWo5qrPTlXnxJG9JrPCmpVEgbNFWX2bM&s=FlSN_J6MQlaZM-9BARYQzW7LoKXMsR-sZozO_9NM7pY&e= 

Best,

Philip

--
Philip Leifeld
Professor of Comparative Politics
Department of Government
University of Essex
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.philipleifeld.com&d=DwIFAw&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=adrOHNbSkQEDWo5qrPTlXnxJG9JrPCmpVEgbNFWX2bM&s=4zGObryGao_DFBNnkboIshbkYsirvPx6lZuDr2LIaUU&e= 

April-October 2019:
Affiliate in the School of Social and Political Sciences
University of Glasgow
On 18/06/2019 04:43, Meng-Hao Li wrote:
> ***** To join INSNA, visit https://urldefense.proofpoint.com/v2/url?u=http-3A__www.insna.org&d=DwIFAw&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=adrOHNbSkQEDWo5qrPTlXnxJG9JrPCmpVEgbNFWX2bM&s=6m-ALyieEAezSJzk2BwuncCXQywd74L5cFoQ5QVce9o&e=  *****
> Dear SOCNETters,
> 
> I was following Leifeld , Cranmer and Desmarais' (2018) example to 
> replicate a btergm model.  When I ran gof, I kept receiving an error 
> message below. I wonder if anyone knows how to solve the problem.
> 
> Leifeld, Philip, Skyler J. Cranmer, and Bruce A. Desmarais. "Temporal 
> exponential random graph models with btergm: Estimation and bootstrap 
> confidence intervals." Journal of Statistical Software 83.6 (2018).
> 
> library("statnet")
> library("texreg")
> library("xergm")
> 
> data("alliances", package = "xergm.common")
> 
> model.1a <- btergm(allyNet ~ edges + gwesp(0, fixed = TRUE) +
>                       edgecov(LSP) + edgecov(warNet) + nodecov("polity") +
>                       nodecov("cinc") + absdiff("polity") + 
> absdiff("cinc") +
>                       edgecov(contigMat) , R = 50, parallel = "snow", 
> ncpus = 2)
> 
> gof.1a <- gof(model.1a, nsim = 50, statistics = c(esp, geodesic, deg))
> 
> 20 networks from which simulations are drawn were provided. Error in 
> sim[[i]] : subscript out of bounds In addition: There were 20 warnings 
> (use warnings() to see them)
> 
> 
> 
> My working environment:
> 
> platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, 
> mingw32 status major 3 minor 6.0 year 2019 month 04 day 26 svn rev 76424 
> language R version.string R version 3.6.0 (2019-04-26) nickname Planting 
> of a Tree
> 
> 
> Thanks,
> Meng-Hao
> 
> 
> -- 
> Meng-Hao Li
> Graduate Research Assistant
> Center for Health Policy Research and Ethics
> George Mason University
> https://urldefense.proofpoint.com/v2/url?u=https-3A__chpre.org_&d=DwIFAw&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=adrOHNbSkQEDWo5qrPTlXnxJG9JrPCmpVEgbNFWX2bM&s=KruiMTY2WGprQUkfVUmBUSnWUTHNufZB3jw2AyWQ7Ww&e=  
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__chpre.org_&d=DwMFaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=YzxoqJ1GgZbveExIdXnrFAJ41MC6YZMkaFETGAQArm8&s=JFkgTmrm-4uw2gPbmxtZLEAvAPF3OR46RGTgSoiyojw&e=> 
> 
> Google Scholar Profile 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__scholar.google.com_citations-3Fuser-3DLjppBHYAAAAJ-26hl-3Den&d=DwMFaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=YzxoqJ1GgZbveExIdXnrFAJ41MC6YZMkaFETGAQArm8&s=WvhrvPWUZI6jA2jKYeMYinZKUZ4c3HCnZkQt-Ilr8ZE&e=>
> LinkedIn Profile 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_in_meng-2Dhao-2Dli-2D7400a844_&d=DwMFaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=YzxoqJ1GgZbveExIdXnrFAJ41MC6YZMkaFETGAQArm8&s=IkL2FlnikI8udAKB6VF5du4bRrRnSUlBLnBdGBCcewo&e=>
> _____________________________________________________________________ 
> SOCNET is a service of INSNA, the professional association for social 
> network researchers (https://urldefense.proofpoint.com/v2/url?u=http-3A__www.insna.org&d=DwIFAw&c=sJ6xIWYx-zLMB3EPkvcnVg&r=yQQsvTNAnbvDXGM4nDrXAje4pr0qHX2qIOcCQtJ5k3w&m=adrOHNbSkQEDWo5qrPTlXnxJG9JrPCmpVEgbNFWX2bM&s=6m-ALyieEAezSJzk2BwuncCXQywd74L5cFoQ5QVce9o&e= ). To unsubscribe, send an 
> email message to [log in to unmask] <mailto:[log in to unmask]> 
> containing the line UNSUBSCRIBE SOCNET in the body of the message.

_____________________________________________________________________
SOCNET is a service of INSNA, the professional association for social
network researchers (http://www.insna.org). To unsubscribe, send
an email message to [log in to unmask] containing the line
UNSUBSCRIBE SOCNET in the body of the message.

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008, Week 62
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001

ATOM RSS1 RSS2



LISTS.UFL.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager