Description Usage Arguments Details Value See Also Examples

View source: R/formula.utils.R

The generic `enformulate.curved`

converts an `ergm`

object or
formula of a model with curved terms to the variant in which the curved
parameters embedded into the formula and are removed from the parameter
vector. This is the form required by `ergm`

calls.

1 2 3 4 | ```
## S3 method for class 'ergm'
enformulate.curved(object, ...)
## S3 method for class 'formula'
enformulate.curved(object, theta, response=NULL, ...)
``` |

`object` |
An |

`theta` |
Curved model parameter configuration. |

`response` |
Not for release. |

`...` |
Unused at this time. |

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. |

1 2 3 4 5 6 7 8 9 10 11 12 | ```
data(sampson)
gest<-ergm(samplike~edges+gwesp(decay=.5, fixed=FALSE),
control=control.ergm(MCMLE.maxit=1))
# Error:
gest2<-try(ergm(gest$formula, control=control.ergm(init=coef(gest), MCMLE.maxit=2)))
print(gest2)
# Works:
tmp<-enformulate.curved(gest)
tmp
gest2<-try(ergm(tmp$formula, control=control.ergm(init=tmp$theta, MCMLE.maxit=2)))
summary(gest2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.