Error using offset terms in Form() and Persist() with new version of tergm? #113
Replies: 4 comments
-
@JeffreyAlanSmith thanks for that inquiry. For that scenario I think you'd need to use the |
Beta Was this translation helpful? Give feedback.
-
Please see the section in |
Beta Was this translation helpful? Give feedback.
-
Thanks Michal (@mbojan) and Pavel (@krivit). I'll see if I can find a simple way to specify this. |
Beta Was this translation helpful? Give feedback.
-
@JeffreyAlanSmith , would that be the specification along your intentions? fit <- tergm(
samp ~ offset(Form(~ nodematch("group"))) + Form(~ edges) +
offset(Persist(~ nodematch("group"))) + Persist(~ edges),
estimate = "CMLE",
offset.coef = c(1, 1),
times=0:2
)
summary(fit)
PS. Transformed that thread into a Q&A Discussion. |
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions