Introduction


This post documents an end‑to‑end analysis of insurance claims data using R Studio. The main objectives are:

The dataset is synthetic and generic and is designed to simulate typical insurance operations.

Data Dictionary


Below is the structure of the main tables used in the analysis.

Table: Policies

| Column              | Description |
|---------------------|------------|
| `id_policy`         | Unique policy identifier. |
| `insurance_type`    | General type of insurance (e.g., auto, life, health, home). |
| `billing_frequency` | Frequency of premium payments (e.g., monthly, annual, semi‑annual). |
| `issue_date`        | Date when the policy was issued. |
| `start_date`        | Start date of coverage. |
| `end_date`          | End date of coverage. |
| `policy_status`     | Policy status (active, canceled, expired, suspended, renewed). |
| `monthly_premium`   | Monthly premium amount. |
| `annual_premium`    | Annual premium amount. |
| `sum_insured`       | Total insured amount. |
| `deductible`        | Deductible amount per claim. |

Table: Clients

| Column         | Description |
|----------------|------------|
| `id_client`    | Unique client identifier. |
| `gender`       | Gender category (e.g., male, female, not specified). |
| `age_group`    | Age group (e.g., 20‑30, 31‑40, 41‑50, 51‑60, 61‑70, 71‑80). |
| `income_level` | Income level (low, medium, high). |
| `occupations`  | General occupation category (e.g., professional, technical, worker, retired, unemployed, other). |

Table: Claims

| Column                         | Description |
|--------------------------------|------------|
| `id_claim`                     | Unique claim identifier. |
| `id_policy`                    | Foreign key linking to `policies`. |
| `id_client`                    | Foreign key linking to `clients` (optional linkage). |
| `claim_date`                   | Claim occurrence date. |
| `notification_date`            | Date when the claim was reported. |
| `closure_date`                 | Date when the claim was resolved/closed. |
| `claim_type`                   | Claim type (e.g., accident, theft, fire, liability, other). |
| `severity`                     | Severity level (low, medium, high). |
| `claimed_amount`               | Amount claimed. |
| `approved_amount`              | Approved amount after review. |
| `paid_amount`                  | Actual paid amount. |
| `claim_status`                 | Claim status (registered, in process, closed, rejected, under investigation). |
| `resolution_time_days`         | Resolution time in days (calculated as `closure_date` minus `claim_date`). |

Table: Payments

| Column              | Description |
|---------------------|------------|
| `id_payment`        | Unique payment identifier. |
| `id_policy`         | Foreign key linking to `policies`. |
| `payment_date`      | Payment date. |
| `payment_amount`    | Payment amount. |
| `payment_method`    | General payment method (e.g., automatic debit, card, transfer, cash). |
| `payment_status`    | Payment status (paid, pending, overdue, rejected). |
| `days_overdue`      | Days past due (calculated from due date to `payment_date`). |