statnet / tergm

Fit, Simulate and Diagnose Models for Network Evolution Based on Exponential-Family Random Graph Models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMLE error with init specified via snctrl

chad-klumb opened this issue · comments

require(tergm)
data(samplk)
samp <- list(samplk1, samplk2, samplk3)
samp.fit <- tergm(samp ~ Form(~edges+mutual+cyclicalties+transitiveties) + 
                         Persist(~edges+mutual+cyclicalties+transitiveties),
                  estimate = "CMLE",
                  times = 1:3,
                  control = snctrl(init = c(-3.5,2,0,NA,0,1,0,1/2)))

produces (after fitting)

Error in switch(control$CMLE.ergm$main.method, MCMLE = "Monte Carlo",  : 
  EXPR must be a length 1 vector