Title: R Actuarial Workshops
Description: In order to facilitate R instruction for actuaries, we have organized several sets of publicly available data of interest to non-life actuaries. In addition, we suggest a set of packages, which most practicing actuaries will use routinely. Finally, there is an R markdown skeleton for basic reserve analysis.
Version: 0.1.8
Maintainer: Brian A. Fannin <captain@PirateGrunt.com>
LazyData: true
License: MPL-2.0 | file LICENSE
Depends: R (≥ 3.5.0)
Suggests: actuar, ChainLadder, dplyr, devtools, FinCal, fitdistrplus, forcats, ggplot2, insuranceData, knitr, Lahman, lubridate, maps, mondate, nlme, nycflights13, purrr, randomForest, randomNames, readr, readxl, RColorBrewer, rmarkdown, scales, stringr, tibble, tidyr, tweedie, XML
VignetteBuilder: knitr
Type: Package
RoxygenNote: 7.1.1
URL: http://casact.github.io/raw_package/
Encoding: UTF-8
NeedsCompilation: no
Packaged: 2021-02-04 15:06:16 UTC; bfannin
Author: Brian A. Fannin [aut, cre]
Repository: CRAN
Date/Publication: 2021-02-05 15:40:03 UTC

Committee on the Theory of Risk (COTOR)

Description

The Casualty Actuarial Society's Committee on Theory of Risk (COTOR) issued several challenges as part of their work. These involved artificial constructed loss data. Actuaries were invited to construct models to estimate appropriate premiums for risk transfer.

Note that there is no COTOR1.

COTOR2

COTOR2 is a vector containing 250 observations of claim values.

COTOR round 2

COTOR3

COTOR3 is a data frame with 490 observations of 2 variables. The values were generated by the great Stuart Klugman.

COTOR round 3

COTOR4

COTOR4 is a data frame with 2500 rows and 2 columns.

COTOR round 4

COTOR5

COTOR5 is a data frame with 4849 rows and 5 columns

COTOR round 5

Usage

data(COTOR2)

CAS Column Names

Description

This will change the column names of a data frame obtained from the CAS database of reserve triangles. This data was procured and modified by Glenn G. Meyers and Peng Shi and is hosted by the CAS. More information on the data is available here: http://www.casact.org/research/index.cfm?fa=loss_reserves_data

Usage

CasColNames(df, restore = TRUE)

Arguments

df

A data frame of loss reserving data

restore

Boolean indicating whether to restore the names defined by Meyers and Shi. The default is true.

Value

A data frame with different column names.

Examples


## Not run: 
data(NJM_WC)
NJM_WC <- CasColNames(NJM_WC, restore = TRUE)

## End(Not run)


Hurricane data

Description

Listing of the position and windspeed of hurricanes from 1970 through 2011.

Data is taken from the National Hurricane Center, a division of the National Oceanic and Atmospheric Association. A description of the data as well as data for storms in other regions may be found here: IBTrACS.

The fields "SerialNumber", "Basin", "SubBasin", "Nature", "Pressure", "Center", "WindPercentile", "PressurePercentile" and "TrackType" have been removed.

Usage

data(Hurricane)

Format

An object of class spec_tbl_df (inherits from tbl_df, tbl, data.frame) with 43122 rows and 8 columns.


InstallSuggestions

Description

This function will install the full set of suggested packages.

Usage

InstallSuggestions(pkg = "raw", quiet, ...)

Arguments

pkg

Name of the package for which you want to install suggestions

quiet

Include additional messages while installing?

...

Additional named arguments passed to 'install.packages'

Value

A character vector indicating which packages were installled.

Examples


## Not run: 
  InstallSuggestions()

## End(Not run)


MultiTri

Description

Complete triangle of losses for the same 4 private passenger auto and workers comp companies. Data is taken from the CAS.

Source

https://www.casact.org/research/reserve_data/ppauto_pos.csv

https://www.casact.org/research/reserve_data/wkcomp_pos.csv

https://www.casact.org/research/reserve_data/othliab_pos.csv

See Also

NAIC


NAIC

Description

This data represents ten complete years of Schedule P development for many NAIC reporting companies. The data was prepared by Glenn Meyers and Peng Shi and is available from the CAS https://www.casact.org/research/index.cfm?fa=loss_reserves_data.

NOte that the columns have been given more user friendly names. The original column names may be restored by using the CasColNames function.

Source

https://www.casact.org/research/reserve_data/ppauto_pos.csv

https://www.casact.org/research/reserve_data/wkcomp_pos.csv

https://www.casact.org/research/reserve_data/comauto_pos.csv

https://www.casact.org/research/reserve_data/medmal_pos.csv

https://www.casact.org/research/reserve_data/prodliab_pos.csv

https://www.casact.org/research/reserve_data/othliab_pos.csv


New Jersey Manufacturing Company Workers Comp Reserving Data

Description

This data represents ten complete years of Schedule P workers comp development for the New Jersey Manufacturing Company. The data was prepared by Glenn Meyers and Peng Shi and is available from the CAS https://www.casact.org/research/index.cfm?fa=loss_reserves_data. The columns have been given more user friendly names. The original column names may be restored by using the CasColNames function.

This data has been included because it is the triangle used by Greg Taylor and Grainne McGuire in their monograph "Stochastic Loss Reserving Using Generalized Linear Models". https://www.casact.org/pubs/monographs/index.cfm?fa=taylor-monograph03

This is a data frame with 100 observations of 13 variables.

Usage

data(NJM_WC)

Format

An object of class tbl_df (inherits from tbl, data.frame) with 100 rows and 13 columns.


Private Passenger Auto (PPA) Ratemaking Data

Description

This is data taken from Appendix A of the "Basic Ratemaking" study note by Werner and Modlin.

Rate change

This is a data frame with 7 observations of 5 variables.

Accident year

This is a data frame with 5 observations of 4 variables.

Premium trend

Data frame with 25 observations of 3 values. The premium is shown at current level. This may be used to determine premium or exposure trend.

Loss development

Data frame with 25 observations of 3 values. Note that this loss development data is stored in "long" rather than "wide" format.

Loss trend

Data frame with 20 observations of 7 values. The data may be used to estimate loss trend.

ULAE

A data frame with 3 observations of 4 values.

Usage

data(PPA)

PackageDependencies

Description

PackageDependencies will examine the DESCRIPTION file of a package and return a vector of dependencies.

Usage

PackageDependencies(
  x,
  type = c("Depends", "Imports", "Suggests", "Enhances", "LinkingTo")
)

Arguments

x

The name of the packages

type

What sort of dependency are you looking for? Permissible values are "Depends", "Imports", "Suggests", "Enhances" and "LinkingTo"

Examples


## Not run: 
  PackageDependencies("ggplot2", "Depends")

## End(Not run)


PackageIsInstalled

Description

This function will indicate whether a package has been installed. It uses the installed.packages function for this.

Usage

PackageIsInstalled(pkgs)

Arguments

pkgs

Character vector of package names.

Value

A logical vector indicating whether the packages have been installed.

Examples


## Not run: 
  PackageIsInstalled("ggplot2")

## End(Not run)


PackageNeedsUpdating

Description

This function will indicate whether a package needs to be updated. It uses the old.packages function for this.

Usage

PackageNeedsUpdating(pkgs)

Arguments

pkgs

Character vector of package names.

Value

A logical vector indicating whether the packages need to be updated.

Examples


## Not run: 
  PackageNeedsUpdating("ggplot2")

## End(Not run)


Region data

Description

Consolidation of state data into various regions. The state data was generated randomly as a Poisson sample.

Usage

data(RegionExperience)

Format

An object of class data.frame with 40 rows and 4 columns.

See Also

StateExperience


State data

Description

Random illustrative data

Usage

data(StateExperience)

Format

An object of class data.frame with 500 rows and 6 columns.

See Also

RegionExperience


raw - R Actuarial Workshops

Description

This is a packge which stores data used in R workshops sponsored by the Casualty Actuarial Society.

Details

For more information, read the package vignette. To access the package vignette, type in the code shown in the Examples section (the line without the hash marks).

Examples

## Not run: 
vignette(topic = "raw")

## End(Not run)