top of page
Search

LIFE EXPECTANCY ( SAS and R )

Writer's picture: Lila Guimarães ReisLila Guimarães Reis

Updated: Sep 5, 2021

OBJECTIVE

To analyze different attributes that influence life expectancy in countries


FINDINGS

The most important attributes across life expectancy are Schooling, Income composition of resources, Adult Mortality and HIV/AIDS.



METHODOLOGY

DATASET: Life Expectancy from Kaggle (Life Expectancy (WHO) | Kaggle)

Linear Regression to find the best variables

Data exploration using SAS



 

In 2015 the top 5 countries with high life expectancy are Slovenia ( Average 88 of years) , Denmark ( Average of 86 years old), Chile( Average of 85 years old), Cyprus( Average of 85 years old), and Japan ( Average of 83.7 years old)


The average for countries with low life expectancy is between 53 to 51 years old all these countries are on the African continent.


How it was build on SAS?




 

Linear Regression - Variables that best explain Life Expectancy


Best Model : 0.9562


RMSE - Residual Matrics : -0.1566515


On an avg what is the percentage error I got on every Life Expectancy prediction


train.rmse <- sqrt(mean((trainDf$residual)^2)) 
test.rmse <- sqrt(mean((testDf$residual)^2))
test.rmse - train.rmse 


Homoskadasticity


homoscedasticity means a situation in which the variance of the dependent variable is the same for all the data








 

CORRELATION ANALISES

Adult Mortality and HIV/AIDS have negative correlation

Income composition of resources and Schooling have positive correlation


 

MOST SIGNIFICANT VARIABLE ACROSS LIFE EXPECTANCY






  • Countries that use its income resources productively are more likely to have their citizens live longer









  • The number of years people spend learning in school could potentially increase their life expectancy








  • For every 1000 people in a developed country less than 100 people die compared to some countries that have lowest life expectancy rates where more than 600 people die for every 1000.









  • As the mortality rate increases from HIV/AIDS the life expectancy decreases.






Example of how it was built on SAS


 

CONCLUSION


• Some countries build a system to prevent the population from dying early while other countries don’t have enough resources to keep people alive in the long term.


•The longer the life expectancy the lower the mortality rate


Comparison countries with high Life Expectancy in 2015 how they were in 2019



Slovenia decreased 7 years

Denmark decreased 5 years

Chile decreased 5 years

Cyprus decreased 4 years

Japan increased 1 year




RECOMMENDATION


My recommendation and my desire is that we can live in a world where everyone is able to have a healthy, long and meaningful life.



Lila Reis

21 views0 comments

Recent Posts

See All

Comments


Post: Blog2 Post
bottom of page