expand_params | R Documentation |
Iterated block particle filters require shared parameters to be expanded into having a value at each unit. expand_params, contract_params and mean_by_unit provide tools for moving between representations. For a unit-specific expansion of a shared parameter, all the values for different units should be the same, and mean_by_unit ensures this by taking an average.
expand_params(params, expandedParNames, U)
contract_params(params, expandedParNames, U, average = FALSE)
mean_by_unit(params, expandedParNames, U)
params |
Input parameter vector |
expandedParNames |
character vector of parameters that are, or should be, expanded. These names should have no numerical suffix 1:U. |
U |
Number of units |
average |
Logical value for whether contract_params should average unequal values |
These functions assume that expanded parameters have names ending in "1" through "U", where U is the number of units. Contracted parameters, meaning any parameter that is not expanded, should have a name ending in "1". This numerical suffix convention is useful for writing model-building code that allows parameters to be either expanded or contracted.
Other utilities:
arma_benchmark()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.