modelExpandParam {tigre} | R Documentation

## Update a model structure with new parameters or update the posterior processes.

### Description

Update a model structure or component with new parameters, or update the posterior processes.

### Usage

      modelExpandParam(model, params)
      modelUpdateProcesses(model, predt=NULL)

### Arguments

`model` | the model structure to be updated.
`params` | vector of parameters.
`predt` | (optional) a vector of times to infer the posterior at. By default this is 100 points spanning the time range of the data.

### Details

`model <- modelExpandParam(model, param)` returns a model structure filled with the parameters in the given vector. This is used as a helper function to enable parameters to be optimised in, for example, the optimisation functions.

`model <- modelUpdateProcesses(model)` updates posterior processes of the given model.

### Value

`model` | updated model structure.

### See Also

`GPLearn, modelExtractParam`

### Examples

    ## Not run:
      # Learn the model
      model <- GPLearn(...)
      params <- modelExtractParam(model, only.values=TRUE)
      params[1] <- 0
      new_model <- modelExpandParam(model, params)
      new_model <- modelUpdateProcesses(new_model)

    ## End(Not run)

[Package tigre version 1.38.0 Index]