em_cpp: function to perform one step of the E-M algorithm

View source: R/learning_EM.R View source: R/RcppExports.R

em_cppR Documentation

function to perform one step of the E-M algorithm

Description

function to perform one step of the E-M algorithm

function to perform one step of the E-M algorithm

Usage

em_cpp(
  brts,
  pars,
  sample_size,
  maxN,
  soc,
  max_missing,
  max_lambda,
  lower_bound,
  upper_bound,
  xtol_rel,
  num_threads,
  copy_trees,
  rconditional = NULL
)

em_cpp(
  brts,
  pars,
  sample_size,
  maxN,
  soc,
  max_missing,
  max_lambda,
  lower_bound,
  upper_bound,
  xtol_rel,
  num_threads,
  copy_trees,
  rconditional = NULL
)

Arguments

brts

vector of branching times

sample_size

number of samples

maxN

maximum number of failed trees

soc

number of lineages at the root/crown (1/2)

max_missing

maximum number of species missing

max_lambda

maximum speciation rate

lower_bound

vector of lower bound values for optimization, should be equal in length to the vector of init_pars

upper_bound

vector of upper bound values for optimization, should be equal in length to the vector of init_pars

xtol_rel

relative tolerance for optimization

num_threads

number of threads used.

copy_trees

if set to true, the trees generated are returned as well

rconditional

R function that evaluates the GAM function.

init_pars

vector of initial parameter files

Value

a list with the following components:

  • treeslist of trees

  • rejectednumber of rejected trees

  • rejected_overrunsnumber of trees rejected due to too large size

  • rejected_lambdanumber of trees rejected due to lambda errors

  • rejected_zero_weightsnumber of trees rejected to zero weight

  • estimatesvector of estimates

  • nloptnlopt status

  • fhatvector of fhat values

  • timetime elapsed

  • weightsvector of weights

a list with the following components:

  • treeslist of trees

  • rejectednumber of rejected trees

  • rejected_overrunsnumber of trees rejected due to too large size

  • rejected_lambdanumber of trees rejected due to lambda errors

  • rejected_zero_weightsnumber of trees rejected to zero weight

  • estimatesvector of estimates

  • nloptnlopt status

  • fhatvector of fhat values

  • timetime elapsed

  • weightsvector of weights


franciscorichter/emphasis documentation built on Feb. 19, 2024, 7:36 p.m.