Convert a curved ERGM into a form suitable as initial values for the same ergm.
enformulate.curved(object, ...) ## S3 method for class 'ergm' enformulate.curved(object, ...) ## S3 method for class 'formula' enformulate.curved(object, theta, response = NULL, ...)
object |
An |
... |
Unused at this time. |
theta |
Curved model parameter configuration. |
response |
Name of the edge attribute whose value is to be
modeled in the valued ERGM framework. Defaults to |
Because of a current kludge in ergm
, output from one run
cannot be directly passed as initial values (control.ergm(init=)
) for
the next run if any of the terms are curved. One workaround is to embed the
curved parameters into the formula (while keeping fixed=FALSE
) and
remove them from control.ergm(init=)
.
This function automates this process for curved ERGM terms included with the
ergm
package. It does not work with curved
terms not included in ergm.
A list with the following components:
formula |
The formula with curved parameter estimates incorporated. |
theta |
The coefficient vector with curved parameter estimates removed. |
data(sampson) gest<-ergm(samplike~edges+gwesp(decay=.5, fixed=FALSE), control=control.ergm(MCMC.burnin=1024, MCMC.interval=8, MCMLE.maxit=1)) # Error: gest2<-try(ergm(gest$formula, control=control.ergm(init=coef(gest), MCMC.burnin=1024, MCMC.interval=8, MCMLE.maxit=1))) print(gest2) # Works: tmp<-enformulate.curved(gest) tmp gest2<-try(ergm(tmp$formula, control=control.ergm(init=tmp$theta, MCMC.burnin=1024, MCMC.interval=8, MCMLE.maxit=1))) summary(gest2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.