Intro

Background

When we are talking about relationship between man and woman,It could be marrige. Can you spot a good relationship? Of course nobody knows what really goes on between any couple. Good relationships don’t happen overnight. They take commitment, compromise, forgiveness and most of all — effort. but decades of scientific research into love, intimacy and relationships have taught us that a number of behaviors can predict when a couple is on solid ground or headed for troubled waters. The current era, in order to keep a good relationship become more challanging.

There are many areas of closeness that can enhance a marriage/relationship, help it to remain strong and help it to get back on track when it has become distant/difficult. Sometimes couples feel that things are not right between them, they wonder what is wrong and what they can do?

In Indonesia itself the rate of divorce is increasing almost everyyear. Data from Badan Pusat Statistik shows us that since 2012 the rate of divorce reached up to more than 340,000 of people and was continue increasing until reached at 360,000 on 2016. Unfortunately i didnt get the data for 2017-2019. In the oher hand the rate of marrigae showing quite interesting story. Since 2017-2011 the rate of marrige seems to increased but lately it has decresed since 2011 until 2016.

Please find the data and graph regarding the rate of divorce and the rate of marriage at below :

  • The Rate of Divorce

Data taken from BPS RI https://www.bps.go.id/linkTableDinamis/view/id/893

#>     Type Tahun Jumlah
#> 1  Cerai  2007 175713
#> 2  Cerai  2008 193189
#> 3  Cerai  2009 223371
#> 4  Cerai  2010 285184
#> 5  Cerai  2011 276791
#> 6  Cerai  2012 346480
#> 7  Cerai  2013 324247
#> 8  Cerai  2014 344237
#> 9  Cerai  2015 347256
#> 10 Cerai  2016 365633

Interpretations: Divorce rate in Indonesia is increasing year by year. The last update from BPS Indonesia, in 2016 there are 365,633 people who divorced in total.

  • The Rate of Marriage

Data taken from BPS RI https://www.bps.go.id/linkTableDinamis/view/id/893

#>     Type Tahun  Jumlah
#> 1  Nikah  2007 1944569
#> 2  Nikah  2008 2195037
#> 3  Nikah  2009 2162115
#> 4  Nikah  2010 2207224
#> 5  Nikah  2011 2319821
#> 6  Nikah  2012 2289648
#> 7  Nikah  2013 2210046
#> 8  Nikah  2014 2110776
#> 9  Nikah  2015 1958394
#> 10 Nikah  2016 1837185

Content

This Dataset is taken from external source https://archive.ics.uci.edu/ml/datasets/Divorce+Predictors+data+set.

Divorce Predictors dataset is consist of 54 questionnaire which carried out by using the Divorce Predictors Scale (DPS) on the basis of Gottman couples therapy. Questionnaire was taken place in Turkey. The participants consist of 84 (49%) were divorced and 86 (51%) were married couples.

Other Notes are :
a)The ages of the participants ranged from 20 to 63 (X̄= 36.04, SD = 9.34)
b)The participants, 74 (43.5%) were married for love, and 96 (56.5%) were married in an arranged marriage
c)127 (74.7%) of the participants had children, 43 (25.3%) had no children
d)18 (10.58%) of the participants were primary school graduate, 15 (8.8%) were secondary school graduate, 33 (19.41%) were high school graduate, 88 (51.76%) were college graduate, and 15 (8.8%) had master’s degree
e) Monthly income are 34 (20%) individuals had under 2000 TL, 54 (31.76%) had between 2001-3000 TL, 28 (16.47%) had between 3001-4000 TL and 54 (31.76%) individuals had a monthly income over 4000 TL

The ist of Questionnaire:
1.When one of us apologizes when our discussions go bad, the issue does not extend.
2.I know we can ignore our differences, even if things get hard sometimes.
3.When we need to, we can take our discussions from the beginning and correct it.
4.When I argue with my spouse, it will eventually work for me to contact him.
5.The time I spent with my spouse is special for us.
6.We don’t have time at home as partners.
7.We are like two strangers who share the same environment at home rather than family.
8.I enjoy our holidays with my spouse.
9.I enjoy traveling with my spouse.
10.My spouse and most of our goals are common.
11.I think that some day, my spouse and I will bee in harmony with each other.
12.My spouse and I have similar values regarding personal freedom.
13.My spouse and I have similar entertainment.
14.Most of our goals in regards to people (children, friends, etc.) are the same.
15.My dreams of living are similar and harmonious with those of my spouse.
16.I’m compatible with my spouse about what love should be.
17.I share the same views with my spouse about being happy.
18.My spouse and I have similar ideas about how marriage should be.
19.My spouse and I have similar ideas about how roles should be in marriage.
20.My spouse and I have similar values regarding trust.
21.I know exactly what my spouse likes.
22.I know how my spouse wants to be taken care of when she’s sick.
23.I know my spouse’s favorite food.
24.I can tell you what kind of stress my spouse is having in life.
25.I have knowledge of my spouse’s inner world.
26.I know my spouse’s basic concerns.
27.I know what my spouse’s current sources of stress are.
28.I know my spouse’s hopes and wishes.
29.I know my spouse very well.
30.I know my spouse’s friends and their social relationships.
31.I feel aggressive when I argue with my spouse.
32.When discussing with my spouse, I usually use expressions such as X, Y, Z.
33.I can use negative statements about my spouse’s personality during our discussions.
34.I can use offensive expressions during our discussions.
35.I can insult our discussions.
36.I can be humiliating when we argue.
37.My argument with my spouse is not calm.
38.I hate my spouse’s way of bringing it up.
39.Fights often occur suddenly.
40.We’re just starting a fight before I know what’s going on.
41.When I talk to my spouse about something, my calm suddenly breaks.
42.When I argue with my spouse, it only snaps in and I don’t say a word.
43.I’m mostly willing to calm the environment a little bit.
44.Sometimes I think it’s good for me to leave home for a while.
45.I’d rather stay silent than argue with my spouse.
46.Even if I’m right in the argument, I’m willing not to upset the other side.
47.When I argue with my spouse, I remain silent because I am afraid of not being able to control my anger.
48.I feel right in our discussions.
49.I have nothing to do with what I’ve been accused of.
50.I’m not actually the one who’s guilty of what I’m accused of.
51.I’m not the one who’s wrong about problems at home.
52.I wouldn’t hesitate to tell her about my spouse’s inadequacy.
53.I remind my spouse of her inadequacies during our discussion.
54.I’m not afraid to tell her about my spouse’s incompetence.

Target Variable –> Class, 0-Not Divorce ; 1-Potential Divorce

Poblem to be Solved

Predicting potential divorce before it happened by doing divorce predictor scale. Hopefully it will help a couple who want to fix their relationship and put the corective action corectly and precisely by using the most influential predictors from Divorce predictors scale. This divorce prediction scale was working succesfully in turkey around karadeniz(near black sea) area.

In indonesia it self the number of divorce is increasing year by year. so hopefully this predictors will help a couple which inside crisis condition in their relationship to be able to detect the most critical problem and working on it, or them which not in a crisis to maintain the relationship.

Read Data

#>   Atr1 Atr2 Atr3 Atr4 Atr5 Atr6 Atr7 Atr8 Atr9 Atr10 Atr11 Atr12 Atr13
#> 1    2    2    4    1    0    0    0    0    0     0     1     0     1
#>   Atr14 Atr15 Atr16 Atr17 Atr18 Atr19 Atr20 Atr21 Atr22 Atr23 Atr24 Atr25
#> 1     1     0     1     0     0     0     1     0     0     0     0     0
#>   Atr26 Atr27 Atr28 Atr29 Atr30 Atr31 Atr32 Atr33 Atr34 Atr35 Atr36 Atr37
#> 1     0     0     0     0     1     1     2     1     2     0     1     2
#>   Atr38 Atr39 Atr40 Atr41 Atr42 Atr43 Atr44 Atr45 Atr46 Atr47 Atr48 Atr49
#> 1     1     3     3     2     1     1     2     3     2     1     3     3
#>   Atr50 Atr51 Atr52 Atr53 Atr54 Class
#> 1     3     2     3     2     1     1
#>  [ reached 'max' / getOption("max.print") -- omitted 169 rows ]

This data contains 170 rows and 55 columns. Last column (Class) is our target variable , and others columns are the questionnaire’s questions.

*Change ‘Class’ column become as.factor type then rename 1:‘Potential Divorce’ and 0:‘Not Divorce’

*Lets check again

#>   Atr1 Atr2 Atr3 Atr4 Atr5 Atr6 Atr7 Atr8 Atr9 Atr10 Atr11 Atr12 Atr13
#> 1    2    2    4    1    0    0    0    0    0     0     1     0     1
#>   Atr14 Atr15 Atr16 Atr17 Atr18 Atr19 Atr20 Atr21 Atr22 Atr23 Atr24 Atr25
#> 1     1     0     1     0     0     0     1     0     0     0     0     0
#>   Atr26 Atr27 Atr28 Atr29 Atr30 Atr31 Atr32 Atr33 Atr34 Atr35 Atr36 Atr37
#> 1     0     0     0     0     1     1     2     1     2     0     1     2
#>   Atr38 Atr39 Atr40 Atr41 Atr42 Atr43 Atr44 Atr45 Atr46 Atr47 Atr48 Atr49
#> 1     1     3     3     2     1     1     2     3     2     1     3     3
#>   Atr50 Atr51 Atr52 Atr53 Atr54             Class
#> 1     3     2     3     2     1 Potential_Divorce
#>  [ reached 'max' / getOption("max.print") -- omitted 5 rows ]

Exploratory Data

*Check Proportion of Target Variable

#> 
#>       Not_Divorce Potential_Divorce 
#>          50.58824          49.41176

Not divorce class(0) is higher than potential divorce class(1).

Lets check potential significant columns by mean to get columns which have more influence for this case.

#> # A tibble: 2 x 55
#>   Class  Atr1  Atr2  Atr3  Atr4  Atr5  Atr6   Atr7  Atr8   Atr9 Atr10 Atr11
#>   <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl> <dbl>  <dbl> <dbl> <dbl>
#> 1 Not_~ 0.395 0.465 0.640 0.267 0.105 0.372 0.0116 0.128 0.0581 0.407 0.198
#> 2 Pote~ 3.19  2.87  2.92  2.73  3.01  1.13  0.988  2.81  2.89   2.77  3.21 
#> # ... with 43 more variables: Atr12 <dbl>, Atr13 <dbl>, Atr14 <dbl>,
#> #   Atr15 <dbl>, Atr16 <dbl>, Atr17 <dbl>, Atr18 <dbl>, Atr19 <dbl>,
#> #   Atr20 <dbl>, Atr21 <dbl>, Atr22 <dbl>, Atr23 <dbl>, Atr24 <dbl>,
#> #   Atr25 <dbl>, Atr26 <dbl>, Atr27 <dbl>, Atr28 <dbl>, Atr29 <dbl>,
#> #   Atr30 <dbl>, Atr31 <dbl>, Atr32 <dbl>, Atr33 <dbl>, Atr34 <dbl>,
#> #   Atr35 <dbl>, Atr36 <dbl>, Atr37 <dbl>, Atr38 <dbl>, Atr39 <dbl>,
#> #   Atr40 <dbl>, Atr41 <dbl>, Atr42 <dbl>, Atr43 <dbl>, Atr44 <dbl>,
#> #   Atr45 <dbl>, Atr46 <dbl>, Atr47 <dbl>, Atr48 <dbl>, Atr49 <dbl>,
#> #   Atr50 <dbl>, Atr51 <dbl>, Atr52 <dbl>, Atr53 <dbl>, Atr54 <dbl>
#>       Atr1     Atr2     Atr3     Atr4     Atr5      Atr6      Atr7
#> 1 2.795127 2.403931 2.277132 2.458749 2.907254 0.7588594 0.9764673
#>       Atr8     Atr9    Atr10    Atr11    Atr12    Atr13    Atr14    Atr15
#> 1 2.681617 2.834718 2.366833 3.016611 2.545127 2.490587 2.590255 2.707918
#>      Atr16    Atr17    Atr18    Atr19    Atr20    Atr21    Atr22    Atr23
#> 1 2.658638 2.992248 2.883167 3.039037 2.811185 2.503599 2.382614 2.692414
#>      Atr24    Atr25    Atr26    Atr27    Atr28    Atr29    Atr30    Atr31
#> 1 2.518272 2.615172 2.611849 2.527409 2.478128 2.835548 2.623754 2.603267
#>      Atr32    Atr33   Atr34    Atr35    Atr36    Atr37    Atr38   Atr39
#> 1 2.684109 3.066445 2.71567 3.169158 3.179402 2.955426 3.055925 3.07309
#>      Atr40    Atr41    Atr42    Atr43    Atr44    Atr45    Atr46    Atr47
#> 1 3.362126 3.070875 2.321705 1.522702 2.846069 1.634551 1.213178 2.077243
#>      Atr48    Atr49    Atr50    Atr51    Atr52    Atr53    Atr54
#> 1 1.405869 2.232835 2.116279 1.740864 1.918328 2.135382 2.683001

from here, we got that colums which have high diference by mean are Atr11 –> I think that some day, my spouse and I will bee in harmony with each other (3.01)
Atr19 –> My spouse and I have similar ideas about how roles should be in marriage (3.03)
Atr33 –> I can use negative statements about my spouse’s personality during our discussions(3,06)
Atr35 –> I can insult our discussions(3.16)
Atr36 –> I can be humiliating when we argue(3.17)
Atr38 –> I hate my spouse’s way of bringing it up (3.05)
Atr39 –> Fights often occur suddenly(3.07)
Atr40 –> We’re just starting a fight before I know what’s going on(3.3)
Atr41 –> When I talk to my spouse about something, my calm suddenly breaks(3.07)
The top 3 are : Atr35, Atr36, Atr40

Visualization

Create graph using original data which showing the distribution of ‘Not_Divorce’ and ‘Potential_Divorce’ towards the statement which represent a question of the questionnaire. First part will showing distribution plot by density plot showing all parameters being used and another part is distribution graph by violin plot and density plot which only using 9 parameters above (has high difference by mean).

Density Plot - Using All Parameters

In this part, We will use density plot to see all parameters distribution. First of all, combine all information using function ‘gather()’

Visualizaton - 9 Parameters

From above we got some columns which have significant difference by mean. There are : Atr11, Atr19, Atr33, Atr35, Atr36, Atr38, Atr39, Atr40,Atr41. The top 3 higest are:
Atr35 –> I can insult our discussions
Atr36 –> I can be humiliating when we argue
Atr40 –> We’re just starting a fight before I know what’s going on
Plot all those columns using Density Plot

  • Atr40: We’re just starting a fight before I know what’s going on

Atr40 Violin Plot

Atr40 Density Plot

Interpretation: People who classified into ‘Not_married’ class is tend to choose strongly disagree with the statement (Starting a fight before know whats going on) but on the other hand people who are classified into ‘Potential_Divorce’ mostly choose strongly agree with the statement. Atr40 is categorize into negative conflict behaviors group.

*Atr36: I can be humiliating when we argue

Atr36 Violin Plot

Atr36 Density Plot

Interpretation: This graph is telling us that all people who ara in ‘Not_Divorce’ condition is strongly disagree with the statement, noone choose in the middle. The opposite, people who are in ‘Potential_Divorce’ class have more flexible answer. Atr36 is categorize into negative conflict behaviors group.

*Atr35: I can insult our discussions

Atr35 Violin Plot

Atr35 Density Plot

Interpretation: Atr35 is a strong statement and categorize into negative conflict behaviors group. This result is telling us that people who are classified into ‘Not_Divorce’ class mostly disagree for the statement (I can insult our discussion) contrarily people who are classified into ‘Potential_Divorce’ are more flexible with the answer but most of them are answered strongly agree with the statement (I can insult our discussion)

*Atr 39: Fights often occur suddenly

Atr39 Violin Plot

Atr39 Density Plot

Interpretation: Atr39 is categorize into negative conflict behaviors group. The graph showing us that mostly people who are in ‘Potential_Divorce’ class are strongly agree with the statement (Fights often occur suddenly) and people who in ‘Not_Divorce’ class mostly strongly disagree with the statement(Fights often occur suddenly).

*Atr41: When I talk to my spouse about something, my calm suddenly breaks

Atr41 Violin Plot

Atr41 Density Plot

Interpretation: Within this grap wwe may know that people who classified into ‘Potential_Divorce’ mostly choose strongly agree with the statement and people who classified into ‘Not_Divorce’ class mostly choose strongly disagree with the statement. The graph also showing us that both of the class (not divorce and potential divorce) have different tendency of how to be act to behave to their spouse. Atr41 is categorize into negative conflict behaviors group.

*Atr33: I can use negative statements about my spouse’s personality during our discussions

Atr33 Violin Plot

Atr33 Density Plot

Interpretation: This graph is showing us there’s a big difference between ‘Potential_Divorce’ and ‘Not_Divorce’ class. Both of them are having different answer which make us easily to separate the action. ‘Not_Divorce’ class people are strongly disagree with the statement but mostly people at ‘Potential_Divorce’ class is tend to choose strongly agree with the statement (Using negative statement during discussion). This statement is categorize into negative conflict behaviors group.

*Atr38: I hate my spouse’s way of bringing it up

Atr38 Violin Plot

Atr38 Density Plot

Interpretation: From this graph we may conclude that most of people at ‘Not_Divorce’ class are strongly disagree with the statement and most of people in ‘Potential_Divorce’ class are choosing strongly agree with the statement (I hate my spoouse’s way of bringing it up). Atr38 is categorized at negative conflict behavior group.

  • Atr19: My spouse and I have similar ideas about how roles should be in marriage

Atr19 Violin Plot

Atr19 Density Plot

Interpretation: Atr19 is categorize into common meaning and failed to attempts to repair group. The result shows us that people who are in a ‘Not_Divorce’ class mostly choose not agree with a statement which saying similiar idea about how roles should be in married and some people who are in a ‘Potential_Divorce’ class mostly have tendency to agree with the statement. Suprisingly!

  • Atr11: I think that one day in the future, when I look back, I see that my wife and I are in harmony with each other.

Atr11 Violin Plot

Atr11 Density Plot

Interpretation : Atr11 is categorize into love map group. Suprisingly, dataset shows us that people who are strongly agree with the statement “Some day my spouse and I will bee in harmony with each other” are puted into ‘Potential_Divorce’ condition in their relationship and people who are into ‘Not_Divorce’ class are strongly disagree with the statement.