jaatha: Simulation based maximum likelihood estimation

View source: R/jaatha.R

jaathaR Documentation

Simulation based maximum likelihood estimation

Description

Simulation based maximum likelihood estimation

Usage

jaatha(
  model,
  data,
  repetitions = 3,
  sim = model$get_par_number() * 25,
  max_steps = 100,
  init_method = c("zoom-in", "initial-search", "random", "middle"),
  cores = 1,
  verbose = TRUE,
  sim_cache_limit = 10000,
  block_width = 0.1,
  final_sim = 100,
  zoom_in_steps = 3
)

Arguments

model

The model used for the estimation. See create_jaatha_model.

data

The data used for the estimation. See create_jaatha_data.

repetitions

The number of independent optimizations that will be conducted. You should use a value greater than one here, to minimize the chance that the algorithms is stuck in a local maximum.

sim

The number of simulations conducted for each step.

max_steps

The maximal number of steps, in case Jaatha fails to converge.

init_method

Determines how the starting position of each repetition is chosen. See below for a description of the different options.

cores

The number of CPU cores that will be used for the simulations. The relies on the parallel package, and consequently only one core is supported on Windows.

verbose

If TRUE, information about the optimization algorithm is printed.

sim_cache_limit

The maximal number of simulations results that will be cached. Cached results may be reused in following estimation steps if they are within the current block. Reduce this value to save memory. Setting this to a value smaller than sim disables caching.

block_width

The relative width of a block within jaatha will fit its local GLM. The default value is usually fine. Increasing this value may help in case jaatha fails to converge, while you can try decreasing it if the estimates of the likelihoods differ from the corrected values in the 'Correcting likelihoods for best estimates' phase.

final_sim

The number of simulations conducted for calculating precise likelihoods for the best estimates found in the optimization procedure. These number of simulations is conducted for the best five estimates from each repetition. Using the default value is usually fine.

zoom_in_steps

The number of steps conducted in the zoom-in initialization method. Has no effect if a different initialization method is used. Using the default value is usually fine.

Value

A list contain the results. The list has the following entries:

estimate

The (approximated) maximum likelihood estimate

loglikelihood

The estimate log-likelihood of the estimate.

converged

A boolean indicating whether the optimization procedure converged or not

args

The arguments provided to the jaatha function

Initialization Methods

Jaatha has different options for determining the starting positions for it's optimization procedure. The option initial-search will divide the parameter space in a number of equally sized block, estimate parameters within each block and use the estimates with the highest likelihood as starting positions. The option zoom-in starts with a block that is equal to the complete parameter space, estimate parameters in there, and then iteratively creates a smaller block around the estimates. Finally, random chooses random starting positions and middle will just start all repetitions at the middle of the parameter space.

Author(s)

Paul Staab, Lisha Mathew and Dirk Metzler


jaatha documentation built on March 31, 2023, 11:37 p.m.