offspring_ll: Log-likelihood of the length of chains with generic offspring...

View source: R/likelihoods.R

offspring_llR Documentation

Log-likelihood of the length of chains with generic offspring distribution

Description

The likelihoods are calculated with a crude approximation using simulated chains by linearly approximating any missing values in the empirical cumulative distribution function (ecdf).

Usage

offspring_ll(x, offspring, stat, nsim_offspring = 100, ...)

Arguments

x

vector of sizes

offspring

Offspring distribution: a character string corresponding to the R distribution function (e.g., "pois" for Poisson, where rpois is the R function to generate Poisson random numbers)

stat

statistic given as x ("size" or "length" of chains)

nsim_offspring

number of simulations of the offspring distribution for approximation the size/length distribution

...

any parameters to pass to chain_sim

Value

log-likelihood values

Author(s)

Sebastian Funk


sbfnk/bpmodels documentation built on Nov. 7, 2023, 5:16 a.m.