Running ‘combine.networks.R’ [3s/3s]
  Running ‘degree.mean.age.R’ [0s/0s]
  Running ‘dynamic_EGMME.R’ [0s/0s]
  Running ‘dynamic_EGMME.simple.R’ [0s/0s]
  Running ‘dynamic_MLE.R’ [20s/21s]
Running the tests in ‘tests/dynamic_MLE.R’ failed.
Complete output:
  > #  File tests/dynamic_MLE.R in package tergm, part of the Statnet suite
  > #  of packages for network analysis, http://statnet.org .
  > #
  > #  This software is distributed under the GPL-3 license.  It is free,
  > #  open source, and has the attribution requirements (GPL Section 7) at
  > #  http://statnet.org/attribution
  > #
  > #  Copyright 2008-2017 Statnet Commons
  > #######################################################################
  > library(tergm)
  Loading required package: statnet.common
  
  Attaching package: 'statnet.common'
  
  The following object is masked from 'package:base':
  
      order
  
  Loading required package: ergm
  Loading required package: network
  network: Classes for Relational Data
  Version 1.13.0 created on 2015-08-31.
  copyright (c) 2005, Carter T. Butts, University of California-Irvine
                      Mark S. Handcock, University of California -- Los Angeles
                      David R. Hunter, Penn State University
                      Martina Morris, University of Washington
                      Skye Bender-deMoll, University of Washington
   For citation information, type citation("network").
   Type help("network-package") to get started.
  
  
  ergm: version 3.8.0, created on 2017-08-18
  Copyright (c) 2017, Mark S. Handcock, University of California -- Los Angeles
                      David R. Hunter, Penn State University
                      Carter T. Butts, University of California -- Irvine
                      Steven M. Goodreau, University of Washington
                      Pavel N. Krivitsky, University of Wollongong
                      Martina Morris, University of Washington
                      with contributions from
                      Li Wang
                      Kirk Li, University of Washington
                      Skye Bender-deMoll, University of Washington
  Based on "statnet" project software (statnet.org).
  For license and citation information see statnet.org/attribution
  or type citation("ergm").
  
  NOTE: Versions before 3.6.1 had a bug in the implementation of the bd()
  constriant which distorted the sampled distribution somewhat. In
  addition, Sampson's Monks datasets had mislabeled vertices. See the
  NEWS and the documentation for more details.
  
  Loading required package: networkDynamic
  
  networkDynamic: version 0.9.0, created on 2016-01-12
  Copyright (c) 2016, Carter T. Butts, University of California -- Irvine
                      Ayn Leslie-Cook, University of Washington
                      Pavel N. Krivitsky, University of Wollongong
                      Skye Bender-deMoll, University of Washington
                      with contributions from
                      Zack Almquist, University of California -- Irvine
                      David R. Hunter, Penn State University
                      Li Wang
                      Kirk Li, University of Washington
                      Steven M. Goodreau, University of Washington
                      Jeffrey Horner
                      Martina Morris, University of Washington
  Based on "statnet" project software (statnet.org).
  For license and citation information see statnet.org/attribution
  or type citation("networkDynamic").
  
  
  tergm: version 3.4.1, created on 2017-09-12
  Copyright (c) 2017, Pavel N. Krivitsky, University of Wollongong
                      Mark S. Handcock, University of California -- Los Angeles
                      with contributions from
                      David R. Hunter, Penn State University
                      Steven M. Goodreau, University of Washington
                      Martina Morris, University of Washington
                      Nicole Bohme Carnegie, New York University
                      Carter T. Butts, University of California -- Irvine
                      Ayn Leslie-Cook, University of Washington
                      Skye Bender-deMoll
                      Li Wang
                      Kirk Li, University of Washington
  Based on "statnet" project software (statnet.org).
  For license and citation information see statnet.org/attribution
  or type citation("tergm").
  
  > 
  > tolerance<-0.05
  > n<-10
  > m<-6
  > theta<--1.5
  > 
  > logit<-function(p) log(p/(1-p))
  > 
  > form.mle<-function(y0,y1){
  +   logit(network.edgecount(y1-y0,na.omit=TRUE)/(network.dyadcount(y1)-network.edgecount(y0-is.na(y1))))
  + }
  > 
  > diss.mle<-function(y0,y1){
  +   -logit(network.edgecount(y0-y1,na.omit=TRUE)/(network.edgecount(y0-is.na(y1))))
  + }
  > 
  > do.run <- function(dir, bip=FALSE, prop.weights="default"){
  + if(bip){ # Extreme theta creates networks with too few ties to properly test.
  +   theta <- theta/2
  + }
  +   
  + y0<-network.initialize(n,dir=dir,bipartite=bip)
  + set.seed(321)
  + y0<-standardize.network(simulate(y0~edges, coef=theta, control=control.simulate(MCMC.burnin=n^2*2)))
  + 
  + cat("Complete data:\n")
  + 
  + set.seed(123)
  + y1<-standardize.network(simulate(y0~edges, coef=theta, control=control.simulate(MCMC.burnin=n^2*2)))
  + 
  + # Force CMPLE
  + set.seed(543)
  + fit<-stergm(list(y0,y1), formation=~edges, dissolution=~edges, estimate="CMPLE", times=c(1,2))
  + 
  + stopifnot(fit$estimate=="CMPLE", fit$formation.fit$estimate=="MPLE", fit$dissolution.fit$estimate=="MPLE")
  + stopifnot(all.equal(form.mle(y0,y1), coef(fit$formation.fit), tolerance=tolerance, check.attributes=FALSE))
  + stopifnot(all.equal(diss.mle(y0,y1), coef(fit$dissolution.fit), tolerance=tolerance, check.attributes=FALSE))
  + 
  + # Autodetected CMPLE
  + set.seed(543)
  + fit<-stergm(list(y0,y1), formation=~edges, dissolution=~edges, estimate="CMLE", times=c(1,2))
  + 
  + stopifnot(fit$estimate=="CMLE", is.null(fit$formation.fit$sample), is.null(fit$dissolution.fit$sample))
  + stopifnot(all.equal(form.mle(y0,y1), coef(fit$formation.fit), tolerance=tolerance, check.attributes=FALSE))
  + stopifnot(all.equal(diss.mle(y0,y1), coef(fit$dissolution.fit), tolerance=tolerance, check.attributes=FALSE))
  + 
  + # Force CMLE
  + for(prop.weight in prop.weights){
  + cat("====",prop.weight,"====\n")
  + set.seed(543)
  + fit<-stergm(list(y0,y1), formation=~edges, dissolution=~edges, estimate="CMLE", control=control.stergm(CMLE.control=control.ergm(force.main=TRUE, MCMC.prop.weights=prop.weight)), times=c(1,2))
  + 
  + stopifnot(fit$estimate=="CMLE", fit$formation.fit$estimate=="MLE", fit$dissolution.fit$estimate=="MLE")
  + stopifnot(all.equal(form.mle(y0,y1), coef(fit$formation.fit), tolerance=tolerance, check.attributes=FALSE))
  + stopifnot(all.equal(diss.mle(y0,y1), coef(fit$dissolution.fit), tolerance=tolerance, check.attributes=FALSE))
  + }
  + 
  + cat("Missing data:\n")
  + 
  + y1m<-network.copy(y1)
  + set.seed(765)
  + e <- as.edgelist(y1)[1,]
  + y1m[e[1], e[2]] <- NA
  + y1m[1,m+1] <- NA
  + 
  + # Force CMPLE
  + set.seed(765)
  + fit<-stergm(list(y0,y1m), formation=~edges, dissolution=~edges, estimate="CMPLE", times=c(1,2))
  + 
  + stopifnot(fit$estimate=="CMPLE", fit$formation.fit$estimate=="MPLE", fit$dissolution.fit$estimate=="MPLE")
  + stopifnot(all.equal(form.mle(y0,y1m), coef(fit$formation.fit), tolerance=tolerance, check.attributes=FALSE))
  + stopifnot(all.equal(diss.mle(y0,y1m), coef(fit$dissolution.fit), tolerance=tolerance, check.attributes=FALSE))
  + 
  + # Autodetected CMPLE
  + set.seed(765)
  + fit<-stergm(list(y0,y1m), formation=~edges, dissolution=~edges, estimate="CMLE", times=c(1,2))
  + 
  + stopifnot(fit$estimate=="CMLE", is.null(fit$formation.fit$sample), is.null(fit$dissolution.fit$sample))
  + stopifnot(all.equal(form.mle(y0,y1m), coef(fit$formation.fit), tolerance=tolerance, check.attributes=FALSE))
  + stopifnot(all.equal(diss.mle(y0,y1m), coef(fit$dissolution.fit), tolerance=tolerance, check.attributes=FALSE))
  + 
  + # Force CMLE
  + for(prop.weight in prop.weights){
  + cat("====",prop.weight,"====\n")
  + set.seed(234)
  + fit<-stergm(list(y0,y1m), formation=~edges, dissolution=~edges, estimate="CMLE", control=control.stergm(CMLE.control=control.ergm(force.main=TRUE, MCMC.prop.weights=prop.weight)), times=c(1,2))
  + 
  + stopifnot(fit$estimate=="CMLE", fit$formation.fit$estimate=="MLE", fit$dissolution.fit$estimate=="MLE")
  + stopifnot(all.equal(form.mle(y0,y1m), coef(fit$formation.fit), tolerance=tolerance, check.attributes=FALSE))
  + stopifnot(all.equal(diss.mle(y0,y1m), coef(fit$dissolution.fit), tolerance=tolerance, check.attributes=FALSE))
  + }
  + }
  > 
  > cat("=========== Directed test ===========\n")
  =========== Directed test ===========
  > do.run(TRUE, prop.weights=c("default","random"))
  Complete data:
  Fitting formation...
  Evaluating log-likelihood at the estimate. 
  Fitting dissolution...
  Evaluating log-likelihood at the estimate. 
  Fitting formation...
  Evaluating log-likelihood at the estimate. 
  Fitting dissolution...
  Evaluating log-likelihood at the estimate. 
  ==== default ====
  Fitting formation...
  Starting maximum likelihood estimation via MCMLE:
  Iteration 1 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by 0.0002369.
  Step length converged once. Increasing MCMC sample size.
  Iteration 2 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by < 0.0001.
  Step length converged twice. Stopping.
  Evaluating log-likelihood at the estimate. Using 20 bridges: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .
  This model was fit using MCMC.  To examine model diagnostics and check for degeneracy, use the mcmc.diagnostics() function.
  Fitting dissolution...
  Starting maximum likelihood estimation via MCMLE:
  Iteration 1 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by 0.0003736.
  Step length converged once. Increasing MCMC sample size.
  Iteration 2 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by 0.0002689.
  Step length converged twice. Stopping.
  Evaluating log-likelihood at the estimate. Using 20 bridges: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .
  This model was fit using MCMC.  To examine model diagnostics and check for degeneracy, use the mcmc.diagnostics() function.
  ==== random ====
  Fitting formation...
  Starting maximum likelihood estimation via MCMLE:
  Iteration 1 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by 0.001816.
  Step length converged once. Increasing MCMC sample size.
  Iteration 2 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by 0.002074.
  Step length converged twice. Stopping.
  Evaluating log-likelihood at the estimate. Using 20 bridges: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .
  This model was fit using MCMC.  To examine model diagnostics and check for degeneracy, use the mcmc.diagnostics() function.
  Fitting dissolution...
  Starting maximum likelihood estimation via MCMLE:
  Iteration 1 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by 0.0003168.
  Step length converged once. Increasing MCMC sample size.
  Iteration 2 of at most 20:
  Optimizing with step length 1.
  The log-likelihood improved by < 0.0001.
  Step length converged twice. Stopping.
  Evaluating log-likelihood at the estimate. Using 20 bridges: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .
  This model was fit using MCMC.  To examine model diagnostics and check for degeneracy, use the mcmc.diagnostics() function.
  Missing data:
  Error in y1m[e[1], e[2]] <- NA : incorrect number of subscripts on matrix
  Calls: do.run
  Execution halted