Skip to contents

Performs full multi-dimensional profile likelihood calculations

Usage

# S3 method for class 'ctsmTMB.fit'
profile(
  fitted,
  parlist,
  grid.size = rep(10, length(parlist)),
  grid.qnt = rep(3, length(parlist)),
  hessian = FALSE,
  silent = FALSE,
  control = list(trace = 0, iter.max = 1000, eval.max = 1000),
  ...
)

Arguments

fitted

a ctsmTMB fit object

parlist

a named-list of parameters to profile over. The user can either supply grid-values in the list or leave it empty. If the any one list is empty then grid-values will be calculated using the estimated parameter mean value and standard deviation.

grid.size

a vector of length(parlist) indicating the number of grid-points along each parameter direction. This is only used if the parlist is empty.

grid.qnt

a vector of length(parlist) determining the width of the grid points from the mean value in multiples of the standard deviation.

hessian

a boolean indicating whether to use the hessian or not during the profile optimization.

silent

boolean whether or not to mute current iteration number the control argument.

control

a list of optimization output controls (see nlminb)

...

various arguments (not in use)

Note

The implementation was modified from that of https://github.com/kaskr/adcomp/blob/master/TMB/R/tmbprofile.R

Examples

if (FALSE) { # \dontrun{
# Given a model fit produced by
fit <- model$estimate(Ornstein)

# We call profile with theta=NULL to use the standard range theta +- 3 std. devs.
prof <- profile(fit, parlist=list(theta=NULL))
} # }