parameter_trans {pomp} | R Documentation

## Parameter transformations

### Description

Equipping models with parameter transformations.

### Usage

    ## S4 method for signature 'Csnippet,Csnippet'
    parameter_trans(toEst, fromEst, ..., log,
      logit, barycentric)

    ## S4 method for signature 'missing,missing'
    parameter_trans(..., log, logit, barycentric)

    ## S4 method for signature 'character,character'
    parameter_trans(toEst, fromEst, ...)

    ## S4 method for signature ''function','function''
    parameter_trans(toEst, fromEst, ...)

### Arguments

`toEst, fromEst` | procedures that perform transformation of model parameters to and from the estimation scale, respectively. These can be furnished using C snippets, R functions, or via procedures in an external, dynamically loaded library.
`...` | ignored.
`log` | names of parameters to be log transformed.
`logit` | names of parameters to be logit transformed.
`barycentric` | names of parameters to be collectively transformed according to the log barycentric transformation. Important note: variables to be log-barycentrically transformed must be adjacent in the parameter vector.

### Details

When parameter transformations are desired, they can be integrated into the ‘pomp’ object via the `partrans` arguments using the `parameter_trans` function. As with the basic model components, these should ordinarily be specified using C snippets. When doing so, note that:

1. The parameter transformation mapping a parameter vector from the scale used by the model codes to another scale, and the inverse transformation, are specified via a call to

       parameter_trans(toEst,fromEst)

   .

2. The goal of these snippets is the transformation of the parameters from the natural scale to the estimation scale, and vice-versa. If `p` is the name of a variable on the natural scale, its value on the estimation scale is `T_p`. Thus the `toEst` snippet computes `T_p` given `p` whilst the `fromEst` snippet computes `p` given `T_p`.

3. Time-, state-, and covariate-dependent transformations are not allowed. Therefore, neither the time, nor any state variables, nor any of the covariates will be available in the context within which a parameter transformation snippet is executed.

These transformations can also be specified using R functions with arguments chosen from among the parameters. Such an R function must also have the argument ‘`...`’. In this case, `toEst` should transform parameters from the scale that the basic components use internally to the scale used in estimation. `fromEst` should be the inverse of `toEst`.

Note that it is the user's responsibility to make sure that the transformations are mutually inverse. If `obj` is the constructed ‘pomp’ object, and `coef(obj)` is non-empty, a simple check of this property is

      x <- coef(obj, transform = TRUE)
      obj1 <- obj
      coef(obj1, transform = TRUE) <- x
      identical(coef(obj), coef(obj1))
      identical(coef(obj1, transform=TRUE), x)

One can use the `log` and `logit` arguments of `parameter_trans` to name variables that should be log-transformed or logit-transformed, respectively. The `barycentric` argument can name sets of parameters that should be log-barycentric transformed.

Note that using the `log`, `logit`, or `barycentric` arguments causes C snippets to be generated. Therefore, you must make sure that variables named in any of these arguments are also mentioned in `paramnames` at the same time.

The logit transform is defined by

logit(theta) = log(theta/(1-theta)).

The log barycentric transformation of variables theta1,…,thetan is given by

logbarycentric(theta1,…,thetan)=(log(theta1/sum(theta)),…,log(thetan/sum(theta))).

### See Also

Other information on model implementation: `Csnippet`, `accumulators`, `covariate_table`, `distributions`, `dmeasure_spec`, `dprocess_spec`, `pomp-package`, `prior_spec`, `rinit_spec`, `rmeasure_spec`, `rprocess_spec`, `skeleton_spec`, `transformations`, `userdata`

[Package pomp version 2.3 Index]