truncated_normal: Create a function to generate truncated normal family

Description Usage Arguments Details Value Examples

View source: R/dist_truncated_normal.R

Description

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.

Usage

1
truncated_normal(M2 = 45, M3 = 32)

Arguments

M2

Numerical of length 1.

M3

Numerical of length 1.

Details

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
8
library(pruin)

mu <- 1
sigma <- 1

family <- truncated_normal()(mu=mu,sigma=sigma) # a list object

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

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