Learn R Programming

lifecontingencies (version 0.9.2)

rLifeContingencies: Function to generate samples from the life contingencies stochastic variable.

Description

This function returns a n-size sample from the underlying present value of benefits stochastic variable defined by a specific life contingencies insurance form.

Usage

rLifeContingencies(n, lifecontingency, object, x, t, i = object@interest, m=0, k = 1 , parallel=FALSE)

Arguments

n
Size of sample
lifecontingency
A character string, either "Exn" or "Axn" or "axn" or "IAxn" or "DAxn".
object
An actuarialtable object.
x
Policyholder's age at issue time.
t
The lenght of the insurance. Must be specified according to the present value of benefits definition.
i
The interest rate, whose default value is the actuarialtable interest rate slot value.
m
Deferring period, default value is zero.
k
Fractional payment, default value is 1.
parallel
Uses the parallel computation facility.

Value

  • A numeric vector.

Warning

The function is provided as is, without any warranty regarding the accuracy of calculations. The author disclaims any liability for eventual losses arising from direct or indirect use of this software. Currently k>1 computation are not supported yet.

Details

This function is a wrapper for internal function that returns the present value of insured benefits.

References

Actuarial Mathematics (Second Edition), 1997, by Bowers, N.L., Gerber, H.U., Hickman, J.C., Jones, D.A. and Nesbitt, C.J.

See Also

Exn, Axn, axn,IAxn,DAxn.

Examples

Run this code
#assumes SOA example life table to be load
	data(soaLt)
	soa08Act=with(soaLt, new("actuarialtable",interest=0.06,
	x=x,lx=Ix,name="SOA2008"))
	out<-rLifeContingencies(n=1000, lifecontingency="Axn",object=soa08Act,
	x=40,t=getOmega(soa08Act)-40, i=soa08Act@interest,m=0)
	APV=Axn(soa08Act,x=40)
	#check if out distribution is unbiased
	t.test(x=out, mu=APV)$p.value>0.05

Run the code above in your browser using DataLab