Skip to content

Survival analysis of marriages in the U.S. in R language.

License

Notifications You must be signed in to change notification settings

aleniart/survival_analysis_R

Repository files navigation

Survival Analysis - Marriage Dissolution in the U.S.

Project Overview

The objective of this project is to conduct a survival analysis on marriage dissolution in the U.S. The dataset comprises various factors related to couples and their marriages, with divorce being the primary event of interest. Key variables include:

  • Education of the Husband (heduc): Categorized into three groups: less than 12 years, 12 to 15 years, and 16 or more years.
  • Ethnicity of the Husband (heblack): Indicates whether the husband is black or not.
  • Mixed Ethnicity of the Couple (mixed): Indicates whether the couple has different ethnicities.
  • Years of Marriage (years): Duration of marriage until divorce or censoring.
  • Divorce Indicator (div): Coded as 1 for divorce and 0 for censoring (due to widowhood or interview).

The analysis will involve exploring the impact of these variables on the risk of divorce. Various statistical techniques such as: Kaplan-Meier estimators, Nelson-Aalen estimators, log-rank and Peto-Peto tests, and Cox proportional hazards models will be used to achieve these objectives. Additionally, data visualization techniques will be utilized to illustrate the survival curves and identify any outliers in the dataset.

Project Structure

The project directory contains the following files:

Instructions

To reproduce the analysis:

  1. Ensure you have R installed on your system.
  2. Clone this repository to your local machine.
  3. Open the survival_analysis_divorce.Rmd file in RStudio or any compatible IDE.
  4. Run the R code chunks in the file to perform the analysis.
  5. The output report (survival_analysis_divorce.html) can be generated by knit button.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

No releases published

Packages

No packages published

Languages