make_portfolio {volrisk} | R Documentation |
Create Insurance Portfolio for Simulation
Description
This function standardizes and validates raw insurance portfolio data to prepare it for simulation. It ensures all necessary fields are correctly mapped and conform to required formats. If no column mapping is provided, the user will be prompted interactively.
Usage
make_portfolio(data, cols = NULL)
Arguments
data |
A data.frame containing raw insurance portfolio data. |
cols |
A named list with column mappings. The list should include:
|
Value
A cleaned data.frame with standardized column names:
unique_id
, client_id
, duration
,
mortality
, lapse
, nar
, rate
.
Examples
make_portfolio(example_portfolio, cols = list(
unique_id = "POL_ID",
client_id = "CLIENT_ID",
duration = "DURATION",
mortality = "MORTALITY",
lapse = "LAPSE",
nar = "NAR",
rate = "RATE"
))
[Package volrisk version 0.1.0 Index]