-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspeed-dating.Rmd
1280 lines (928 loc) · 47.3 KB
/
speed-dating.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: "Dating Compatibility and Chemistry: Analysis on a Speed-Dating Experiment"
author: "Utsab Shrestha"
date: "November 23,2016"
output: html_document
knit: (function(input_file, encoding) {
out_dir <- 'docs';
rmarkdown::render(input_file,
encoding=encoding,
output_file=file.path(dirname(input_file), out_dir, 'index.html'))})
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,warning = FALSE,message = FALSE, fig.align="center")
setwd("~/Github Project R/speed-dating")
library(fmsb)
library(dplyr)
library(tibble)
library(stringr)
library(ggplot2)
library(grid)
library(gridBase)
library(scales)
```
---
![](images/dating.png)
###Introduction
<i>What makes people attractive? What is a single person looking in a potential partner? What gets people a second date?</i>
####Background
With the advancement in science and technology, the world has changed drastically in last few decades, and so has the dating world. Studies show that dating is more popular than it used to be and it does make sense because the world population is growing at an alarming rate. However, there are various other factors to why dating has become popular than ever these days. People have more choices which makes them believe that they are going to get a better partner. Additionally, dating has become more accessible because of the advancement of technology that has made virtual or online dating possible. As a result, many people have turned to speed dating as a solution to meet and interact with a large number of potential partners in a short amount of time.
In this report, we want to explore what people are looking for in their speed dating matches, what it takes to become successful in getting approvals from a potential partener and what incluences peoples' decisions. In general, what men are looking for in women? What features make men more desirable to women? Are people of same profession compatible or do opposites attract? These are some of the questions that I find interesting and I try to answer them through this data analysis project.
####The Data
The data for this project was obtained from the Kaggle website. It was compiled by professors Ray Fisman and Sheena Iyengar from Columbia Business School, originally used for their paper "Gender Differences in Mate Selection: Evidence From a Speed Dating Experiment." It was generated from a series of experimental speed dating events from 2002 to 2004 and includes data related to demographics, dating habits, lifestyle information, an attribute evaluation questionnaire taken when the participants sign up, and each participant's ratings for others during the 4 minute interactions. Finally, individuals were asked if they would like a second date with their partners and rated again on similar questions after the event, when matches have met with each other and dated for several times. Even though the data is more than a decade old, this data should still provide us with some interesting insights to human behavior when it comes to dating.
Some important data keys that represented each individual in the dates were: IID, ID, Gender, PID, Match, etc. which are described in the data dictionary. We also have information on fields of study, career choice, goals, preferences, interested activities that will help create a profile for each individual and then finally the ratings of their dates that is going to drive our analysis.
####Changes to the Data
In several analyses, the participants were given different instructions. For example, in most of the events, participants were given 100 points to distribute to the 6 attributes to show their priority. Some groups, however, were asked to rank the importance of the attributes on a 1-10 scale. Additionally, some participants' scores do not add up to 100. In both cases, the data has been scaled to form a 0-100 distribution like all other participants. There were several people who did not fill out all the information, for instance, 63 people did not fill out fields or 89 people did not fill out careers. Fields were extracted from the field codes. Similarly, there were lots of features that had values missing which had to be removed for proper analysis.
---
###What Are Participants Looking For in Their Matches
First, we'd like to see what do the participants in these speed dating events look for in the opposite sex, and if there exist a difference for male and female participants. At this point in time, the participants have just signed up for the event and have not met anyone.
```{r, load data, clean, include = FALSE}
#James Section
#loading data and cleaning
rawdat <-
read.csv('Speed Dating Data.csv', header = T, stringsAsFactors = F)
#remove variables that will not be used in analysis
dat <-
rawdat %>%
select(-id, -idg, -condtn, -round, -position, -positin1, -order, -partner, -tuition, -undergra, -mn_sat)
```
```{r, data clean, include = FALSE}
#Ratings by other ppl
at00 <-
dat %>%
select(iid, pid, dec, gender, attr, sinc, intel, fun, amb, shar, like, prob) %>%
filter(!pid == "NA")
#drop rows where all attributes were rated NA (col 4-9)
#Since in the instructions it clearly outlined that not attributes will be discussed during
#the couple's meetings, we cannot do a full NA drop in the data. The workaround here is we will assign all NA values to 1000, and drop the rows if all the attributes add up to 6000. Rows with 1 or 2 NAs will add up to be less than 6000 and will not be dropped. Finally the rows with 1000 will be converted back to NA.
at00[is.na(at00)] <- 1000
at00$total <- rowSums(at00[,c("attr", "sinc", "intel", "fun", "amb", "shar")])
at00 <-
at00 %>%
filter(!total == "6000")
at00[at00 == "1000"] <- NA
at00$total <- rowSums(at00[,c("attr", "sinc", "intel", "fun", "amb", "shar")], na.rm=TRUE)
table(at00$total)
#A total of 0 means all entries are 0, which constitutes missing data and row is dropped
at00 <-
at00 %>%
filter(!total == "0")
#Finally, it is important to realize that the attributes are evaluated for the opposite gender.
#Another column for the partner is generated
at00 <-
at00 %>%
mutate(pgender = ifelse(gender == 0, 1, 0))
```
```{r, Data Clean 2, include = FALSE}
#What are you looking for in your match?
#First, data is checked for consistency since some of the participants will place the ranks differently than others (on a 1-10 scale compared to using a distribution of 100 points).
#take related attributes with iid and gender into new data frame
at11<-
dat %>%
group_by(gender) %>%
select(iid, gender, attr1_1, sinc1_1, intel1_1, fun1_1, amb1_1, shar1_1) %>%
unique()
#Next, we would like to turn all NA into 0, but before this, we check if any entries in iid or gender is NA to prevent mislabels
sum(is.na(at11$iid))
sum(is.na(at11$gender))
#Apply command to chnage all NA to 0
at11[is.na(at11)] <- 0
#Add column to check if total of attributions add up to 100
at11$total <- rowSums(at11[,c("attr1_1", "sinc1_1", "intel1_1", "fun1_1", "amb1_1", "shar1_1")])
table(at11$total)
#A total of 0 means all entries are missing and row is dropped
at11<-
at11 %>%
filter(!total == "0")
#As there are entry errors in the data, all points are redistributed and curved to fit 100 total points
at11$attr1_1 <- round(at11$attr1_1/at11$total*100, digits = 2)
at11$sinc1_1 <- round(at11$sinc1_1/at11$total*100, digits = 2)
at11$intel1_1 <- round(at11$intel1_1/at11$total*100, digits = 2)
at11$fun1_1 <- round(at11$fun1_1/at11$total*100, digits = 2)
at11$amb1_1 <- round(at11$amb1_1/at11$total*100, digits = 2)
at11$shar1_1 <- round(at11$shar1_1/at11$total*100, digits = 2)
at11$total <- rowSums(at11[,c("attr1_1", "sinc1_1", "intel1_1", "fun1_1", "amb1_1", "shar1_1")])
at11$total <- round(at11$total, digits = 0)
table(at11$total)
```
```{r, what ppl look for, echo = FALSE}
#Next, data is visualized using a radar chart
test1 <-
at11 %>%
group_by(gender) %>%
summarise(Attractive = mean(attr1_1), Sincere = mean(sinc1_1), Intelligent = mean(intel1_1), Fun = mean(fun1_1), Ambitious = mean(amb1_1), Interest = mean(shar1_1))
test1forplot <-
test1 %>%
select(-gender)
maxmin <- data.frame(
Attractive = c(36, 0),
Sincere = c(36, 0),
Intelligent = c(36, 0),
Fun = c(36, 0),
Ambitious = c(36, 0),
Interest = c(36, 0))
test11 <- rbind(maxmin, test1forplot)
test11male <- test11[c(1,2,4),]
test11female <- test11[c(1,2,3),]
radarchart(test11,
pty = 32,
axistype = 0,
pcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
pfcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
plty = 1,
plwd = 3,
cglty = 1,
cglcol = "gray88",
centerzero = TRUE,
seg = 5,
vlcex = 0.75,
palcex = 0.75)
legend("topleft",
c("Male", "Female"),
fill = c(adjustcolor("cadetblue2", 0.5), adjustcolor("hotpink1", 0.5)))
```
We can see that there is a great difference between what male and female participants are looking for.
- For male participants, the attractiveness of the female is given a lot more weight, and the ambitiousness or if they have any shared interset are ranked not as high.
- For females, the points are more evenly distributed across all of the attributes, with intelligence ranked slightly higher compared to others.
####Conlusion
Men are looking for attractive women, and are less concerned with a woman's abmition and shared interests. On the other hand, women are looking for a well-rounded male and value intelligence in a man.
---
###What Paricipants Think Their Same-sex Peers Are Looking For
Next, we want to explore what people think men/women of their same sex is looking for, learn how the participants view their competitors, and determine if they separate their own views from the majority.
```{r, Data Clean 3, include = FALSE}
#same data cleaning
#take related attributes with iid and gender into new data frame
at41<-
dat %>%
group_by(gender) %>%
select(iid, gender, attr4_1, sinc4_1, intel4_1, fun4_1, amb4_1, shar4_1) %>%
unique()
#Next, we would like to turn all NA into 0, but before this, we check if any entries in iid or gender is NA to prevent mislabels
sum(is.na(at41$iid))
sum(is.na(at41$gender))
#Apply command to chnage all NA to 0
at41[is.na(at41)] <- 0
#Add column to check if total of attributions add up to 100
at41$total <- rowSums(at41[,c("attr4_1", "sinc4_1", "intel4_1", "fun4_1", "amb4_1", "shar4_1")])
table(at41$total)
#A total of 0 means all entries are missing and row is dropped
at41<-
at41 %>%
filter(!total == "0")
#As there are entry errors in the data, all points are redistributed and curved to fit 100 total points
at41$attr4_1 <- round(at41$attr4_1/at41$total*100, digits = 2)
at41$sinc4_1 <- round(at41$sinc4_1/at41$total*100, digits = 2)
at41$intel4_1 <- round(at41$intel4_1/at41$total*100, digits = 2)
at41$fun4_1 <- round(at41$fun4_1/at41$total*100, digits = 2)
at41$amb4_1 <- round(at41$amb4_1/at41$total*100, digits = 2)
at41$shar4_1 <- round(at41$shar4_1/at41$total*100, digits = 2)
at41$total <- rowSums(at41[,c("attr4_1", "sinc4_1", "intel4_1", "fun4_1", "amb4_1", "shar4_1")])
at41$total <- round(at41$total, digits = 0)
table(at41$total)
```
```{r, what ppl think same gender look for, echo = FALSE}
#Next, data is visualized using a radar chart, what do you think most of your fellow men/women are looking for
test4 <-
at41 %>%
group_by(gender) %>%
summarise(Attractive = mean(attr4_1), Sincere = mean(sinc4_1), Intelligent = mean(intel4_1), Fun = mean(fun4_1), Ambitious = mean(amb4_1), Interest = mean(shar4_1))
test4forplot <-
test4 %>%
select(-gender)
test41 <- rbind(maxmin, test4forplot)
radarchart(test41,
pty = 32,
axistype = 0,
pcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
pfcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
plty = 1,
plwd = 3,
cglty = 1,
cglcol = "gray88",
centerzero = TRUE,
seg = 5,
vlcex = 0.75,
palcex = 0.75)
legend("topleft",
c("Male", "Female"),
fill = c(adjustcolor("cadetblue2", 0.5), adjustcolor("hotpink1", 0.5)))
```
As we can see in the graph, both men and women think people of their same gender are most concerned with finding an attractive partner.
- Similar to the previous analysis, men think their fellow mates highly value attractiveness and are less concerned with a woman's ambition.
- In contrast, there exist a significant difference in women's answers in comparison to the presvious analysis. Women say that they themselves are looking for a well rounded man and attractiveness is not necessarily important. However, they think that other women are mainly looking for attractive and ambitious men.
####Conlusion
Both men and women think that their competitors are looking for attractive counterparts, and what women say they are looking for is drastically different from what other women think their peers value.
---
###What Do Participants Think the Opposite Sex is Looking For
Finally, we analyze what participants think their opposite sex is looking for. We will able to see if there are any difference in the expectations of men and women with regards to the speed dating event.
```{r, Data Clean, include = FALSE}
#take related attributes with iid and gender into new data frame
at21<-
dat %>%
group_by(gender) %>%
select(iid, gender, attr2_1, sinc2_1, intel2_1, fun2_1, amb2_1, shar2_1) %>%
unique()
#Next, we would like to turn all NA into 0, but before this, we check if any entries in iid or gender is NA to prevent mislabels
sum(is.na(at21$iid))
sum(is.na(at21$gender))
#Apply command to chnage all NA to 0
at21[is.na(at21)] <- 0
#Add column to check if total of attributions add up to 100
at21$total <- rowSums(at21[,c("attr2_1", "sinc2_1", "intel2_1", "fun2_1", "amb2_1", "shar2_1")])
table(at21$total)
#A total of 0 means all entries are missing and row is dropped
at21<-
at21 %>%
filter(!total == "0")
#As there are entry errors in the data, all points are redistributed and curved to fit 100 total points
at21$attr2_1 <- round(at21$attr2_1/at21$total*100, digits = 2)
at21$sinc2_1 <- round(at21$sinc2_1/at21$total*100, digits = 2)
at21$intel2_1 <- round(at21$intel2_1/at21$total*100, digits = 2)
at21$fun2_1 <- round(at21$fun2_1/at21$total*100, digits = 2)
at21$amb2_1 <- round(at21$amb2_1/at21$total*100, digits = 2)
at21$shar2_1 <- round(at21$shar2_1/at21$total*100, digits = 2)
at21$total <- rowSums(at21[,c("attr2_1", "sinc2_1", "intel2_1", "fun2_1", "amb2_1", "shar2_1")])
at21$total <- round(at21$total, digits = 0)
table(at21$total)
```
```{r, what do ppl think opposite sex look for, echo = FALSE}
#Next, data is visualized using a radar chart, what do you think most of your fellow men/women are looking for
test2 <-
at21 %>%
group_by(gender) %>%
summarise(Attractive = mean(attr2_1), Sincere = mean(sinc2_1), Intelligent = mean(intel2_1), Fun = mean(fun2_1), Ambitious = mean(amb2_1), Interest = mean(shar2_1))
test2forplot <-
test2 %>%
select(-gender)
test21 <- rbind(maxmin, test2forplot)
radarchart(test21,
pty = 32,
axistype = 0,
pcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
pfcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
plty = 1,
plwd = 3,
cglty = 1,
cglcol = "gray88",
centerzero = TRUE,
seg = 5,
vlcex = 0.75,
palcex = 0.75)
legend("topleft",
c("Male", "Female"),
fill = c(adjustcolor("cadetblue2", 0.5), adjustcolor("hotpink1", 0.5)))
```
```{r, Compiled graphing, distribution, not shown, include = FALSE}
vp1 <- viewport(x = 0, y = 0.5, width = 0.5, height = 0.5, just = c("left", "bottom"))
vp2 <- viewport(x = 0.5, y = 0.5, width = 0.5, height = 0.5, just = c("left", "bottom"))
vp3 <- viewport(x = 0, y = 0, width = 0.5, height = 0.5, just = c("left", "bottom"))
vp4 <- viewport(x = 0.5, y = 0, width = 0.5, height = 0.5, just = c("left", "bottom"))
plot.new()
pushViewport(vp1)
par(new=TRUE,
fig=gridFIG(),
mar=c(0.01, 0.01, 0.01, 0.01))
radarchart(test11,
pty = 32,
axistype = 0,
pcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
pfcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
plty = 1,
plwd = 3,
cglty = 1,
cglcol = "gray88",
centerzero = TRUE,
seg = 5,
vlcex = 0.75,
palcex = 0.75)
grid.text("(a)", x=0.1, y=0.9)
popViewport()
pushViewport(vp2)
par(new=TRUE,
fig=gridFIG(),
mar=c(0.01, 0.01, 0.01, 0.01))
radarchart(test41,
pty = 32,
axistype = 0,
pcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
pfcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
plty = 1,
plwd = 3,
cglty = 1,
cglcol = "gray88",
centerzero = TRUE,
seg = 5,
vlcex = 0.75,
palcex = 0.75)
grid.text("(b)", x=0.1, y=0.9)
popViewport()
pushViewport(vp3)
par(new=TRUE,
fig=gridFIG(),
mar=c(0.01, 0.01, 0.01, 0.01))
radarchart(test21,
pty = 32,
axistype = 0,
pcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
pfcol = c(adjustcolor("hotpink1", 0.5), adjustcolor("cadetblue2", 0.5)),
plty = 1,
plwd = 3,
cglty = 1,
cglcol = "gray88",
centerzero = TRUE,
seg = 5,
vlcex = 0.75,
palcex = 0.75)
grid.text("(c)", x=0.1, y=0.9)
popViewport()
pushViewport(vp4)
grid.text("(a) What attributes are people looking for",
x = 0.1,
y = 0.5,
gp = gpar(fontsize = 10),
just = c("left", "bottom"))
grid.text("(b) What do people think their fellow
men/women are looking for",
x=0.1,
y=0.27,
gp = gpar(fontsize = 10),
just = c("left", "bottom"))
grid.text("(c) What do people think the opposite
sex are looking for",
x=0.1,
y=0.04,
gp = gpar(fontsize = 10),
just = c("left", "bottom"))
legend(x = 2.3, y = 1, c("Male", "Female"),
fill = c(adjustcolor("cadetblue2", 0.5), adjustcolor("hotpink1", 0.5)))
popViewport()
```
- Women strongly feel that men are most concerned with a woman's attractiveness and that other attributes are not as important, especially ambitiousness.
- Comapring female and male answers in the first graph, we can see that there are not that much difference between the two. We can say that women almost accurately predicted what men are looking for in their partners (i.e. attractiveness).
- Additionally, men's predictions were not far off either. By comparing males' responses here and female's responses in the first graph, what men think women are looking for also closely resembles what women say they are looking for. The main differences, though, are a higher attractiveness score and a lower shared interest score.
####Conclusion
Both men and women can predict what the opposite sex are looking for in their partners to a certain degree.
We must note that all of the answers here are based on a survey conducted before the actual speed dating event. The responses provided are based on what people "say" they want, and we will compare this with the next analysis to see if people's decisions are consistent with their answers.
---
##Which of the 6 Attributes Actually Influence Decision Making?
During all events, each person will be able to meet with an average of 12 people of the other sex and have 4 minutes to talk with them. After that, they will rate their partners on the previous 6 attributions and indicate if they are interested in meeting with that person again.
Here, we aim to discover which attributes are most important in getting a positive response from their partners.
On the x-axis, we calculate how many positive responses can a person get from the opposite sex. For example, if a man met with 10 women and 6 of them indicated that they would like to meet him again, his positive response rate would be 60%. On the y-axis, we averaged the scores in the 6 attributes that the man received from the 10 women.
Finally, the Pearson Product-Moment Correlation Coefficient (R score) is calculated for each of the attributes to show how strong the correlation is between the positive response rate and the score of the attributes.
---
###Influence of Attributes to Match Making
```{r, Data organization, include = FALSE}
test2 <-
at00 %>%
group_by(pid, pgender) %>%
summarise(Decision = mean(dec), Attractive = mean(attr), Sincere = mean(sinc), Intelligent = mean(intel), Fun = mean(fun), Ambitious = mean(amb), Interest = mean(shar))
test2a <-
test2 %>%
select(pid, pgender, Decision, Attractive) %>%
filter(!Attractive == "NA")
test2b <-
test2 %>%
select(pid, pgender, Decision, Sincere) %>%
filter(!Sincere == "NA")
test2c <-
test2 %>%
select(pid, pgender, Decision, Intelligent) %>%
filter(!Intelligent == "NA")
test2d <-
test2 %>%
select(pid, pgender, Decision, Fun) %>%
filter(!Fun == "NA")
test2e <-
test2 %>%
select(pid, pgender, Decision, Ambitious) %>%
filter(!Ambitious == "NA")
test2f <-
test2 %>%
select(pid, pgender, Decision, Interest) %>%
filter(!Interest == "NA")
coratr <- cor(test2a$Decision, test2a$Attractive)
corsin <- cor(test2b$Decision, test2b$Sincere)
corint <- cor(test2c$Decision, test2c$Intelligent)
corfun <- cor(test2d$Decision, test2d$Fun)
coramb <- cor(test2e$Decision, test2e$Ambitious)
corshar <- cor(test2f$Decision, test2f$Interest)
```
```{r, attribute correlation, echo = FALSE}
vp8 <- viewport(x = 0, y = 0.45, width = 1/3, height = 0.45, just = c("left", "bottom"))
vp9 <- viewport(x = 1/3, y = 0.45, width = 1/3, height = 0.45, just = c("left", "bottom"))
vp10 <- viewport(x = 2/3, y = 0.45, width = 1/3, height = 0.45, just = c("left", "bottom"))
vp11 <- viewport(x = 0, y = 0, width = 1/3, height = 0.45, just = c("left", "bottom"))
vp12 <- viewport(x = 1/3, y = 0, width = 1/3, height = 0.45, just = c("left", "bottom"))
vp13 <- viewport(x = 2/3, y = 0, width = 1/3, height = 0.45, just = c("left", "bottom"))
vp14 <- viewport(x = 0, y = 0.9, width = 1, height = 0.1, just = c("left", "bottom"))
graphattr <-
test2a %>%
ggplot() +
aes(x = Decision, y = Attractive) +
geom_point(alpha = 0.1) +
theme(panel.background = element_blank()) +
geom_smooth(method = lm,
se = FALSE,
size = 1.5) +
labs(x="Positive Response Rate",
y="Attractiveness Score") +
scale_y_continuous(breaks = c(0, 5, 10), limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 1), breaks = c(0, 0.5, 1), labels = percent) +
annotate("text", x = 0.05, y = 10, label = "(a)") +
annotate("text", x = 0.8, y = 1, label = "R = 0.795")
graphsinc <-
test2b %>%
ggplot() +
aes(x = Decision, y = Sincere) +
geom_point(alpha = 0.1) +
theme(panel.background = element_blank()) +
geom_smooth(method = lm,
size = 1.5,
se = FALSE) +
labs(x="Positive Response Rate",
y="Sincerity Score") +
scale_y_continuous(breaks = c(0, 5, 10), limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 1), breaks = c(0, 0.5, 1), labels = percent) +
annotate("text", x = 0.05, y = 10, label = "(b)") +
annotate("text", x = 0.8, y = 1, label = "R = 0.258")
graphintel <-
test2c %>%
ggplot() +
aes(x = Decision, y = Intelligent) +
geom_point(alpha = 0.1) +
theme(panel.background = element_blank()) +
geom_smooth(method = lm,
size = 1.5,
se = FALSE) +
labs(x="Positive Response Rate",
y="Intelligence Score") +
scale_y_continuous(breaks = c(0, 5, 10), limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 1), breaks = c(0, 0.5, 1), labels = percent) +
annotate("text", x = 0.05, y=10, label = "(c)") +
annotate("text", x = 0.8, y = 1, label = "R = 0.286")
graphfun <-
test2d %>%
ggplot() +
aes(x = Decision, y = Fun) +
geom_point(alpha = 0.1) +
theme(panel.background = element_blank()) +
geom_smooth(method = lm,
size = 1.5,
se = FALSE) +
labs(x="Positive Response Rate",
y="Fun Score") +
scale_y_continuous(breaks = c(0, 5, 10), limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 1), breaks = c(0, 0.5, 1), labels = percent) +
annotate("text", x = 0.05, y=10, label = "(d)") +
annotate("text", x = 0.8, y = 1, label = "R = 0.674")
graphamb <-
test2e %>%
ggplot() +
aes(x = Decision, y = Ambitious) +
geom_point(alpha = 0.1) +
theme(panel.background = element_blank()) +
geom_smooth(method = lm,
size = 1.5,
se = FALSE) +
labs(x="Positive Response Rate",
y="Ambitious Score") +
scale_y_continuous(breaks = c(0, 5, 10), limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 1), breaks = c(0, 0.5, 1), labels = percent) +
annotate("text", x = 0.05, y = 10, label = "(e)") +
annotate("text", x = 0.8, y = 1, label = "R = 0.249")
graphshar <-
test2f %>%
ggplot() +
aes(x = Decision, y = Interest) +
geom_point(alpha = 0.1) +
theme(panel.background = element_blank()) +
geom_smooth(method = lm,
size = 1.5,
se = FALSE) +
labs(x="Positive Response Rate",
y="Interest Score") +
scale_y_continuous(breaks = c(0, 5, 10), limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 1), breaks = c(0, 0.5, 1), labels = percent) +
annotate("text", x = 0.05, y = 10, label = "(f)") +
annotate("text", x = 0.8, y = 1, label = "R = 0.667")
print(graphattr, vp = vp8)
print(graphsinc, vp = vp9)
print(graphintel, vp = vp10)
print(graphfun, vp = vp11)
print(graphamb, vp = vp12)
print(graphshar, vp = vp13)
```
- As we can see from the graph and correlation score, the most important attribute is attractiveness of the individual, followed by how fun the individual is and if the two people have any shared interest.
- In contrast, being sincere, being intelligent, and being ambitious would not necessarily get that person a higher positive response rate. A person could have a high rating for sincerity, intelligence, and ambition, however this would not necessary correspond with a highly positive response rate.
It's worth noting that the amount of data available is different for each of the attributes. Since the participants only have 4 minutes to talk with their partners, they may not have sufficient information to judge on all 6 attributes. The participants were instructed to put in NA if he/she is not able to judge on that attribute, resulting in the different number of responses available for each attribute.
####Conclusion
Imporance of the attributes ranked high to low: Attractive, Fun, Shared Interest, Intelligent, Sincere, and Ambitious.
Next, we would like to see if there are any differences in the correlation scores between male and female.
---
###Breakdown of Correlation Coefficient Score into Male and Female
```{r, data organization, include = FALSE}
test2am <-
test2 %>%
select(pid, pgender, Decision, Attractive) %>%
filter(!Attractive == "NA") %>%
filter(pgender == "1")
test2af <-
test2 %>%
select(pid, pgender, Decision, Attractive) %>%
filter(!Attractive == "NA") %>%
filter(pgender == "0")
cormatr <- cor(test2am$Decision, test2am$Attractive)
corfatr <- cor(test2af$Decision, test2af$Attractive)
test2bm <-
test2 %>%
select(pid, pgender, Decision, Sincere) %>%
filter(!Sincere == "NA") %>%
filter(pgender == "1")
test2bf <-
test2 %>%
select(pid, pgender, Decision, Sincere) %>%
filter(!Sincere == "NA") %>%
filter(pgender == "0")
cormsin <- cor(test2bm$Decision, test2bm$Sincere)
corfsin <- cor(test2bf$Decision, test2bf$Sincere)
test2cm <-
test2 %>%
select(pid, pgender, Decision, Intelligent) %>%
filter(!Intelligent == "NA") %>%
filter(pgender == "1")
test2cf <-
test2 %>%
select(pid, pgender, Decision, Intelligent) %>%
filter(!Intelligent == "NA") %>%
filter(pgender == "0")
cormint <- cor(test2cm$Decision, test2cm$Intelligent)
corfint <- cor(test2cf$Decision, test2cf$Intelligent)
corint
test2dm <-
test2 %>%
select(pid, pgender, Decision, Fun) %>%
filter(!Fun == "NA") %>%
filter(pgender == "1")
test2df <-
test2 %>%
select(pid, pgender, Decision, Fun) %>%
filter(!Fun == "NA") %>%
filter(pgender == "0")
cormfun <- cor(test2dm$Decision, test2dm$Fun)
corffun <- cor(test2df$Decision, test2df$Fun)
test2em <-
test2 %>%
select(pid, pgender, Decision, Ambitious) %>%
filter(!Ambitious == "NA") %>%
filter(pgender == "1")
test2ef <-
test2 %>%
select(pid, pgender, Decision, Ambitious) %>%
filter(!Ambitious == "NA") %>%
filter(pgender == "0")
cormamb <- cor(test2em$Decision, test2em$Ambitious)
corfamb <- cor(test2ef$Decision, test2ef$Ambitious)
test2fm <-
test2 %>%
select(pid, pgender, Decision, Interest) %>%
filter(!Interest == "NA") %>%
filter(pgender == "1")
test2ff <-
test2 %>%
select(pid, pgender, Decision, Interest) %>%
filter(!Interest == "NA") %>%
filter(pgender == "0")
cormshar <- cor(test2fm$Decision, test2fm$Interest)
corfshar <- cor(test2ff$Decision, test2ff$Interest)
```
```{r, male/female attr correlation, echo = FALSE}
corforgraph2 <-data.frame(Traits = c("Average", "Male", "Female"),
corAttractive = c(coratr, cormatr, corfatr),
corSincere = c(corsin, cormsin, corfsin),
corIntelligence = c(corint, cormint, corfint),
corFun = c(corfun, cormfun, corffun),
corAmbitious = c(coramb, cormamb, corfamb),
corInterest = c(corshar, cormshar, corfshar))
gcorAttractive <-
corforgraph2 %>%
ggplot() +
aes(x = Traits, y = corAttractive, fill = Traits) +
geom_bar(stat = "Identity", width = 0.8, fill = c("gray55", "cadetblue2", "hotpink1")) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "gray96"),
axis.title.x=element_blank()) +
labs(y = "Correlation") +
scale_y_continuous(breaks = c(0, 0.5), limits = c(0, 1)) +
scale_x_discrete(limits=c("Average","Male","Female"),
labels = c("Ave","M","F")) +
annotate("text", x = 0.6, y = 0.99, label = "(a) Attractiveness", hjust = 0, size = 3) +
geom_text(aes(label = round(corAttractive, digits=3)),
nudge_y = 0.05,
size = 2.5,
color="black")
gcorSincere <-
corforgraph2 %>%
ggplot() +
aes(x = Traits, y = corSincere) +
geom_bar(stat = "Identity", width = 0.8, fill = c("gray55", "cadetblue2", "hotpink1")) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "gray96"),
axis.title.x=element_blank()) +
labs(y = "Correlation") +
scale_y_continuous(breaks = c(0, 0.5), limits = c(0, 1)) +
scale_x_discrete(limits=c("Average","Male","Female"),
labels = c("Ave","M","F")) +
annotate("text", x = 0.6, y = 0.99, label = "(b) Sincerity", hjust = 0, size = 3) +
geom_text(aes(label = round(corSincere, digits=3)),
nudge_y = 0.05,
size = 2.5,
color="black")
gcorIntelligence <-
corforgraph2 %>%
ggplot() +
aes(x = Traits, y = corIntelligence) +
geom_bar(stat = "Identity", width = 0.8, fill = c("gray55", "cadetblue2", "hotpink1")) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "gray96"),
axis.title.x=element_blank()) +
labs(y = "Correlation") +
scale_y_continuous(breaks = c(0, 0.5), limits = c(0, 1)) +
scale_x_discrete(limits=c("Average","Male","Female"),
labels = c("Ave","M","F")) +
annotate("text", x = 0.6, y = 0.99, label = "(c) Intelligence", hjust = 0, size = 3) +
geom_text(aes(label = round(corIntelligence, digits=3)),
nudge_y = 0.05,
size = 2.5,
color="black")
gcorFun <-
corforgraph2 %>%
ggplot() +
aes(x = Traits, y = corFun) +
geom_bar(stat = "Identity", width = 0.8, fill = c("gray55", "cadetblue2", "hotpink1")) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "gray96"),
axis.title.x=element_blank()) +
labs(y = "Correlation") +
scale_y_continuous(breaks = c(0, 0.5), limits = c(0, 1)) +
scale_x_discrete(limits=c("Average","Male","Female"),
labels = c("Ave","M","F")) +
annotate("text", x = 0.6, y = 0.99, label = "(d) Fun", hjust = 0, size = 3) +
geom_text(aes(label = round(corFun, digits=3)),
nudge_y = 0.05,
size = 2.5,
color="black")
gcorAmbitious <-
corforgraph2 %>%
ggplot() +
aes(x = Traits, y = corAmbitious) +
geom_bar(stat = "Identity", width = 0.8, fill = c("gray55", "cadetblue2", "hotpink1")) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "gray96"),
axis.title.x=element_blank()) +
labs(y = "Correlation") +
scale_y_continuous(breaks = c(0, 0.5), limits = c(0, 1)) +
scale_x_discrete(limits=c("Average","Male","Female"),
labels = c("Ave","M","F")) +
annotate("text", x = 0.6, y = 0.99, label = "(e) Ambitious", hjust = 0, size = 3) +
geom_text(aes(label = round(corAmbitious, digits=3)),
nudge_y = 0.05,
size = 2.5,
color="black")
gcorInterest <-
corforgraph2 %>%
ggplot() +
aes(x = Traits, y = corInterest) +
geom_bar(stat = "Identity", width = 0.8, fill = c("gray55", "cadetblue2", "hotpink1")) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "gray96"),
axis.title.x=element_blank()) +
labs(y = "Correlation") +
scale_y_continuous(breaks = c(0, 0.5), limits = c(0, 1)) +
scale_x_discrete(limits=c("Average","Male","Female"),
labels = c("Ave","M","F")) +
annotate("text", x = 0.6, y = 0.99, label = "(f) Shared Interest", hjust = 0, size = 3) +
geom_text(aes(label = round(corInterest, digits=3)),
nudge_y = 0.05,
size = 2.5,
color="black")
print(gcorAttractive, vp = vp8)
print(gcorSincere, vp = vp9)
print(gcorIntelligence, vp = vp10)
print(gcorFun, vp = vp11)
print(gcorAmbitious, vp = vp12)
print(gcorInterest, vp = vp13)
pushViewport(vp14)
grid.text("Correlation Difference in Males and Females",
x = 0.5,
y = 0.5,
gp = gpar(fontsize = 16),
just = c("center", "center"))
popViewport()
```
Correlation data is further divided into male and female decisions, and correlation scores are again calculated.
####Conclusions
(a) No significant difference between male and female on attractiveness scores.
(b) A sincere male would win slightly more positive responses compared to a sincere female.