derivType: Helper for getting means from generating functions

Description Usage Arguments Details

View source: R/BD_calc_helpers.R

Description

Choose whether to do one-sided or two-sided differentiation. The latter is more effective/less unstable but not always defined.

Usage

1
derivType(L, mu, eps = 1e-04)

Arguments

L
mu
eps

Details

Getting the means of interest from generating functions involves differentiation which is usually done numerically. The functions of interest are fully defined on one side of the point of interest but have limited (if any) definition on the other side of the point. For instance, if lambda=mu then the generator for the process N+ is not defined for r>1. If lambda and mu are close then the process is defined for r>1 but very close to 1. The function derivType takes lambda and mu and an epsilon and decides whether that epsilon is small enough to do a two sided derivative with epsilon as "h" or if a one sided derivative is needed.


DOBAD documentation built on May 2, 2019, 3:04 a.m.