=== actuar: An R Package for Actuarial Science ===

Version 1.0-1
=============

USER-VISIBLE CHANGES

  o levinvpareto() works for order > -shape and defaults to order
    = 1, like all other lev<foo>() functions.

BUG FIXES

  o Functions d<foo>() handle the case x == 0 correctly.

  o Functions q<foo>() return NaN instead of an error when
    argument p is outside [0, 1] (as in R).

  o Functions r<foo>() for three parameter distributions (e.g. Burr)
    no longer wrongly display the "NaNs produced" warning message.

  o The warning message "NaNs produced" was not (and could not be)
    translated.

  o Function levinvpareto() computes limited moments for order >
    -shape using numerical integration.


Version 1.0-0
=============

NEW FEATURES

  o Improved support for regression credibility models. There is now
    an option to make the computations with the intercept at the
    barycenter of time. This assures that the credibility adjusted
    regression line (or plane, or ...) lies between the individual and
    collective ones. In addition, contracts without data are now
    supported like in other credibility models.

  o Argument 'right' for grouped.data() to allow intervals closed on
    the right (default) or on the left.

  o Method of quantile() for grouped data objects to compute the
    inverse of the ogive.

USER-VISIBLE CHANGES

  o cm() no longer returns the values of the unbiased estimators when
    method = "iterative".

  o Specification of regression models in cm() has changed: one should
    now provide the regression model as a formula and the regressors
    in a separate matrix or data frame.

  o Due to above change, predict.cm() now expects 'newdata' to be a
    data frame as for stats:::predict.lm().

  o Function bstraub() is no longer exported. Users are expected to
    use cm() as interface instead.

BUG FIXES

  o Functions r<foo>() are now more consistent in warning when NA's
    (specifically NaN's) are generated (as per the change in R 2.7.0).

  o frequency.portfolio was wrongly counting NAs.

  o Domain of pdfs returned by aggregateDist() now restricted to
    [0, 1].

  o Quantiles are now computed correctly (and more efficiently) in 0
    and 1 by quantile.aggregateDist().

  o coverage() no longer requires a cdf when it is not needed, namely
    when there is no deductible and no limit.


Version 0.9-7
=============

NEW FEATURES

  o plot method for function objects returned by ruin().

BUG FIXES

  o Calculation of the Bhlmann-Gisler and Ohlsson estimators was
    incorrect for hierarchical models with more than one level.

  o Better display of first column for grouped data objects.

  o Miscellaneous corrections to the vignettes.


Version 0.9-6
=============

Accented letters in comments removed to avoid compilation problems
under MacOS X on CRAN (see thread starting at
https://stat.ethz.ch/pipermail/r-devel/2008-February/048391.html).


Version 0.9-5
=============

Mostly bug fix release, along with a few improvements.

NEW FEATURES

  o New "simulation" vignette on usage of function simul(). Most of
    the material was previously in the "credibility" vignette.

  o Examples of ruin() and adjCoef() added to the "risk" demo.

USER-VISIBLE CHANGES

  o Following some negative comments on a function name VG had been
    using for years, function simpf() is renamed to simul() and the
    class of the output from 'simpf' to 'portfolio'.

  o The components of the list returned by severity.portfolio() are
    renamed from "first" and "last" to "main" and "split",
    respectively.

BUG FIXES

  o levinvgauss() returned wrong results.

  o Restructuring of the weights matrix in simpf() may fail with an
    incorrect number of columns.

  o Fixed index entry of the credibility theory vignette.

  o adjCoef() would only accept as argument 'h' a function named 'h'.

  o ruin() built incorrect probability vector and intensity matrix for
    mixture of Erlangs.

  o CTE.aggregateDist sometimes gave values smaller than the VaR for
    recursive and simulation methods.


Version 0.9-4
=============

Maintenance and new features release.

NEW FEATURES -- LOSS DISTRIBUTIONS

  o Functions mgffoo() to compute the moment (or cumulant if 'log =
    TRUE') generating function of the following distributions:
    chi-square, exponential, gamma, inverse gaussian (from package
    SuppDists), inverse gamma, normal, uniform and phase-type (see
    below).

  o Functions mfoo() to compute the raw moments of all the probability
    distributions supported in the package and the following of base
    R: chi-square, exponential, gamma, inverse gaussian (from package
    SuppDists), inverse gamma, normal, uniform.

  o Functions {d,p,mgf,m,r}phtype() to compute the probability density
    function, cumulative distribution function, moment generating
    function, raw moments of, and to generate variates from,
    phase-type distributions.

NEW FEATURES -- RISK THEORY

  o Function VaR() with a method for objects of class "aggregateDist"
    to compute the Value at Risk of a distribution.

  o Function CTE() with a method for objects of class "aggregateDist"
    to compute the Conditional Tail Expectation of a distribution.

  o Function adjCoef() to compute the adjustment coefficient in ruin
    theory. If proportional or excess-of-loss reinsurance is included
    in the model, adjCoef() returns a function to compute the
    adjustment coefficient for given limits. A plot method is also
    included.

  o Function ruin() returns a function to compute the infinite time
    probability of ruin for given initial surpluses in the
    Cramr-Lundberg and Sparre Andersen models. Most calculations are
    done using the cdf of phase-type distributions as per Asmussen and
    Rolski (1991).

  o Calculations of the aggregate claim distribution using the
    recursive method much faster now that recursions are done in C.

NEW FEATURES -- CREDIBILITY THEORY

  o Modular rewrite of cm(): the function now calls internal functions
    to carry calculations for each supported credibility model. This
    is more efficient.

  o Basic support for the regression model of Hachemeister in function
    cm().

  o For the hierarchical credibility model: support for the variance
    components estimators of Bhlmann and Gisler (2005) and Ohlsson
    (2005). Support remains for iterative pseudo-estimators.

  o Calculations of iterative pseudo-estimators in hierarchical
    credibility are much faster now that they are done in C.

OTHER NEW FEATURES

  o Four new vignettes: introduction to the package and presentation
    of the features in loss distributions, risk theory and credibility
    theory.

  o Portfolio simulation material of the "credibility" demo moved to
    demo "simulation".

USER-VISIBLE CHANGES

  o Argument 'approx.lin' of quantile.aggregateDist() renamed
    'smooth'.

  o Function aggregateDist() gains a 'maxit' argument for the maximum
    number of recursions when using Panjer's algorithm. This is to
    avoid infinite recursion when the cumulative distribution
    function does not converge to 1.

  o Function cm() gains a 'maxit' argument for the maximum number of
    iterations in pseudo-estimators calculations.

  o Methods of aggregate(), frequency(), severity() and weights() for
    objects of class "simpf" gain two new arguments:

    1. 'classification'; when TRUE, the columns giving the
       classification structure of the portfolio are excluded from the
       result. This eases calculation of loss ratios (aggregate claim
       amounts divided by the weights);

    2. 'prefix'; specifies a prefix to use in column names, with
        sensible defaults to avoid name clashes for data and weight
        columns.

BUG FIXES

  o The way weights had to be specified for the "chi-square" method of
    mde() to give expected results was very unintuitive. The fix has
    no effect when using the default weights.

  o The empirical step function returned by the "recursive" and
    "convolution" methods of aggregateDist() now correctly returns 1
    when evaluated past its largest knot.

DEPRECATED

  o Direct usage of bstraub() is now deprecated in favor of cm(). The
    function will remain in the package since it is used internally by
    cm(), but it will not be exported in future releases of the
    package. The current format of the results is also deprecated.


Version 0.9-3
=============

Minor bug fix and update release.

DEPRECATED, DEFUNCT OR NO BACKWARD COMPATIBILITY

  o The user interface of coverage() has changed. Instead of taking in
    argument the name of a probability law (say "foo") and require
    that functions dfoo() and pfoo() exist, coverage() now requires a
    function name or function object to compute the cdf of the
    unmodified random variable and a function name or function object
    to compute the pdf. If both functions are provided, coverage()
    returns a function to compute the pdf of the modified random
    variable; if only the cdf is provided, coverage() returns the cdf
    of the modified random variable. Hence, argument 'cdf' is no
    longer a boolean. The new interface is more in line with other
    functions of the package.

BUG FIXES

  o Methods of summary() and print.summary() for objects of class "cm"
    were not declared in the NAMESPACE file.

  o Various fixes to the demo files.


Version 0.9-2
=============

Major official update. This version is not backward compatible with
the 0.1-x series. Features of the package can be split in the following
categories: loss distributions modeling, risk theory, credibility
theory.

NEW FEATURES -- LOSS DISTRIBUTIONS

  o Functions {d,p,q,r}foo() to compute the density function,
    cumulative distribution function, quantile function of, and to
    generate variates from, all probability distributions of Appendix
    A of Klugman et al. (2004), "Loss Models, Second Edition" (except
    the inverse gaussian and log-t) not already in R. Namely, this
    adds the following distributions (the root is what follows the
    'd', 'p', 'q' or 'r' in function names):

       Distribution name          Root
    ------------------------- --------------
     Burr                      burr
     Generalized beta          genbeta
     Generalized Pareto        genpareto
     Inverse Burr              invburr
     Inverse exponential       invexp
     Inverse gamma	       invgamma
     Inverse Pareto            invpareto
     Inverse paralogistic      invparalogis
     Inverse transformed gamma invtrgamma
     Inverse Weibull           invweibull
     Loggamma                  loggamma
     Loglogistic               llogis
     Paralogistic              paralogis
     Pareto                    pareto
     Single parameter Pareto   pareto1
     Transformed beta          trbeta
     Transformed gamma         trgamma

    All functions are coded in C for efficiency purposes and should
    behave exactly like the functions in base R. For all distributions
    that have a scale parameter, the corresponding functions have
    'rate = 1' and 'scale = 1/rate' arguments.

  o Functions {m,lev}foo() to compute the k-th raw (non-central)
    moment and k-th limited moment for all the probability
    distributions mentioned above, plus the following ones of base R:
    beta, exponential, gamma, lognormal and Weibull.

  o Facilities to store and manipulate grouped data (stored in an
    interval-frequency fashion). Function grouped.data() creates a
    grouped data object similar to a data frame. Methods of "[",
    "[<-", mean() and hist() created for objects of class
    "grouped.data".

  o Function ogive() --- with appropriate methods of knots(), plot(),
    print() and summary() --- to compute the ogive of grouped
    data. Usage is in every respect similar to ecdf().

  o Function elev() to compute the empirical limited expected value of
    a sample of individual or grouped data.

  o Function emm() to compute the k-th empirical raw (non-central)
    moment of a sample of individual or grouped data.

  o Function mde() to compute minimum distance estimators from a
    sample of individual or grouped data using one of three distance
    measures: Cramer-von Mises (CvM), chi-square, layer average
    severity (LAS). Usage is similar to fitdistr() of package 'MASS'.

  o Function coverage() to obtain the pdf or cdf of the payment per
    payment or payment per loss random variable under any combination
    of the following coverage modifications: ordinary of franchise
    deductible, policy limit, coinsurance, inflation. The result is a
    function that can be used in fitting models to data subject to
    such coverage modifications.

  o Individual dental claims data set 'dental' and grouped dental
    claims data set 'gdental' of Klugman et al. (2004), "Loss Models,
    Second Edition".

NEW FEATURES -- RISK THEORY

  o Function aggregateDist() returns a function to compute the
    cumulative distribution function of the total amount of claims
    random variable for an insurance portfolio using any of the
    following five methods:

    1. exact calculation by convolutions (using function convolve() of
       package 'stats';
    2. recursive calculation using Panjer's algorithm;
    3. normal approximation;
    4. normal power approximation;
    5. simulation.

    The modular conception of aggregateDist() allows for easy
    inclusion of additional methods. There are special methods of
    print(), summary(), quantile() and mean() for objects of class
    "aggregateDist".  The objects otherwise inherit from classes
    "ecdf" (for methods 1, 2 and 3) and "function".

    See also the "Deprecated, defunct or no backward compatibility"
    section below.

  o Function discretize() to discretize a continuous distribution
    using any of the following four methods:

    1. upper discretization, where the discretized cdf is always above
       the true cdf;
    2. lower discretization, where the discretized cdf is always under
       the true cdf;
    3. rounding, where the true cdf passes through the midpoints of the
       intervals of the discretized cdf;
    4. first moment matching of the discretized and true distributions.

    Usage is similar to curve() of package 'graphics'. Again, the
    modular conception allows for easy inclusion of additional
    discretization methods.

NEW FEATURES -- CREDIBILITY THEORY

  o Function simpf() can now simulate data for hierarchical portfolios
    of any number of levels. Model specification changed completely;
    see the "Deprecated, defunct or no backward compatibility"
    below. The function is also significantly (~10x) faster than the
    previous version.

  o Generic function severity() defined mostly to provide a method for
    objects of class "simpf"; see below.

  o Methods of aggregate(), frequency(), severity() and weights() to
    extract information from objects of class "simpf":

    1. aggregate() returns the matrix of aggregate claim amounts per
       node;
    2. frequency() returns the matrix of the number of claims per node;
    3. severity() returns the matrix of individual claim amounts per
       node;
    4. weights() returns the matrix of weights corresponding to the
       data.

    Summaries can be done in various ways; see ?simpf.summaries

  o Function cm() (for "_c_redibility _m_odel") to compute structure
    parameters estimators for hierarchical credibility models,
    including the Bhlmann and Bhlmann-Straub models. Usage is
    similar to lm() of packages 'stats' in that the hierarchical
    structure is specified by means of a formula object and data is
    extracted from a matrix or data frame. There are special methods
    of print(), summary() for objects of class "cm". Credibility
    premiums are computed using a method of predict(); see below.

    For simple Bhlmann and Bhlmann-Straub models, bstraub() remains
    simpler to use and faster.

  o Function bstraub() now returns an object of class "bstraub" for
    which there exist print and summary methods. The function no
    longer computes the credibility premiums; see the "Deprecated,
    defunct or no backward compatibility" below.

  o Methods of predict() for objects of class "cm" and "bstraub"
    created to actually compute the credibility premiums of
    credibility models. Function predict.cm() can return the premiums
    for specific levels of a hierarchical portfolio only.

OTHER NEW FEATURES

  o Function unroll() to unlist a list with a "dim" attribute of
    length 0, 1 or 2 (that is, a vector or matrix of vectors)
    according to a specific dimension. Currently identical to
    severity.default() by lack of a better usage of the default method
    of severity().

  o Three new demos corresponding to the three main fields of
    actuarial science covered by the package.

  o French translations of the error and warning messages.

  o The package now has a name space.

DEPRECATED, DEFUNCT OR NO BACKWARD COMPATIBILITY

  o Function panjer(), although still present in the package, should
    no longer be used directly. Recursive calculation of the aggregate
    claim amount should be done with aggregateDist(). Further, the
    function is not backward compatible: model specification has
    changed, discretization of the claim amount distribution should
    now be done with discretize(), and the function now returns a
    function to compute the cdf instead of a simple vector of
    probabilities.

  o Model specification for simpf() changed completely and is not
    backward compatible with previous versions of the package. The new
    scheme allows for much more general models.

  o Function rearrangepf() is defunct and has been replaced by methods
    of aggregate(), frequency() and severity().

  o Function bstraub() no longer computes the credibility
    premiums. One should now instead use predict() for this.

  o The data set 'hachemeister' is no longer a list but rather a
    matrix with a state specification.


Version 0.1-3
=============

Fixed the dependency on R >= 2.1.0 since the package uses function
isTRUE().


Version 0.1-2
=============

- First public release.
- Fixed an important bug in bstraub(): when calculating the range of
  the weights matrix, NAs were not excluded.
- Miscellaneous documentation corrections.


Version 0.1-1
=============

- Initial release.
- Contains functions bstraub(), simpf(), rearrangepf() and panjer(),
  and the dataset hachemeister.
