# unpaidClaims

Compute unpaid claims estimates for `bornhuetterFerguson` object

Since R2020b

## Syntax

``unpaidClaimsEstimate = unpaidClaims(bf)``
``unpaidClaimsEstimate = unpaidClaims(___,referenceClaimsType)``

## Description

example

````unpaidClaimsEstimate = unpaidClaims(bf)` computes unpaid claims estimates for a `bornhuetterFerguson` object. ```

example

````unpaidClaimsEstimate = unpaidClaims(___,referenceClaimsType)` additionally specifies the type of claims data. Specify this argument after the input argument in the previous syntax.```

## Examples

collapse all

Compute unpaid claims estimates for a `bornhuetterFerguson` object for simulated insurance claims data.

```load InsuranceClaimsData.mat; head(data)```
``` OriginYear DevelopmentYear ReportedClaims PaidClaims __________ _______________ ______________ __________ 2010 12 3995.7 1893.9 2010 24 4635 3371.2 2010 36 4866.8 4079.1 2010 48 4964.1 4487 2010 60 5013.7 4711.4 2010 72 5038.8 4805.6 2010 84 5059 4853.7 2010 96 5074.1 4877.9 ```

Use `developmentTriangle` to convert the data to a development triangle, which is the standard form for representing claims data. Create two `developmentTriangle` objects, one for reported claims and one for paid claims.

`dT_reported = developmentTriangle(data,'Origin','OriginYear','Development','DevelopmentYear','Claims','ReportedClaims')`
```dT_reported = developmentTriangle with properties: Origin: {10x1 cell} Development: {10x1 cell} Claims: [10x10 double] LatestDiagonal: [10x1 double] Description: "" TailFactor: 1 CumulativeDevelopmentFactors: [1.3069 1.1107 1.0516 1.0261 1.0152 1.0098 1.0060 1.0030 1.0010 1] SelectedLinkRatio: [1.1767 1.0563 1.0249 1.0107 1.0054 1.0038 1.0030 1.0020 1.0010] ```
`dT_paid = developmentTriangle(data,'Origin','OriginYear','Development','DevelopmentYear','Claims','PaidClaims')`
```dT_paid = developmentTriangle with properties: Origin: {10x1 cell} Development: {10x1 cell} Claims: [10x10 double] LatestDiagonal: [10x1 double] Description: "" TailFactor: 1 CumulativeDevelopmentFactors: [2.4388 1.4070 1.1799 1.0810 1.0378 1.0178 1.0080 1.0030 1.0010 1] SelectedLinkRatio: [1.7333 1.1925 1.0914 1.0417 1.0196 1.0097 1.0050 1.0020 1.0010] ```

Create an `expectedClaims` object where the first input argument is the reported development triangle and the second input argument is the paid development triangle.

```earnedPremium = [17000; 18000; 10000; 19000; 16000; 10000; 11000; 10000; 14000; 10000]; ec = expectedClaims(dT_reported, dT_paid,earnedPremium)```
```ec = expectedClaims with properties: ReportedTriangle: [1x1 developmentTriangle] PaidTriangle: [1x1 developmentTriangle] EarnedPremium: [10x1 double] InitialClaims: [10x1 double] CaseOutstanding: [10x1 double] EstimatedClaimsRatios: [10x1 double] SelectedClaimsRatios: [10x1 double] ```

Create a `bornhuetterFerguson` object with reported claims, paid claims, and expected claims to calculate the ultimate claims, cases outstanding, IBNR claims, and unpaid claims estimates.

`bf = bornhuetterFerguson(dT_reported, dT_paid, ec.ultimateClaims)`
```bf = bornhuetterFerguson with properties: ReportedTriangle: [1x1 developmentTriangle] PaidTriangle: [1x1 developmentTriangle] ExpectedClaims: [10x1 double] PercentUnreported: [10x1 double] PercentUnpaid: [10x1 double] CaseOutstanding: [10x1 double] ```

Use `unpaidClaims` to to compute the unpaid claims estimates for the `bornhuetterFerguson` object.

`unpaidClaimsEstimate = unpaidClaims(bf,"reported")`
```unpaidClaimsEstimate = 10×1 103 × 0.1968 0.0506 0.1299 0.1095 0.1767 0.0981 0.3915 0.9838 1.7208 3.7320 ```

## Input Arguments

collapse all

Bornhuetter-Ferguson object, specified as a previously created `bornhuetterFerguson` object.

Data Types: `object`

Type of claims data, specified as a character vector or a string.

Data Types: `char` | `string`

## Output Arguments

collapse all

Unpaid claims estimates, returned as an array.