optim_from_mc: Given the output of 'prepare_model_components', find...

Description Usage Arguments Value

Description

Given the output of 'prepare_model_components', find coefficient-estimates using 'stats::optim'.

Usage

1
2
optim_from_mc(mc, inv_links, optim_args, loglik_fun, loglik_fun_args,
  penalty_fun, penalty_fun_args)

Arguments

mc

The output of 'prepare_model_components'

inv_links

A list of inverse-link-functions, one corresponding to each 'mc$model_mats'

optim_args

A named list of arguments to be passed to 'stats::optim'.

loglik_fun

A log-liklihood function to optimize

loglik_fun_args

Additional arguments (aside from target and parameters) to pass to the 'loglik_fun'.

penalty_fun

A penalty function that takes a table with parameter, term, beta, and returns a numeric penalty that will be factored into the optimization.

penalty_fun_args

Additional arguments (aside from the table) to pass to the 'penalty_fun'.

Value

A list with 'optim' (the results of the call to stats::optim), and 'cov' (the approximate covariance matrix obtaining from the hessian).


strongio/keanu documentation built on May 8, 2019, 11:16 p.m.