제22장 부록. 데이터 자료
이 부록 절에서는 이 책에서 사용한 데이터셋과 함께 독자가 탐구해 볼 만한 다른 데이터셋을 설명합니다.
각 데이터셋마다 다운로드 버튼을 제공하므로 표준 .csv(쉼표로 구분된 값) 형식의 데이터를 쉽게 이용할 수 있습니다. 이를 통해 책에서 개발한 방법을 재현하고 실험해 볼 수 있을 뿐 아니라, 연습 문제를 통해 이해를 더욱 깊게 할 수 있습니다.
각 데이터셋의 출처를 제공합니다. 또한 더 깊이 이해하기 위해 때때로 이 원래 출처를 참고하여 이 책에서 개발한 분석의 토대가 되는 데이터에 대한 이해를 한층 넓히기를 권장합니다.
22.1 위스콘신 재산 기금
설명: 위스콘신 지방정부 재산보험 기금(LGPIF)은 위스콘신 보험감독관실이 운영하는 보험 풀입니다. LGPIF는 카운티, 시, 타운, 빌리지, 학군, 도서관 이사회 등 지방정부 기관에 재산보험을 제공하기 위해 설립되었습니다. 이 기금은 정부 건물, 학교, 도서관, 자동차 등 지방정부 재산을 보험 대상으로 합니다. 홍수, 지진, 마모, 극한 기온, 곰팡이, 전쟁, 핵반응, 직원의 횡령 또는 절도로 인한 손실을 제외한 모든 재산 손실을 보장합니다.
| Variable | Description |
|---|---|
| PolicyNum | Policy number |
| Year | Contract year |
| Premium | Premium |
| Deduct | Deductible |
| BCcov | Coverage for building and contents |
| Freq | Number of claims during the year (frequency) |
| Fire5 | Binary variable to indicate the fire class is below 5 |
| NoClaimCredit | Binary variable to indicate no claims in the past two years |
| EntityType | Categorical variable that is one of six types: 1=Village, 2=City,3=County, 4=Misc, 5=School, or Town) |
| AlarmCredit | Categorical variable that is one of four types: (0, 5, 10, or 15) for automatic smoke alarms in main rooms |
| BCClaim | Builing and contents claims |
| PolicyNum | Year | Premium | Deduct | BCcov | Freq | Fire5 | NoClaimCredit | EntityType | AlarmCredit | BCClaim |
|---|---|---|---|---|---|---|---|---|---|---|
| 120002 | 2006 | 9313 | 1000 | 22714456 | 0 | 1 | 0 | 3 | 1 | 0 |
| 120002 | 2007 | 8767 | 1000 | 25046646 | 0 | 1 | 0 | 3 | 1 | 0 |
| 120002 | 2008 | 7090 | 1000 | 20851525 | 0 | 1 | 1 | 3 | 1 | 0 |
| 120002 | 2009 | 8522 | 1000 | 21852696 | 0 | 1 | 1 | 3 | 1 | 0 |
| 120002 | 2010 | 7994 | 1000 | 23511493 | 1 | 1 | 1 | 3 | 1 | 6839 |
| PolicyNum | Year | Premium | Deduct | BCcov | Freq | Fire5 | NoClaimCredit | EntityType | AlarmCredit | BCClaim |
|---|---|---|---|---|---|---|---|---|---|---|
| 180787 | 2010 | 199 | 500 | 285000 | 0 | 1 | 1 | 4 | 1 | 0 |
| 180788 | 2010 | 58344 | 100000 | 416739800 | 1 | 1 | 0 | 4 | 1 | 168304 |
| 180789 | 2010 | 295 | 500 | 500988 | 1 | 1 | 0 | 4 | 1 | 1034 |
| 180790 | 2010 | 2077 | 1000 | 3580665 | 0 | 1 | 0 | 4 | 4 | 0 |
| 180791 | 2010 | 81 | 500 | 118800 | 0 | 1 | 0 | 4 | 1 | 0 |
22.2 ANU 기업 출장 데이터
대학은 교직원과 학생이 대학의 공식 업무로 출장하는 동안 캠퍼스나 주 근무지를 벗어나 겪을 수 있는 다양한 사고와 사건을 보장하기 위해 기업 출장 보험을 구입합니다. 이 폭넓은 보장에는 의료 서비스 및 후송, 개인 재산 손실, 정치적 사유나 기상 관련 사유로 인한 긴급 철수 등이 포함됩니다. 이 보장에 대한 자세한 내용은 Frees and Butt (2022)를 참조하십시오.
이 데이터셋에는 2107개의 관측값이 있습니다. 변수 이름은 표 22.3에 설명되어 있으며, 처음과 마지막 다섯 개의 관측값은 표 22.4에 있습니다.
| Variable | Description |
|---|---|
| UW Year | Underwriting Year |
| Loss Date | Date that the loss occurred |
| Reported Date | Date that the loss was reported |
| Last Trans Date | Last date in which there was a transaction regarding the loss |
| Paid Loss | Cumulative amount paid on the loss |
| Outstanding Reserve | Estimate of the loss amount yet to be paid |
| Incurred Loss | Sum of the amount paid and the estimate of future payments |
| Status | An indicator as to whether the claim has been deemed settled (closed) or not settled (open) |
| UW.Year | Loss.Date | Reported.Date | Last.Trans.Date | Paid.Loss | Outstanding.Reserve | Incurred.Loss | Status |
|---|---|---|---|---|---|---|---|
| 2021 | 19/12/2021 | 20/12/2021 | 24/12/2021 | 10000 | 0 | 10000 | Closed |
| 2021 | 9/4/2022 | 29/04/2022 | 30/05/2022 | 423 | 0 | 423 | Closed |
| 2021 | 2/5/2022 | 4/5/2022 | 0 | 500 | 500 | Open | |
| 2021 | 5/5/2022 | 17/05/2022 | 0 | 562 | 562 | Open | |
| 2021 | 30/04/2022 | 27/05/2022 | 10/6/2022 | 1500 | 0 | 1500 | Closed |
| UW.Year | Loss.Date | Reported.Date | Last.Trans.Date | Paid.Loss | Outstanding.Reserve | Incurred.Loss | Status |
|---|---|---|---|---|---|---|---|
| 2006 | 1/11/2006 | 19/06/2007 | 0 | 0 | 0 | Closed | |
| 2006 | 24/06/2007 | 26/06/2007 | 8/1/2008 | 6278 | 0 | 6278 | Closed |
| 2006 | 4/7/2007 | 6/7/2007 | 11/9/2007 | 114 | 0 | 114 | Closed |
| 2006 | 20/05/2007 | 26/06/2007 | 14/07/2007 | 136 | 0 | 136 | Closed |
| 2006 | 15/02/2007 | 27/06/2007 | 14/07/2007 | 1208 | 0 | 1208 | Closed |
출처: Frees, Edward and Butt, Adam (2022). “ANU 기업 출장 보험 청구 2022”. Australian National University Data Commons. DOI https://doi.org/10.25911/vrdw-9f32.
22.3 ANU 단체 상해 데이터
단체 상해보험은 업무 중 발생한 사고로 인한 부상이나 사망에 대해 재정적 보호를 제공합니다. 산업재해보상보험과 마찬가지로, 단체 상해보험은 사고로 인한 사망이나 부상에 대해 보험 보장과 배상책임보험 보호를 제공합니다. 산업재해보상보험과 달리, 단체 상해보험은 학생과 ANU의 자원봉사자도 보장합니다. 이 보장에 대한 자세한 내용은 Frees and Butt (2022)를 참조하십시오.
이 데이터셋에는 148개의 관측값이 있습니다. 변수 이름은 표 22.5에 설명되어 있으며, 처음과 마지막 다섯 개의 관측값은 표 22.6에 있습니다.
| Variable | Description |
|---|---|
| UW Year | Underwriting Year |
| Loss Date | Date that the loss occurred |
| Last Trans Date | Last date in which there was a transaction regarding the loss. |
| Paid Loss | Cumulative amount paid on the loss |
| Outstanding Reserve | Estimate of the loss amount yet to be paid |
| Incurred Loss | Sum of the amount paid and the estimate of future payments |
| Status | An indicator as to whether the claim has been deemed settled (closed) or not settled (open) |
| UW.Year | Loss.Date | Last.Trans.Date | Paid.Loss | Outstanding.Reserve | Incurred.Loss | Status |
|---|---|---|---|---|---|---|
| 2021 | 6/12/2021 | 3/6/2022 | 805 | 0 | 805 | Closed |
| 2021 | 15/11/2021 | 0 | 0 | 0 | Closed | |
| 2021 | 15/11/2021 | 0 | 0 | 0 | Closed | |
| 2021 | 22/03/2022 | 4/5/2022 | 396 | 0 | 396 | Closed |
| 2021 | 11/4/2022 | 2/8/2022 | 740 | 360 | 1100 | Open |
| UW.Year | Loss.Date | Last.Trans.Date | Paid.Loss | Outstanding.Reserve | Incurred.Loss | Status |
|---|---|---|---|---|---|---|
| 2010 | 6/3/2011 | 26/07/2011 | 776 | 0 | 776 | Closed |
| 2010 | 22/07/2011 | 23/01/2012 | 4625 | 0 | 4625 | Closed |
| 2010 | 5/6/2011 | 30/01/2012 | 1504 | 0 | 1504 | Closed |
| 2007 | 11/1/2008 | 23/02/2008 | 0 | 0 | 0 | Closed |
| 2007 | 29/08/2008 | 0 | 0 | 0 | Closed |
출처: Frees, Edward and Butt, Adam (2022). “ANU 단체 상해 청구 2022”. Australian National University Data Commons. https://doi.org/10.25911/jcfx-zj56.
22.4 ANU 자동차 데이터
이 보험은 승용차, 밴, 다목적 차량, 오토바이를 포함한 ANU 소유 차량을 보장합니다. 이 보장에 관한 자세한 내용은 Frees and Butt (2022)를 참조하십시오.
이 데이터셋에는 318개의 관측값이 있습니다. 변수명은 표 22.7에 설명되어 있으며, 처음 다섯 개와 마지막 다섯 개의 관측값은 표 22.8에 있습니다.
| Variable | Description |
|---|---|
| Policy Term Start Date | Start date of the contract year in which the loss occurred |
| Loss Date | Date that the loss occurred |
| Reported Date | Date that the loss was reported |
| Motor Fault | Party responsible for the loss |
| Driver Age | Age of the driver |
| Vehicle Description | Type of vehicle |
| Loss Postcode | Postal code where the loss occurred |
| Excess | The deductible applied to the loss |
| Motor Net Paid | Amount paid to the insured (ANU) |
| Outstanding Estimate | Estimate of the loss amount yet to be paid |
| Motor Net Incurred | Sum of the amount paid and the estimate of future payments |
| Third Party Identified | Indicates whether a responsible third party could be identified |
| Third Party Insured | Indicates whether a responsible third party was insured |
| Policy.Term.Start.Date | Loss.Date | Reported.Date | Motor.Fault | Driver.Age | Vehicle.Description | Loss.Postcode |
|---|---|---|---|---|---|---|
| 1/11/2011 | 6/6/2012 | 4/10/2012 | THIRD PARTY RESPONSIBLE | NA | FORD TRANSIT VAN | 2600 |
| 1/11/2011 | 16/08/2012 | 14/11/2013 | INSURED RESPONSIBLE | 39 | TOYOTA HIACE | 2612 |
| 1/11/2011 | 4/9/2012 | 17/01/2013 | INSURED RESPONSIBLE | 52 | HYUNDAI IX35 | 2600 |
| 1/11/2011 | 21/09/2012 | 28/09/2012 | THIRD PARTY RESPONSIBLE | 59 | HOLDEN COMMODORE | 2518 |
| 1/11/2011 | 22/09/2012 | 12/10/2012 | INSURED RESPONSIBLE | NA | SUBARU FORESTER | 2612 |
| Excess | Motor.Net.Paid | Outstanding.Estimate | Motor.Net.Incurred | Third.Party.Identified | Third.Party.Insured |
|---|---|---|---|---|---|
| 1000 | 385 | 0 | 385 | IDENTIFIED | |
| 1000 | 901 | 0 | 901 | ||
| 1000 | 1226 | 0 | 1226 | ||
| NA | 1672 | 0 | 1672 | IDENTIFIED | NOT INSURED |
| 1000 | 3419 | 0 | 3419 | INSURED |
| Policy.Term.Start.Date | Loss.Date | Reported.Date | Motor.Fault | Driver.Age | Vehicle.Description | Loss.Postcode |
|---|---|---|---|---|---|---|
| 1/11/2021 | 4/4/2022 | 5/4/2022 | INSURED RESPONSIBLE | 66 | VOLKSWAGEN TIGUAN | 2604 |
| 11/1/2021 | 11/4/2022 | 9/5/2022 | INSURED RESPONSIBLE | 27 | TOYOTA HILUX | 2540 |
| 1/11/2021 | 11/4/2022 | 9/5/2022 | INSURED RESPONSIBLE | 27 | TOYOTA HILUX | 2540 |
| 11/1/2021 | 15/04/2022 | 11/7/2022 | INSURED RESPONSIBLE | 21 | TOYOTA HILVX | 2601 |
| 1/11/2021 | 18/07/2022 | 18/07/2022 | NO-ONE RESPONSIBLE | NA | TOYOTA HILUX | 2601 |
| Excess | Motor.Net.Paid | Outstanding.Estimate | Motor.Net.Incurred | Third.Party.Identified | Third.Party.Insured |
|---|---|---|---|---|---|
| 0 | 2373 | 1056 | 3429 | ||
| 0 | 210 | 25000 | 25210 | ||
| 0 | 0 | 31927 | 31927 | ||
| 0 | 0 | 2750 | 2750 | ||
| 0 | 0 | 299 | 299 |
출처: Frees, Edward and Butt, Adam (2022). “ANU 자동차 청구 2022”. Australian National University Data Commons. DOI https://doi.org/10.25911/g7e4-9e46.
22.5 스페인 개인보험 데이터
이 데이터셋은 2014 보험연도에 자동차보험과 주택소유자보험 계약을 모두 보유한 스페인의 실제 보험계약자 포트폴리오에서 추출한 개인 보험 고객 10,000명으로 구성되어 있습니다. 이 데이터에는 각 고객, 보험계약, 계약 유형별 연간 청구에 관한 정보가 포함되어 있습니다.
데이터는 다음 다운로드 버튼을 사용하여 받을 수 있습니다:
데이터에 대한 설명은 표 22.9에 나와 있습니다.
| Variable | Description |
|---|---|
| gender | 1 for male and 0 for female |
| Age_client | the age of the customer in years |
| year | Policy year. Equals 5 corresponding to 2014. |
| age_of_car_M | the number of years since the vehicle was bought by the customer |
| Car_power_M | the power of the vehicle |
| Car_2ndDriver_M | 1 if the customer has informed the insurance company that a second occasional driver uses the vehicle, and 0 otherwise |
| num_policiesC | the total number of policies held by the same customer in the insurance company |
| metro_code | 1 for urban or metropolitan and 0 for rural |
| Policy_PaymentMethodA | 1 for annual payment and 0 for monthly payment in the motor policy |
| Policy_PaymentMethodH | 1 for annual payment and 0 for monthly payment in the homeowners policy |
| Insuredcapital_content_re | the value of content in homeowners insurance |
| Insuredcapital_continent_re | the value of building in homeowners insurance |
| appartment | 1 if the homeowners insurance correspond to an apartment and 0 otherwise |
| Client_Seniority | the number of years that the customer has been in the company |
| Retention | 1 if the policy is renewed and 0 otherwise |
| NClaims1 | the number of claims in the motor insurance policy for the corresponding year |
| NClaims2 | the number of claims in the homeowners insurance policy for the corresponding year |
| Claims1 | the sum of claims cost in the motor insurance policy for the corresponding year |
| Claims2 | the sum of claims cost in the homeowners insurance policy for the corresponding year |
| Types | 1 when neither an auto nor a home claim, it is equal to 2 when the customer has an auto but not a home claim, it is equal to 3 when the customer does not have not an auto but a home claim and it is equal to 4 when both an auto and a home claim. |
| PolID | Policy Identification Number |
모든 금액 단위는 유로로 표시됩니다. 자동차보험에서는 과실이 있는 청구만 고려합니다.
| gender | Age_client | year | age_of_car_M | Car_power_M | Car_2ndDriver_M | num_policiesC |
|---|---|---|---|---|---|---|
| 1 | 47 | 5 | 12 | 163 | 0 | 0 |
| 1 | 52 | 5 | 13 | 80 | 0 | 1 |
| 0 | 66 | 5 | 7 | 97 | 0 | 1 |
| 1 | 70 | 5 | 17 | 95 | 0 | 1 |
| 1 | 67 | 5 | 13 | 110 | 0 | 1 |
| metro_code | Policy_PaymentMethodA | Policy_PaymentMethodH | Insuredcapital_content_re | Insuredcapital_continent_re | appartment |
|---|---|---|---|---|---|
| 0 | 1 | 1 | 10 | 12 | 1 |
| 0 | 1 | 1 | 10 | 11 | 0 |
| 1 | 1 | 1 | 9 | 11 | 1 |
| 0 | 1 | 1 | 10 | 11 | 1 |
| 0 | 1 | 1 | 11 | 12 | 0 |
| Client_Seniority | Retention | NClaims1 | NClaims2 | Claims1 | Claims2 | Types | PolID |
|---|---|---|---|---|---|---|---|
| 7 | 1 | 0 | 0 | 0 | 0 | 1 | 12476 |
| 18 | 1 | 0 | 0 | 0 | 0 | 1 | 29232 |
| 15 | 1 | 0 | 0 | 0 | 0 | 1 | 23770 |
| 16 | 1 | 0 | 1 | 0 | 58 | 3 | 8228 |
| 6 | 1 | 0 | 0 | 0 | 0 | 1 | 37088 |
| gender | Age_client | year | age_of_car_M | Car_power_M | Car_2ndDriver_M | num_policiesC |
|---|---|---|---|---|---|---|
| 1 | 66 | 5 | 8 | 143 | 0 | 1 |
| 1 | 55 | 5 | 18 | 125 | 1 | 1 |
| 0 | 41 | 5 | 10 | 190 | 0 | 1 |
| 1 | 50 | 5 | 5 | 140 | 0 | 1 |
| 1 | 55 | 5 | 12 | 90 | 0 | 1 |
| metro_code | Policy_PaymentMethodA | Policy_PaymentMethodH | Insuredcapital_content_re | Insuredcapital_continent_re | appartment |
|---|---|---|---|---|---|
| 0 | 1 | 1 | 10 | 11 | 1 |
| 0 | 1 | 1 | 11 | 11 | 1 |
| 0 | 1 | 1 | 9 | 12 | 1 |
| 0 | 1 | 1 | 10 | 12 | 0 |
| 1 | 1 | 1 | 11 | 13 | 0 |
| Client_Seniority | Retention | NClaims1 | NClaims2 | Claims1 | Claims2 | Types | PolID |
|---|---|---|---|---|---|---|---|
| 20 | 1 | 0 | 0 | 0 | 0 | 1 | 2967 |
| 15 | 1 | 0 | 0 | 0 | 0 | 1 | 9387 |
| 6 | 1 | 0 | 0 | 0 | 0 | 1 | 36519 |
| 8 | 1 | 0 | 0 | 0 | 0 | 1 | 33276 |
| 6 | 1 | 0 | 0 | 0 | 0 | 1 | 25370 |
이 데이터는 개인 보험 고객 40,284명으로 이루어진 더 큰 데이터베이스에서 추출하였습니다. 이 고객들은 2010년부터 2014년까지 추적되었습니다. 일부 고객은 보험계약을 갱신하지 않으므로 5년 동안 표본에 남아 있지 않습니다. 축소 데이터에는 2014 보험연도만 사용했으며, 여기에서 고객 10,000명의 확률표본을 추출했습니다.
이 데이터셋에 관한 자세한 내용은 Frees et al. (2021)를 참조하십시오. 더 큰 데이터베이스는 122935개의 행을 포함하며 다음 주소에서 무료로 이용할 수 있습니다:
출처: Guillen, Montserrat; Bolancé, Catalina; Frees, Edward W.; Valdez, Emiliano A. (2021), “5년간 관찰한 주택 보험 및 자동차 보험 고객 데이터”, Mendeley Data, V1, DOI https://doi.org/10.17632/vfchtm5y7j.1
22.6 ‘R’ 패키지 CASdatasets
R 패키지 CASdatasets는 잘 알려진 여러 보험 데이터셋에 편리하게 접근할 수 있는 방법을 제공합니다. 이 패키지는 원래 Arthur Charpentier가 편집한 책 Computational Actuarial Science with R(Charpentier (2014))을 지원하기 위해 만들어졌습니다.
패키지를 설치하려면 다음 R 코드를 사용하십시오:
install.packages("CASdatasets", repos = "http://cas.uqam.ca/pub/",
type="source")
library(CASdatasets)
?CASdatasets
?sgautonb # See the documentation of the Singapore Auto Data
?lossalae # See the documentation of the Loss and Expense Data이 패키지는 xts, sp, zoo 등 몇 가지 다른 패키지가 이미 설치되어 있다고 가정한다는 점에 유의하십시오.
예를 들어,
22.7 기타 데이터 출처
이 밖에도 (계리 분야가 아닌) 데이터 출처가 많이 있습니다. 첫째, 1차 데이터를 수집하는 대학 소속 연구자들에게서 데이터를 얻을 수 있습니다. 둘째, 일반 연구 공동체에 2차 데이터를 공개할 목적으로 설립된 기관에서 데이터를 얻을 수 있습니다. 셋째, 데이터를 수집하는 국가 및 지역 통계 기관에서 데이터를 얻을 수 있습니다. 마지막으로, 기업은 연구 목적으로 얻을 수 있는 기업 데이터를 보유하고 있습니다.
특정 연구 문제를 다루거나 비즈니스 질문에 답하기 위한 데이터를 얻기는 어려울 수 있지만, 데이터 분석을 위한 모형이나 알고리즘을 검증할 데이터를 얻기는 비교적 쉽습니다. 오늘날에는 독자가 인터넷에서 데이터셋을 얻을 수 있습니다. 다음은 실제 데이터를 얻을 수 있는 몇몇 웹사이트 목록입니다.
- UCI 머신러닝 저장소(UCI Machine Learning Repository). 이 웹사이트(url: http://archive.ics.uci.edu/ml/index.php)는 머신러닝 알고리즘을 검증하는 데 사용할 수 있는 400개 이상의 데이터셋을 관리합니다.
- Kaggle. Kaggle 웹사이트(url: https://www.kaggle.com/)에는 데이터 과학 경진대회에 사용된 실제 데이터셋이 있습니다. 독자는 계정을 등록하면 Kaggle에서 데이터를 내려받을 수 있습니다.
- DrivenData. DrivenData는 데이터 과학의 최첨단 기법을 활용하여 세계에서 가장 큰 사회적 과제 몇 가지를 해결하는 것을 목표로 합니다. 이 웹사이트(url: https://www.drivendata.org/)에서 독자는 데이터 과학 경진대회에 참가하고 데이터셋을 내려받을 수 있습니다.
- Analytics Vidhya. 이 웹사이트(url: https://datahack.analyticsvidhya.com/contest/all/)에서는 연습 문제와 해커톤 문제에 참가하고 해당 데이터셋을 내려받을 수 있습니다.
- KDD Cup. KDD Cup은 ACM 지식 발견 및 데이터 마이닝 특별 관심 그룹(ACM Special Interest Group on Knowledge Discovery and Data Mining)이 주최하는 연례 데이터 마이닝 및 지식 발견 경진대회입니다. 이 웹사이트(url: http://www.kdd.org/kdd-cup)에는 1997년 이후 역대 KDD Cup 경진대회에서 사용된 데이터셋이 있습니다.
- 미국 정부 공공 데이터(U.S. Government’s open data). 이 웹사이트(url: https://www.data.gov/)에는 기후, 교육, 에너지, 금융 등 다양한 분야를 아우르는 약 200,000개의 데이터셋이 있습니다.
- AWS 공개 데이터셋(AWS Public Datasets). 이 웹사이트(url: https://aws.amazon.com/datasets/)에서 Amazon은 일부 대용량 데이터셋을 포함한 공개 데이터셋의 중앙 저장소를 제공합니다.