Giter Site home page Giter Site logo

divorce-rate-determinants's Introduction

What determines the divorce rate in Mexico?

๐Ÿ“š This is a first attempt to apply OLS model to determine the divorce rate in a country of choice

DATASET

The dataset was obtained from Mexico government official site and discribes overall 4900 divorces that were filed in Xalpa city. Becuase of many missing values, only 1479 were used in this analysis. Following variables were used:

  • Dependent variable: duration, which measures the marriage in years (y)
  • Independent variables: men's income (x_1), women's income (x_2), years of eduaction of men (x_3), years of education of women (x_4), number of children (x_5), number of children squared (x_6)

ANALYZING THE DATA

To analyse the data, the basic descriptive statistics were calculated. Interpreting the histogram plot led to an assumption that the dependent variable (lenght of marriage) is right-skewed. Shapiro-Wilk and Jacque-Bere tests confirmed, that the data doesn't have a normal distribution (p-value < -0.05). Therefore, the same procedure was repeated for independent variables. Each one of them was right-skewed.

Then, the corellation between values was measured using corellation matrix. Variable y (duration) had the highest positive correlation with x5 (children). The only variables with negative corellation to duration were edu_m and edu_w. Also education for both genders was negatively corellated with the number of children.

REGRESSION

The logarithmic transformation of variables inc_w and inc_w was applied, to eliminate the problem of non-linearity. Then, the least significant variables were eliminated from the model one by one. In the final model (model no. 4) the highest levels of education for men were left out, while the rest of variables proved significant.

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.