exponential: Create a function to generate exponential family

Description Usage Arguments Details Value Examples

View source: R/dist_exponential.R

Description

A special case of comb_exponential.

Usage

1
exponential(M2 = 45, M3 = 32)

Arguments

M2

Numerical of length 1.

M3

Numerical of length 1.

Details

A function to create "family" objects is returned. The "family" object is to be used in the family argument in ruin_prob_ls. It contains all essential information to calculate the ruin probability, e.g. calculation of Θ_{f,k} for various functions f.

Appendix A3 in article "Finite-time ruin probabilities using bivariate Laguerre series" is used. The sum to infinity terms in (A18), (A19) are truncated at M2 and M3 (M2>M3).

Ideally, large M2 and M3 should be used. However, due to limit in numerical precision in R (long double in C, i.e. 64bit) calculation of Θ_{f,k} for large k is unstable. As a result, M2 and M3 has to be moderate.

Computer programs with high precision arithmetic built-in (e.g. Mathematica or Matlab) should be used for reliable results.

Value

A function to create a family object with parameters:

Examples

1
2
3
4
5
6
7
library(pruin)

beta <- 1

family <- exponential()(beta=beta) # a list object

family[c("name","par","mean")] # extract some information

haydo1117/pruin documentation built on Feb. 12, 2022, 11:08 a.m.