R: Impose a curved structure on term parameters

Curve-ergmTerm {ergm} | R Documentation

## Impose a curved structure on term parameters

### Description

Arguments may have the same forms as in the API, but for convenience, alternative forms are accepted.

If the model in `formula` is curved, then the outputs of this operator term's `map` argument will be used as inputs to the curved terms of the `formula` model.

`Curve` is an obsolete alias and may be deprecated and removed in a future release.

### Usage

    # binary: Curve(formula, params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf, cov=NULL)

    # binary: Parametrise(formula, params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
    #           cov=NULL)

    # binary: Parametrize(formula, params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
    #           cov=NULL)

    # valued: Curve(formula, params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf, cov=NULL)

    # valued: Parametrise(formula, params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
    #           cov=NULL)

    # valued: Parametrize(formula, params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
    #           cov=NULL)

### Arguments

`formula` | a one-sided `ergm()`-style formula with the terms to be evaluated
`params` | a named list whos names are the curved parameter names, may also be a character vector with names.
`map` | the mapping from curved to canonical. May have the following forms: a `function(x, n, ...)` treated as in the API: called with `x` set to the curved parameter vector, `n` to the length of output expected, and `cov` , if present, passed in `...` . The function must return a numeric vector of length `n` . a numeric vector to fix the output coefficients, like in an offset. a character string to select (partially-matched) one of predefined forms. Currently, the defined forms include: `"rep"` recycle the input vector to the length of the output vector as a `rep` function would.
`gradient` | its gradient function. It is optional if `map` is constant or one of the predefined forms; otherwise it must have one of the following forms: a `function(x, n, ...)` treated as in the API: called with `x` set to the curved parameter vector, `n` to the length of output expected, and `cov` , if present, passed in `...` . The function must return a numeric matrix with `length(params)` rows and `n` columns. a numeric matrix to fix the gradient; this is useful when map is linear. a character string to select (partially-matched) one of predefined forms. Currently, the defined forms include: `"linear"` calculate the (constant) gradient matrix using finite differences. Note that this will be done only once at the initialization stage, so use only if you are certain `map` is, in fact, linear.
`minpar, maxpar` | the minimum and maximum allowed curved parameter values. The parameters will be recycled to the appropriate length.
`cov` | optional

### See Also

`ergmTerm` for index of model terms currently visible to the package.

[Package ergm version 4.2.1 Index]