Skip to contents

Create an object for specifying matrix elements to be optimized or integrated out of the objective function using a Laplace transform.

Usage

OptParamsList(
  ...,
  par_id = integer(0L),
  mat = character(0L),
  row_id = integer(0L),
  col_id = integer(0L)
)

Arguments

...

Objects that can be coerced to numeric vectors, which will be concatenated to produce the default value of the parameter vector.

par_id

Integer vector identifying elements of the parameter vector to be used to replace elements of the model matrices.

mat

Character vector the same length as par_id giving the names of the matrices containing the elements to replace.

row_id

Integer vector the same length as par_id giving the row indices of the matrix elements to replace with parameter values.

col_id

Integer vector the same length as par_id giving the column indices of the matrix elements to replace with parameter values.

Value

Object of class OptParamsList with the following methods.

Methods

  • $data_arg(..., .type_string = c("p", "r")): Return the following components of the data structure to pass to C++.

    • {.type_string}_par_id -- Integers identifying the replacing parameter.

    • {.type_string}_mat_id -- Integers identifying the matrix within which an element is to be replaced.

    • {.type_string}_row_id -- Integers identifying the rows within matrices to replace.

    • {.type_string}_col_id -- Integers identifying the columns within matrices to replace.

  • $vector(): Return the initial value of the numerical parameter vector.

  • $data_frame(): Return a data frame with each row describing a parameter.

Method Arguments

  • ...: Character vector containing the names of the matrices in the model.

  • .type_string: Either "p" or "r" indicating whether the object is to be used to represent fixed parameters to be optimized or random parameters to be integrated out using the Laplace transform.