Description Usage Arguments Value Examples

Function to generate samples from the life contingencies stochastic variables

1 2 3 4 5 | ```
rLifeContingencies(n, lifecontingency, object, x, t, i = object@interest,
m = 0, k = 1, parallel = FALSE, payment = "advance")
rLifeContingenciesXyz(n, lifecontingency, tablesList, x, t, i, m = 0,
k = 1, status = "joint", parallel = FALSE, payment = "advance")
``` |

`n` |
Size of sample |

`lifecontingency` |
A character string, either |

`object` |
An |

`x` |
Policyholder's age at issue time; for |

`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 |

`m` |
Deferring period, default value is zero. |

`k` |
Fractional payment, default value is 1. |

`parallel` |
Uses the parallel computation facility. |

`payment` |
The Payment type, either |

`tablesList` |
A list of |

`status` |
Either |

A numeric vector

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ```
## Not run:
#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, m=0)
APV=Axn(soa08Act,x=40)
#check if out distribution is unbiased
t.test(x=out, mu=APV)$p.value>0.05
## End(Not run)
## Not run:
data(soa08Act)
n=10000
lifecontingency="Axyz"
tablesList=list(soa08Act,soa08Act)
x=c(60,60); i=0.06; m=0; status="joint"; t=30; k=1
APV=Axyzn(tablesList=tablesList,x=x,n=t,m=m,k=k,status=status,type="EV")
samples<-rLifeContingenciesXyz(n=n,lifecontingency = lifecontingency,tablesList = tablesList,
x=x,t=t,m=m,k=k,status=status, parallel=FALSE)
APV
mean(samples)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.