DATA Step, Macro, Functions and more

BASE SAS

Reply
Occasional Contributor hmc
Occasional Contributor
Posts: 5

BASE SAS

Hi Please help me in the below problem using SAS codes,

have attached the excel below.

The excel contains four sheets

Demo:  Demographic details of the customer
Policy  TypeSmiley Very Happyetails about the type of policy, age limits & duration limits for each insurance.
Claims: Details regarding claims made, claim date, settlement date, amount claimed and settled
Policy:  Details of each policy, sum assured, duration of policy & policy date,

I want to calculate:

Number of policies per person
 Number of joint policies per person
 Total sum assured
 Gender (in the data for variable gender if the 1st string is “m”, irrespective of being capital or small letter, it means “male”, otherwise “female”)
 Months on book (or number of months since a customer opened his/her 1st policy with the bank)
 Age of the customer
 Number of claims by a customer
 Create a flag for customer who has claimed and for customer who has not claimed till date.
 Flag taking the value 1 for a customer who has purchased a term insurance and 0 otherwise
 Total claims for each customer
 Flag taking value 1 for customer who will be ineligible to buy a term insurance after 5 years and value 0 otherwise
 Date of the policy expiring first, in the format like 12/31/2016
 Number of days since last claim made

 

Super User
Posts: 17,960

Re: BASE SAS

[ Edited ]

Homework or interview? Please make an attempt at your own work. We're more than happy to help but this is not a request for help.

 


hmc wrote:

Hi Please help me in the below problem using SAS codes,

have attached the excel below.

The excel contains four sheets

Demo:  Demographic details of the customer
Policy  TypeSmiley Very Happyetails about the type of policy, age limits & duration limits for each insurance.
Claims: Details regarding claims made, claim date, settlement date, amount claimed and settled
Policy:  Details of each policy, sum assured, duration of policy & policy date,

I want to calculate:

Number of policies per person
 Number of joint policies per person
 Total sum assured
 Gender (in the data for variable gender if the 1st string is “m”, irrespective of being capital or small letter, it means “male”, otherwise “female”)
 Months on book (or number of months since a customer opened his/her 1st policy with the bank)
 Age of the customer
 Number of claims by a customer
 Create a flag for customer who has claimed and for customer who has not claimed till date.
 Flag taking the value 1 for a customer who has purchased a term insurance and 0 otherwise
 Total claims for each customer
 Flag taking value 1 for customer who will be ineligible to buy a term insurance after 5 years and value 0 otherwise
 Date of the policy expiring first, in the format like 12/31/2016
 Number of days since last claim made

 


 

Ask a Question
Discussion stats
  • 1 reply
  • 164 views
  • 1 like
  • 2 in conversation