Skip to content

Error using offset terms in Form() and Persist() with new version of tergm? #112

@JeffreyAlanSmith

Description

@JeffreyAlanSmith

Hi folks, I have a quick question about specifying offset terms as part of the Form or Persist equations within tergm. Previously this was possible using the offset() function, but that leads to errors with the newest version of the package. Take the example below:

library(tergm)
data(samplk)
samp <- list(samplk1, samplk2, samplk3)
tergm.fit <- tergm(samp ~ Form(~ edges + offset(nodematch("group"))) +
                          Persist(~ edges + offset(nodematch("group"))),
                          offset.coef = c(1, 1), estimate = "CMLE", times=0:2)

Error in ergm_Init_abort():
! In term ‘N’ in package ‘ergm.multi’ (called from term ‘Form’ in package ‘tergm’): The ERGM ‘formula=’ argument of an ‘N()’ operator may not have offsets. See ‘ergmTerm?N’ section on fixing parameters for details.
Run rlang::last_trace() to see where the error occurred.

I am not sure if this is a bug or by design but how would I specify a formula with offset terms in the current version of the package? I didn't see any examples in the help files, but maybe I missed them?

Much appreciated,

Jeffrey

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions