GithubHelp home page GithubHelp logo

siminab / bias-estimating-life-expectancy-morquio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xueyin97/bias-estimating-life-expectancy-morquio

1.0 1.0 0.0 4.25 MB

Bias for estimating life expectancy from age at death: A simulation approach applied to Morquio Syndrome A

R 0.04% HTML 99.96%

bias-estimating-life-expectancy-morquio's Introduction

Understanding bias when estimating life expectancy from age at death: A simulation approach applied to Morquio Syndrome A

Life expectancy is accurate when we assess the life length of a cohort of individuals born in the same year and followed since their births to their deaths. Due to the difficulties and time consuming of following a cohort, we usually assess life expectancy based on death rates. However, this may cause bias since we neglect the possible changes in the environment or medical improvements that influence the length of life.To investigate whether there is bias when assessing life expectancy on death data, we simulate the survival data of individuals with Morquio syndrome A under four different scenarios. Under different scenarios, we calculate their means and medians of survival time of individuals deceased in the last 36 years and compare them with expected survival time at the end of the period.

Code directory

reproducing_analysis.Rmd and .html: Rmd file reproduces the analysis that looked at the changes in life expectancy of individuals with Morquio from Lavery and Hendriksz's paper-Mortality in Patients with Morquio Syndrome A. html file is the output of Rmd file.

weibull_distribution.R: functions that used in the following Rmd files.

figure1_weibull_distribution_plot.Rmd and .html: Rmd file generates the density of a Weibull distribution with mean and median of age at death based on the data. html file is the output of Rmd file.

figure2_real_means_medians.Rmd and .html: Rmd file displays the changes of real mean and median survival time for simulating in four different scenarios. html file is the output of the Rmd file.

figure3_boxplots_of_four_scenarios.Rmd and .html: Rmd file has four boxplots showing the average mean and median survival time of individuals deceased during the last 36 years and comparing them with the true mean and median values. html file is the output of the Rmd file.

Tabel1.rmd and .html: Rmd file displays the true mean and median survival, average estimated mean and median survival and naive mean and median survival across 1000 simulation runs, for each of the 4 scenarios. html file is the output of the Rmd file.

Tabel2.rmd and.html: Rmd file displays the Kaplan Meier median survival time across 1000 simulation runs, for each of the 4 scenarios. html file is the output of the Rmd file.

Data directory

M_Type_A_survival.csv: Deaths that occurred between 1975 and 2010 in the United Kingdom collected by the the Society for Mucopolysaccharide Disease in the United Kingdom. A total of 27 deaths were recorded, with the dataset being made fully available and including date of birth, gender, date of death, and primary cause of death.

Figure directory

Figures in this paper can be generated from the code directly.

Figure 1 shows the weibull distribution for first simulation scenario,generated by figure1_weibull_distribution_plot.Rmd.

Figure 2 displays the true mean and median for generating survival data under four different scenarios,generated by figure2_real_means_medians.Rmd.

Figure 3 shows the boxplots of average mean and median survival time under four different scenarios, generated by figure3_boxplots_of_four_scenarios.Rmd.

bias-estimating-life-expectancy-morquio's People

Contributors

siminab avatar xueyin97 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.