Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LifeInsureR package for R
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R
LifeInsureR package for R
Commits
5cf1aea4
Commit
5cf1aea4
authored
2 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Fix policy period for lifelong insurance contracts
parent
8e84ce29
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DESCRIPTION
+1
-1
1 addition, 1 deletion
DESCRIPTION
R/InsuranceTarif.R
+2
-1
2 additions, 1 deletion
R/InsuranceTarif.R
man/InsuranceTarif.Rd
+7
-4
7 additions, 4 deletions
man/InsuranceTarif.Rd
with
10 additions
and
6 deletions
DESCRIPTION
+
1
−
1
View file @
5cf1aea4
...
@@ -35,7 +35,7 @@ Imports:
...
@@ -35,7 +35,7 @@ Imports:
pander,
pander,
tidyr
tidyr
License: GPL (>= 2)
License: GPL (>= 2)
RoxygenNote: 7.2.
1
RoxygenNote: 7.2.
3
Collate:
Collate:
'HelperFunctions.R'
'HelperFunctions.R'
'InsuranceParameters.R'
'InsuranceParameters.R'
...
...
This diff is collapsed.
Click to expand it.
R/InsuranceTarif.R
+
2
−
1
View file @
5cf1aea4
...
@@ -300,8 +300,9 @@ InsuranceTarif = R6Class(
...
@@ -300,8 +300,9 @@ InsuranceTarif = R6Class(
age
=
params
$
ContractData
$
technicalAge
age
=
params
$
ContractData
$
technicalAge
maxAge
=
MortalityTables
::
getOmega
(
params
$
ActuarialBases
$
mortalityTable
)
maxAge
=
MortalityTables
::
getOmega
(
params
$
ActuarialBases
$
mortalityTable
)
policyTerm
=
min
(
maxAge
+
1
-
age
,
params
$
ContractData
$
policyPeriod
)
policyTerm
=
min
(
maxAge
+
1
-
age
,
params
$
ContractData
$
policyPeriod
)
# Length of CF vectors / data.frames is always 1 more than the policy period, since there might be a survival payment at the end!
list
(
list
(
l
=
min
(
maxAge
+1
-
age
,
policyTerm
),
l
=
policyTerm
+
1
,
# Length of CF vectors (1 larger than policy period!)
# maxAge is the last age with a given death probability, so it can be included in the policy term!
# maxAge is the last age with a given death probability, so it can be included in the policy term!
# The policy must end AFTER that final year, not at the beginning!
# The policy must end AFTER that final year, not at the beginning!
policyTerm
=
policyTerm
,
policyTerm
=
policyTerm
,
...
...
This diff is collapsed.
Click to expand it.
man/InsuranceTarif.Rd
+
7
−
4
View file @
5cf1aea4
...
@@ -1061,13 +1061,13 @@ All premiums, reserves and present values have already been calculated.
...
@@ -1061,13 +1061,13 @@ All premiums, reserves and present values have already been calculated.
\subsection{Method \code{calculateFutureSums()}}{
\subsection{Method \code{calculateFutureSums()}}{
Generic function to calculate future sums of the values
Generic function to calculate future sums of the values
\subsection{Usage}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$calculateFutureSums(
values
, ...)}\if{html}{\out{</div>}}
\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$calculateFutureSums(
cf
, ...)}\if{html}{\out{</div>}}
}
}
\subsection{Arguments}{
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\if{html}{\out{<div class="arguments">}}
\describe{
\describe{
\item{\code{
values
}}{The time series, for which future sums at all times are desired}
\item{\code{
cf
}}{The time series, for which future sums at all times are desired}
\item{\code{...}}{currently unused}
\item{\code{...}}{currently unused}
}
}
...
@@ -1081,19 +1081,22 @@ Generic function to calculate future sums of the values
...
@@ -1081,19 +1081,22 @@ Generic function to calculate future sums of the values
Calculate all present values for a given time series. The
Calculate all present values for a given time series. The
mortalities are taken from the contract's parameters.
mortalities are taken from the contract's parameters.
\subsection{Usage}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$calculatePresentValues(
values
, params)}\if{html}{\out{</div>}}
\if{html}{\out{<div class="r">}}\preformatted{InsuranceTarif$calculatePresentValues(
cf
, params
, values
)}\if{html}{\out{</div>}}
}
}
\subsection{Arguments}{
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\if{html}{\out{<div class="arguments">}}
\describe{
\describe{
\item{\code{
values
}}{The time series, for which future present values at all
\item{\code{
cf
}}{The time series, for which future present values at all
times are desired}
times are desired}
\item{\code{params}}{Contract-specific, full set of parameters of the contract
\item{\code{params}}{Contract-specific, full set of parameters of the contract
(merged parameters of the defaults, the tariff, the profit participation
(merged parameters of the defaults, the tariff, the profit participation
scheme and the contract)}
scheme and the contract)}
\item{\code{values}}{Contract values calculated so far (in the \code{contract$Values}
list) then this method is called by the contract object}
\item{\code{...}}{currently unused}
\item{\code{...}}{currently unused}
}
}
\if{html}{\out{</div>}}
\if{html}{\out{</div>}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment