Description Usage Arguments Details See Also
Equipping models with parameter transformations.
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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, ...)
|
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. |
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:
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)
.
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
.
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
1 2 3 4 5 |
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.
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))).
Other information on model implementation: Csnippet
,
accumulators
,
covariate_table
,
distributions
, dmeasure_spec
,
dprocess_spec
, pomp2-package
,
prior_spec
, rinit_spec
,
rmeasure_spec
, rprocess_spec
,
skeleton_spec
,
transformations
, userdata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.