NEWS | R Documentation |
Fixed declaration of the interface to a function imported
from expint to comply with option -fno-common
that
will be the default in gcc starting with version 10.0.x. Thanks
to Joshua Ulrich josh.m.ulrich@gmail.com, maintainer of
xts and TTR for proposing the fix.
Correction of the formula for the moment of order k
for grouped data in ?emm
. Thanks to Walter Garcia-Fontes
for the heads up.
Fixed generation of random variates for the logarithmic
distribution with rlogarithmic
when p > 0.95. Thanks
to Sam Thompson samuel.thompson14@imperial.ac.uk for the
report and patch.
Fixed generation of random variates for the zero modified
geometric distribution with rzmgeom
when p0m > p. Thanks to Christophe Dutang
dutang@ceremade.dauphine.fr for the report.
Fixed the formula for the variance of the zero truncated negative binomial distribution in the man page. Thanks to Daan Gerard Uitenbroek Daanuitenbroek@ggd.amsterdam.nl for the report.
Fixed a typo in vignette “distributions” in the formula of the survival function for zero-modified discrete distributions.
Add circular references between Pareto and Single Parameter Pareto man pages. There was no reference to the Single Parameter Pareto distribution in the man page for the Pareto and this generated questions from time to time on how to compute the former. The new note and 'see also' should solve this.
Vignette “credibility” now contains an appendix summarizing the formulas in the linear Bayes cases.
cm
with formula = "bayes"
stopped in the
Gamma/Gamma case even though the parameter shape.lik
was
provided. Thanks to Vincent Masse
vincent.masse.4@ulaval.ca for the report.
Component weights
of the return value of cm
in
the formula = "bayes"
case was wrong. This had no impact
on premium calculation and was visible in the output of
summary
only. Also, it caused an error when data
was NULL
or missing.
cm
can now fit linear Bayes models for the following
combinations of likelihood and prior distributions:
Poisson/Gamma, Exponential/Gamma, Bernoulli/Beta,
Geometric/Beta, Normal/Normal, Gamma/Gamma, Binomial/Beta,
Negative Binomial/Beta and the less common case Single Parameter
Pareto/Gamma (where the Bayes estimator is linear, but not a
credibility premium). Thanks to Christophe Dutang
dutang@ceremade.dauphine.fr for the idea.
rcomphierarc.summaries
is now an alias for the man
page of simul.summaries
.
In summary
results for credibility models, a level
“section title” is no longer printed for one-level
models.
All instances of function simul
in vignette
“simulation”
replaced by rcomphierarc
.
Functions rcompound
and rcomppois
gain an
argument SIMPLIFY
that is TRUE
by default. When
FALSE
, the functions return not only variates from the
aggregate claim amount random variable, but also the variates
from the underlying frequency and severity distributions.
Functions rcompound
and rcomppois
now admit
an object name in argument for model.sev
and
model.freq
.
Display of verbatim blocks in vignettes.
In the man page for dgenpareto
, additional note on
the link between the Generalized Pareto distribution in the
package and the version used in Embrechts et al. (1997) and
Wikipedia. Thanks to Marcel Trevissen
kamath1602@gmail.com for the pointer.
Usage of R_useDynamicSymbols
to preclude compilation
NOTE
s, better registration of native routines and reduced
symbol visibility.
Vignettes no longer use LaTeX package framed as it was not found on OS X in CRAN builds.
qinvgauss
was not computing quantiles as far in the
right tail as statmod:::qinvgauss
. This is now fixed.
Thanks to Gordon Smyth smyth@wehi.edu.au for pointing it
out.
Support for the incomplete gamma function and the exponential integral has been moved to package expint. Therefore, actuar now imports these functionalities through the expint API.
Consequence of the above, the non exported functions
gammaint
and expint
are deleted from the package.
Section 6 on special integrals of the
“distributions”
package vignette was revised to
better introduce the incomplete gamma function, the incomplete
beta function and the related integrals.
New support functions [dpqrm,lev,mgf]invgauss
for
the inverse Gaussian distribution. The first three functions are
C (read: faster) implementations of functions of the same name
in package statmod.
New support functions [dpqrm,mgf]gumbel
for the Gumbel
extreme value distribution.
Extended range of admissible values for many limited
expected value functions thanks to new C-level functions
expint
, betaint
and gammaint
. These provide
special integrals presented in the introduction of Appendix A of
Klugman et al. (2012); see also vignette("distributions")
.
Affected functions are:
levtrbeta
,
levgenpareto
,
levburr
,
levinvburr
,
levpareto
,
levinvpareto
,
levllogis
,
levparalogis
,
levinvparalogis
in the Transformed Beta family, and
levinvtrgamma
,
levinvgamma
,
levinvweibull
in the Transformed Gamma family.
New functions expint
, betaint
and
gammaint
to compute the special integrals mentioned
above. These are merely convenience R interfaces to the C level
functions. They are not exported by the package.
New support functions [dpqr]poisinvgauss
for
the Poisson-inverse Gaussian discrete distribution.
New support functions [dpqr]logarithmic
and
[dpqr]zmlogarithmic
for the logarithmic (or log-series)
and zero-modified logarithmic distributions.
New support functions [dpqr]ztpois
and
[dpqr]zmpois
for the zero-truncated and zero-modified
Poisson distributions.
New support functions [dpqr]ztnbinom
and
[dpqr]zmnbinom
for the zero-truncated and zero-modified
negative binomial distributions.
New support functions [dpqr]ztgeom
and
[dpqr]zmgeom
for the zero-truncated and zero-modified
geometric distributions.
New support functions [dpqr]ztbinom
and
[dpqr]zmbinom
for the zero-truncated and zero-modified
binomial distributions.
New vignette "distributions"
that reviews in great
detail the continuous and discrete distributions provided in the
package, along with implementation details.
aggregateDist
now accepts
"zero-truncated binomial"
,
"zero-truncated geometric"
,
"zero-truncated negative binomial"
,
"zero-truncated poisson"
,
"zero-modified binomial"
,
"zero-modified geometric"
,
"zero-modified negative binomial"
,
"zero-modified poisson"
and
"zero-modified logarithmic"
for argument model.freq
with the "recursive"
method.
New function rmixture
to generate random variates
from discrete mixtures, that is from random variables with
densities of the form f(x) = p_1 f_1(x) + ... + p_n
f_n(x).
New function rcompound
to generate random variates
from (non hierarchical) compound models of the form S = X_1
+ … + X_N. Function simul
could already do that, but
rcompound
is substantially faster for non hierarchical
models.
New function rcomppois
that is a simplified version of
rcompound
for the very common compound Poisson case.
simul
now accepts an atomic (named or not) vector for
argument nodes
when simulating from a non hierarchical
compound model. But really, one should use rcompound
for
such cases.
New alias rcomphierarc
for simul
that better
fits within the usual naming scheme of random generation
functions.
Functions grouped.data
and ogive
now accept
individual data in argument. The former will group the data
using hist
(therefore, all the algorithms to
compute the number of breakpoints available in hist
are
also available in grouped.data
). ogive
will first
create a grouped data object and then compute the ogive.
While there is no guarantee that the two functions are backward compatible (the number and position of the arguments have changed), standard calls should not be affected.
The material on probability laws in vignette
"lossdist"
has been moved to the new vignette
"distributions"
(see the previous section).
The first argument of the mgffoo
functions has
changed from x
to t
. This is a more common
notation for moment generating functions.
In aggregateDist
with the "recursive"
method,
if the length of p0
is greater than one, only the first
element is used, with a warning.
aggregateDist
with the "recursive"
method and
model.freq = "logarithmic"
now uses the new
dlogarithmic
family of functions. Therefore,
parametrization has changed from the one of Klugman et al.
(2012) to the standard parametrization for the logarithmic
distribution. Basically, any value of prob
for the
logarithmic parameter in previous versions of actuar should now
be 1 - prob
.
The aim of vignette "simulation"
is changed from
“simulation of compound hierarchical models” to
“simulation of insurance data with actuar” as it
also covers the new functions rmixture
and
rcompound
.
Vignette "lossdist"
is renamed to "modeling"
and it is revised to cover the new functionalities of
grouped.data
and ogive
.
An old and nasty out-of-bounds bug could crash R when using
the "recursive"
method of aggregateDist
with a
frequency distribution from the (a, b, 1) family. The bug
went unnoticed before because there was no example for the
(a, b, 1) case in the man page.
Functions [m,lev,mgf]invGauss
that complemented
functions [dpqr]invGauss
of package SuppDists are
deprecated in favor of the new complete set of functions
[dpqrm,lev,mgf]invgauss
.
News for actuar 1.2-2 and earlier can be found in file ‘NEWS.1.Rd’.