calc_adlp_component {ADLP} | R Documentation |
Accident and Development period Adjusted Linear Pools Component Models
Description
Accident and Development period Adjusted Linear Pools Component Models
Usage
calc_adlp_component(
component,
newdata,
y = NULL,
model = c("train", "full"),
calc = c("pdf", "cdf", "mu", "sim")
)
calc_adlp_component_lst(
components_lst,
newdata,
model = c("train", "full"),
calc = c("pdf", "cdf", "mu", "sim"),
...
)
Arguments
component |
Object of class |
newdata |
Claims Triangle and other information. |
y |
Optional vector of |
model |
Whether the training component model or the full component model should be used |
calc |
Type of calculation to perform |
components_lst |
List of objects of class |
... |
Other parameters to be passed into |
Details
Calls the specified function for an object of class adlp_component
.
calc_adlp_component_lst
is a wrapper for calc_adlp_component
for each
component in the list components_lst
. This wrapper also contains functionality
to signal the component that causes an error if it is occuring downstream.
Value
The result of the evaluated function on the adlp_component
. This
would be a vector with the same length as rows on newdata
with the
calculations.
Examples
data(test_adlp_component)
newdata <- test_adlp_component$model_train$data
pdf_data = calc_adlp_component(test_adlp_component, newdata = newdata,
model = "train", calc = "pdf")
data(test_adlp_component)
test_component1 <- test_adlp_component
test_component2 <- test_adlp_component
test_components <- adlp_components(
component1 = test_component1,
component2 = test_component2
)
newdata <- test_adlp_component$model_train$data
pdf_data = calc_adlp_component_lst(test_components, newdata = newdata,
model = "train", calc = "pdf")