rm(list = ls())
setwd("~/Downloads")
library(foreign)
sex_data <- read.spss("sex_data.sav", use.value.label=TRUE, to.data.frame=TRUE)

Libraries/themes

library(ggplot2)
library(tidyverse)
library(gridExtra)
library(finalfit)
library(kableExtra)
library(xtable)
jrothsch_theme <-  theme_bw() + 
  theme(text = element_text(size = 10, face = "bold", color = "deepskyblue4"),panel.grid = element_blank(),axis.text = element_text(size = 10, color = "gray13"), axis.title = element_text(size = 10, color = "red"), legend.text = element_text(colour="Black", size=10), legend.title = element_text(colour="Black", size=7), plot.subtitle = element_text(size=14, face="italic", color="black"))

Removing obserations without our key variables

sex_data <- sex_data[!is.na(sex_data$status),]
sex_data <- sex_data[!is.na(sex_data$age),]
sex_data <- sex_data[!is.na(sex_data$Years_PrimaryPartner),]
sex_data <- sex_data[!is.na(sex_data$MALE),]

Making variables

sex_data <- sex_data %>%
  mutate(married = status == "Married")

sex_data <- sex_data %>%
  mutate(married_gender = ifelse(married, 
                                 ifelse(MALE == "Male", "Married Male", "Married Female"),
                                 ifelse(MALE == "Male", "Unmarried Male", "Unmarried Female ")))

  married_num =   length(sex_data$married[sex_data$married == T])
  unmarried_num =   length(sex_data$married[sex_data$married == T])
  
  sex_data <- sex_data %>% mutate(freq_num =  as.numeric(ifelse(sexfreq == "At least once per day", 6, 
                                ifelse(sexfreq == "3-4 times per week", 5,
                                  ifelse(sexfreq == 'At least once a week', 4,
                                       ifelse(sexfreq == 'At least once per month', 3, 
                                              ifelse(sexfreq =='At least once per year', 2,
                                                     ifelse( sexfreq =="Less than once a year", 1, 0))))))))

Functions

graphs_continuous <- function(dv, df, dvname){
  
  dist <- ggplot(data = df, aes(x = dv, fill = married)) +
    geom_density(alpha = 0.5) + labs(title = paste("Distribution Of ", dvname), x = dvname, y = "Density") +  scale_fill_discrete(labels = c("Married", "Unmarried"))  +
    jrothsch_theme
  
  gender <- ggplot(data = df,  aes(y = dv, x = married_gender, color = MALE)) +
    geom_boxplot() +
    labs(title = paste(dvname, "By Marriage And Gender"), x = "Marriage/Gender", y = dvname, color = "") +
     coord_flip() + 
    jrothsch_theme

  #Age
  age <- ggplot(data = df, aes(x = age, y = dv, color = married)) +
      geom_point(alpha = 0.1) +
      geom_smooth() +
      labs(title = paste("Effect Of Marriage On", dvname, " -- Age"), x = "Age", y = dvname, color = "") + 
      scale_x_continuous(limits = c(18, 80)) +
    scale_color_discrete(labels = c("Married", "Unmarried")) +
      jrothsch_theme
  
  #Duration
    dur <- ggplot(data = df, aes(x = Years_PrimaryPartner, y = dv, color = married)) +
      geom_point(alpha = 0.1) +
      geom_smooth() +
     labs(title = paste("Effect Of Marriage On", dvname, " -- Duration"), x = "Duration", y = dvname, color = "") + 
      scale_x_continuous(limits = c(0, 50)) + scale_color_discrete(labels = c("Married", "Unmarried")) +
      jrothsch_theme
    
    grid.arrange(dist, gender, age, dur, ncol = 2)
}

#############################################################################################################################################################################################################################################################

graphs_discrete <- function(dv, df, dvname){
  df2 = df[!is.na(dv),]
  dv2 = dv[!is.na(dv)]

  
  bar <- ggplot(data = df2, aes(x = dv2)) +
    geom_bar(position = 'dodge', aes(fill = married)) +
   labs(title = paste("Distribution Of ", dvname), x = dvname, y = "Number Of Observations")  +
    jrothsch_theme +
    coord_flip() +
    facet_wrap(~married)

  dv2 <- as.numeric(dv2)
  
  gender <- ggplot(data = df2,  aes(y = dv2, x = married_gender, color = MALE)) +
    geom_boxplot() +
    labs(title = paste(dvname, "By Marriage And Gender"), x = "Marriage/Gender", y = dvname, color = "") +
     coord_flip() +  
    scale_fill_discrete(labels = c("Unmarried", "Married")) +
    jrothsch_theme

  #Age
  age <- ggplot(data = df2, aes(x = age, y = dv2, color = married))  +
      geom_smooth() +
      labs(title = paste("Effect Of Marriage On", dvname, " -- Age"), x = "Age", y = dvname, color = "") + 
      scale_x_continuous(limits = c(18, 80)) +
    scale_color_discrete(labels = c("Unmarried", "Married")) +
      jrothsch_theme
  
  #Duration
    dur <- ggplot(data = df2, aes(x = Years_PrimaryPartner, y = dv2, color = married)) +
      geom_smooth() +
     labs(title = paste("Effect Of Marriage On", dvname, " -- Duration"), x = "Duration", y = dvname, color = "") + 
      scale_x_continuous(limits = c(0, 50)) + scale_color_discrete(labels = c("Unmarried", "Married")) +
      jrothsch_theme
    
    grid.arrange(bar, gender, age, dur)
}


#############################################################################################################################################################################################################################################################
reg_simple <- function(dv, df){
  dv <- as.numeric(dv)
  tx1 <- df %>% lm(dv ~ married, data = .)

  
  tx1 <- xtable(tx1)
  colnames(tx1)[colnames(tx1)=="Pr(>|t|)"] <- "p_value"
    colnames(tx1)[colnames(tx1)=="t value"] <- "t_value"

  
  tx1 <- tx1 %>%
    mutate(p_value = round(p_value, 4)) %>%
    mutate(t_value = round(t_value, 3)) %>%
    mutate(p_value= cell_spec(p_value, "html", background = ifelse(p_value < .01, "gold", "white"))) %>%
    mutate(t_value= cell_spec(t_value, "html", background = ifelse(t_value < -2.5, "#FF6347", 
                                                                   ifelse(t_value > 2.5, "light green", "white"))))

  
  rownames(tx1) <- c("Intercept", "Married: True")
  
kable(tx1, row.names= T, align=c("l", "l", "r", "r", "r", "r")  ,
            booktabs=TRUE, escape = F) %>% 
    kable_styling(font_size=8)  


}

reg_more<- function(dv, df){
  dv <- as.numeric(dv)
  tx1 <- df %>% lm(dv ~ married + age + Years_PrimaryPartner + MALE, data = .)

  
  tx1 <- xtable(tx1)
  colnames(tx1)[colnames(tx1)=="Pr(>|t|)"] <- "p_value"
      colnames(tx1)[colnames(tx1)=="t value"] <- "t_value"
      
  tx1 <- tx1 %>%
     mutate(p_value = round(p_value, 5)) %>%
     mutate(t_value = round(t_value, 3)) %>%
    mutate(p_value= cell_spec(p_value, "html", background = ifelse(p_value < .01, "gold", "white"))) %>%
     mutate(t_value= cell_spec(t_value, "html", background = ifelse(t_value < -2.5, "#FF6347", 
                                                                   ifelse(t_value > 2.5, "limegreen", "white"))))
     
  rownames(tx1) <- c("Intercept", "Married: True", "Age (years)", "Duration", "Male")
    
kable(tx1, row.names = T, align=c("l", "l", "r", "r", "r", "r")  ,
            booktabs=TRUE, escape = F) %>% 
    kable_styling(font_size=8)  


}

reg_interaction<- function(dv, df){
  dv <- as.numeric(dv)
  tx1 <- df %>% lm(dv ~ married + age + Years_PrimaryPartner + MALE + age*married, data = .)

  
  tx1 <- xtable(tx1)
  colnames(tx1)[colnames(tx1)=="Pr(>|t|)"] <- "p_value"
      colnames(tx1)[colnames(tx1)=="t value"] <- "t_value"
      
  tx1 <- tx1 %>%
     mutate(p_value = round(p_value, 5)) %>%
     mutate(t_value = round(t_value, 3)) %>%
    mutate(p_value= cell_spec(p_value, "html", background = ifelse(p_value < .01, "gold", "white"))) %>%
     mutate(t_value= cell_spec(t_value, "html", background = ifelse(t_value < -2.5, "#FF6347", 
                                                                   ifelse(t_value > 2.5, "limegreen", "white"))))
     
  rownames(tx1) <- c("Intercept", "Married: True", "Age (years)", "Duration", "Male", "Married x Age")
    
kable(tx1, row.names = T, align=c("l", "l", "r", "r", "r", "r")  ,
            booktabs=TRUE, escape = F) %>% 
    kable_styling(font_size=8)  


}

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Like

Graphs

graphs_continuous(sex_data$totlike, sex_data, "Like")

Regression - Like ~ Marriage

reg_simple(sex_data$totlike, sex_data)
Estimate Std. Error t_value p_value
Intercept 38.524460 0.2654955 145.104 0
Married: True -3.954296 0.3168241 -12.481 0

Regression - Like ~ Marriage, Age, Gender, Duration

reg_more(sex_data$totlike, sex_data)
Estimate Std. Error t_value p_value
Intercept 40.9088281 0.4368889 93.637 0
Married: True -2.6911441 0.3412552 -7.886 0
Age (years) -0.0852356 0.0095901 -8.888 0
Duration -0.0098875 0.0058960 -1.677 0.09361
Male 1.9027594 0.2944406 6.462 0

Regression - Like – Interaction

reg_interaction(sex_data$totlike, sex_data)
Estimate Std. Error t_value p_value
Intercept 39.0758142 0.6638263 58.865 0
Married: True 0.2502633 0.8721652 0.287 0.77417
Age (years) -0.0380305 0.0160538 -2.369 0.01788
Duration -0.0064684 0.0059616 -1.085 0.27798
Male 1.9417501 0.2942417 6.599 0
Married x Age -0.0706070 0.0192714 -3.664 0.00025

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Want

Graphs

graphs_continuous(sex_data$want, sex_data, "Want")

Regression - Want ~ Marriage

reg_simple(sex_data$want, sex_data)
Estimate Std. Error t_value p_value
Intercept 28.927462 0.2358428 122.656 0
Married: True -5.062436 0.2804827 -18.049 0

Regression - Want ~ Marriage, Age, Gender, Duration

reg_more(sex_data$want, sex_data)
Estimate Std. Error t_value p_value
Intercept 33.6515234 0.3616805 93.042 0
Married: True -2.4498192 0.2836310 -8.637 0
Age (years) -0.1788330 0.0079330 -22.543 0
Duration -0.0164498 0.0049803 -3.303 0.00096
Male 4.5428634 0.2430139 18.694 0

Regression - Want – Interaction

reg_interaction(sex_data$want, sex_data)
Estimate Std. Error t_value p_value
Intercept 31.1512237 0.5506366 56.573 0
Married: True 1.5349626 0.7211617 2.128 0.03335
Age (years) -0.1144583 0.0133182 -8.594 0
Duration -0.0115843 0.0050284 -2.304 0.02128
Male 4.5912970 0.2422920 18.949 0
Married x Age -0.0956272 0.0159220 -6.006 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

General Desire

Graphs

graphs_discrete(sex_data$gendesir, sex_data, "Desire")

Regression - Desire ~ Marriage

reg_simple(sex_data$gendesir, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.0234310 0.0568414 105.969 0
Married: True -0.6143401 0.0685983 -8.956 0

Regression - Desire ~ Marriage, Age, Gender, Duration

reg_more(sex_data$gendesir, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.1873397 0.0924286 66.942 0
Married: True -0.4328352 0.0727681 -5.948 0
Age (years) -0.0155807 0.0020443 -7.621 0
Duration -0.0012408 0.0011670 -1.063 0.28773
Male 0.9636750 0.0639932 15.059 0

Regression - Desire – Interaction

reg_interaction(sex_data$gendesir, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.6517235 0.1367860 41.318 0
Married: True 0.4706434 0.1853605 2.539 0.01115
Age (years) -0.0019689 0.0032795 -0.6 0.54829
Duration -0.0003695 0.0011744 -0.315 0.75309
Male 0.9850041 0.0638942 15.416 0
Married x Age -0.0212580 0.0040138 -5.296 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Frequency

Graphs

graphs_discrete(sex_data$freq_num, sex_data, "Frequency")

Regression - Frequency ~ Marriage

reg_simple(sex_data$freq_num, sex_data)
Estimate Std. Error t_value p_value
Intercept 3.6641623 0.0408283 89.746 0
Married: True -0.6595098 0.0480844 -13.716 0

Regression - Frequency ~ Marriage, Age, Gender, Duration

reg_more(sex_data$freq_num, sex_data) 
Estimate Std. Error t_value p_value
Intercept 4.8698702 0.0640338 76.052 0
Married: True -0.1485242 0.0488622 -3.04 0.00238
Age (years) -0.0334322 0.0014244 -23.471 0
Duration -0.0032137 0.0010801 -2.975 0.00294
Male 0.2339988 0.0411009 5.693 0
kable(table1, row.names= T, align=c("l", "l", "r", "r", "r", "r")  ,
            booktabs=TRUE, escape = F) %>% 
    kable_styling(font_size=8)  
country year cases population
1 Afghanistan 1999 745 19987071
2 Afghanistan 2000 2666 20595360
3 Brazil 1999 37737 172006362
4 Brazil 2000 80488 174504898
5 China 1999 212258 1272915272
6 China 2000 213766 1280428583

Regression - Frequency – Interaction

reg_interaction(sex_data$freq_num, sex_data)
Estimate Std. Error t_value p_value
Intercept 4.2367447 0.0959036 44.177 0
Married: True 0.8666272 0.1249834 6.934 0
Age (years) -0.0175985 0.0022859 -7.699 0
Duration -0.0010892 0.0010983 -0.992 0.32138
Male 0.2448805 0.0407930 6.003 0
Married x Age -0.0241874 0.0027448 -8.812 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Enjoyment

Graphs

graphs_discrete(sex_data$EnjoySex, sex_data, "Enjoyment")

Regression - Enjoyment ~ Marriage

reg_simple(sex_data$EnjoySex, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.5439815 0.0325894 78.062 0
Married: True 0.3113073 0.0407129 7.646 0

Regression - Enjoyment ~ Marriage, Age, Gender, Duration

reg_more(sex_data$EnjoySex, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.3745682 0.0547840 43.344 0
Married: True 0.2147854 0.0446972 4.805 0
Age (years) 0.0089273 0.0012293 7.262 0
Duration -0.0002870 0.0005917 -0.485 0.62761
Male -0.4154260 0.0396967 -10.465 0

Regression - Enjoyment – Interaction

reg_interaction(sex_data$EnjoySex, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.6268289 0.0757455 34.68 0
Married: True -0.2869863 0.1136357 -2.525 0.01162
Age (years) 0.0024859 0.0018164 1.369 0.17125
Duration -0.0006072 0.0005927 -1.024 0.30578
Male -0.4294962 0.0396244 -10.839 0
Married x Age 0.0113299 0.0023610 4.799 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Masturbation Frequency

Graphs

graphs_discrete(sex_data$MasturbationFreq, sex_data, "Masturbation Frequency")

Regression - Masturbation Frequency ~ Marriage

reg_simple(sex_data$MasturbationFreq, sex_data)
Estimate Std. Error t_value p_value
Intercept 3.0515625 0.0467702 65.246 0
Married: True 0.4885266 0.0612082 7.981 0

Regression - Masturbation Frequency ~ Marriage, Age, Gender, Duration

reg_more(sex_data$MasturbationFreq, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.5914198 0.0781435 33.162 0
Married: True 0.2181090 0.0654661 3.332 0.00088
Age (years) 0.0199617 0.0018361 10.872 0
Duration 0.0021769 0.0009869 2.206 0.02755
Male -0.6384301 0.0609351 -10.477 0

Regression - Masturbation Frequency – Interaction

reg_interaction(sex_data$MasturbationFreq, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.8267475 0.1045275 27.043 0
Married: True -0.2949152 0.1654023 -1.783 0.07478
Age (years) 0.0139103 0.0025618 5.43 0
Duration 0.0018506 0.0009883 1.872 0.06133
Male -0.6564739 0.0609644 -10.768 0
Married x Age 0.0116304 0.0034457 3.375 0.00076

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Masturbation Enjoyment

Graphs

graphs_discrete(sex_data$MasturbationOrgasm, sex_data, "Masturbation Enjoyment")

Regression - Masturbation Enjoyment ~ Marriage

reg_simple(sex_data$MasturbationOrgasm, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.621835 0.0703292 94.155 0
Married: True -0.442290 0.0921871 -4.798 0

Regression - Masturbation Enjoyment ~ Marriage, Age, Gender, Duration

reg_more(sex_data$MasturbationOrgasm, sex_data)
Estimate Std. Error t_value p_value
Intercept 7.2708803 0.1223579 59.423 0
Married: True -0.1861058 0.1021175 -1.822 0.06858
Age (years) -0.0105014 0.0028709 -3.658 0.00026
Duration -0.0006169 0.0015316 -0.403 0.68718
Male -0.5468093 0.0952324 -5.742 0

Regression - Masturbation Enjoyment – Interaction

reg_interaction(sex_data$MasturbationOrgasm, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.8713903 0.1629557 42.167 0
Married: True 0.6931999 0.2589616 2.677 0.00751
Age (years) -0.0002835 0.0039790 -0.071 0.9432
Duration -0.0000694 0.0015324 -0.045 0.96389
Male -0.5146718 0.0952344 -5.404 0
Married x Age -0.0198692 0.0053816 -3.692 0.00023

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Importance of Sex

Graphs

graphs_discrete(sex_data$seximpor, sex_data, "Importance Of Sex")

Regression - Importance ~ Marriage

reg_simple(sex_data$seximpor, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.4155731 0.0670462 95.689 0
Married: True -0.6053714 0.0807888 -7.493 0

Regression - Importance ~ Marriage, Age, Gender, Duration

reg_more(sex_data$seximpor, sex_data)
Estimate Std. Error t_value p_value
Intercept 7.5084237 0.1083403 69.304 0
Married: True -0.1241771 0.0854983 -1.452 0.14648
Age (years) -0.0355943 0.0023789 -14.963 0
Duration -0.0006182 0.0013465 -0.459 0.64619
Male 0.5898628 0.0747640 7.89 0

Regression - Importance – Interaction

reg_interaction(sex_data$seximpor, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.6452367 0.1594625 41.673 0
Married: True 1.3333085 0.2161325 6.169 0
Age (years) -0.0136149 0.0038162 -3.568 0.00036
Duration 0.0007914 0.0013506 0.586 0.55793
Male 0.6203199 0.0743479 8.343 0
Married x Age -0.0342664 0.0046731 -7.333 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Unrecriprocated desire for sex - self

Graphs

graphs_discrete(sex_data$i_do, sex_data, "Unrecriprocated desire for sex")

Regression - Unreciprocated Desire ~ Marriage

reg_simple(sex_data$i_do, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.0662069 0.0309435 66.774 0
Married: True 0.0875064 0.0368394 2.375 0.0176

Regression - Unrepricoted Desire ~ Marriage, Age, Gender, Duration

reg_more(sex_data$i_do, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.0416868 0.0495172 41.232 0
Married: True 0.1333318 0.0388053 3.436 6e-04
Age (years) -0.0077222 0.0010862 -7.109 0
Duration 0.0017354 0.0006811 2.548 0.01087
Male 0.6432502 0.0333158 19.308 0

Regression - Unreciprocated Desire – Interaction

reg_interaction(sex_data$i_do, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.0267944 0.0755943 26.811 0
Married: True 0.1570900 0.0990368 1.586 0.11276
Age (years) -0.0073391 0.0018274 -4.016 6e-05
Duration 0.0017644 0.0006902 2.556 0.01061
Male 0.6435452 0.0333381 19.304 0
Married x Age -0.0005700 0.0021862 -0.261 0.7943

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Unrecriprocated desire for sex - Partner

Graphs

graphs_discrete(sex_data$they_do, sex_data, "Unrecriprocated desire for sex - Partner")

Regression - Unreciprocated Desire ~ Marriage

reg_simple(sex_data$they_do, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.0668966 0.0302177 68.4 0
Married: True -0.1141044 0.0359754 -3.172 0.0015

Regression - Unrepricotated Desire ~ Marriage, Age, Gender, Duration

reg_more(sex_data$they_do, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.7029611 0.0476259 56.754 0
Married: True 0.0384113 0.0373232 1.029 0.30346
Age (years) -0.0092245 0.0010447 -8.83 0
Duration 0.0002504 0.0006551 0.382 0.70234
Male -0.5976379 0.0320433 -18.651 0

Regression - Unreciprocated Desire – Interaction

reg_interaction(sex_data$they_do, sex_data)
Estimate Std. Error t_value p_value
Intercept 2.5117432 0.0726179 34.588 0
Married: True 0.3434655 0.0951374 3.61 0.00031
Age (years) -0.0043048 0.0017554 -2.452 0.01423
Duration 0.0006233 0.0006630 0.94 0.34725
Male -0.5938506 0.0320255 -18.543 0
Married x Age -0.0073194 0.0021001 -3.485 5e-04

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Orgasm Satisfaction

Graphs

graphs_discrete(sex_data$o_satis, sex_data, "Orgasm Satisfaction")

Regression - Orgasm Satisfaction ~ Marriage

reg_simple(sex_data$o_satis, sex_data)
Estimate Std. Error t_value p_value
Intercept 8.0124567 0.0506999 158.037 0
Married: True -0.3879279 0.0603938 -6.423 0

Regression - Orgasm Satisfaction ~ Marriage, Age, Gender, Duration

reg_more(sex_data$o_satis, sex_data)
Estimate Std. Error t_value p_value
Intercept 8.3617676 0.0835554 100.075 0
Married: True -0.1916989 0.0654108 -2.931 0.0034
Age (years) -0.0134706 0.0018345 -7.343 0
Duration -0.0013043 0.0011471 -1.137 0.25555
Male 0.3558681 0.0562196 6.33 0

Regression - Orgasm Satisfaction – Interaction

reg_interaction(sex_data$o_satis, sex_data)
Estimate Std. Error t_value p_value
Intercept 7.9212414 0.1272410 62.254 0
Married: True 0.5118999 0.1668085 3.069 0.00216
Age (years) -0.0021385 0.0030764 -0.695 0.487
Duration -0.0004548 0.0011596 -0.392 0.6949
Male 0.3648875 0.0561394 6.5 0
Married x Age -0.0168791 0.0036825 -4.584 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Fake Orgasm

Graphs

graphs_discrete(sex_data$FakeOrgasm, sex_data, "Fake Orgasm")

Regression - Fake Orgasm ~ Marriage

reg_simple(sex_data$FakeOrgasm, sex_data)
Estimate Std. Error t_value p_value
Intercept 1.3936545 0.0270229 51.573 0
Married: True -0.1049173 0.0339768 -3.088 0.002

Regression - Fake Orgasm ~ Marriage, Age, Gender, Duration

reg_more(sex_data$FakeOrgasm, sex_data)
Estimate Std. Error t_value p_value
Intercept 1.6369896 0.0460866 35.52 0
Married: True -0.0437367 0.0375927 -1.163 0.24477
Age (years) -0.0042270 0.0010352 -4.083 5e-05
Duration 0.0013319 0.0004924 2.705 0.00689
Male -0.2238837 0.0335479 -6.674 0

Regression - Fake Orgasm – Interaction

reg_interaction(sex_data$FakeOrgasm, sex_data)
Estimate Std. Error t_value p_value
Intercept 1.5546947 0.0636259 24.435 0
Married: True 0.1221120 0.0961059 1.271 0.204
Age (years) -0.0021195 0.0015278 -1.387 0.16548
Duration 0.0014319 0.0004950 2.893 0.00386
Male -0.2194912 0.0336115 -6.53 0
Married x Age -0.0037436 0.0019967 -1.875 0.06093

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Thinking About Sex

Graphs

graphs_discrete(sex_data$thought, sex_data, "Thinking About Sex")

Regression - Sex Thoughts ~ Marriage

reg_simple(sex_data$thought, sex_data)
Estimate Std. Error t_value p_value
Intercept 4.9725840 0.0557839 89.14 0
Married: True -0.8959437 0.0663011 -13.513 0

Regression - Sex Thoughts ~ Marriage, Age, Gender, Duration

reg_more(sex_data$thought, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.8493204 0.0863407 67.747 0
Married: True -0.3721875 0.0677267 -5.495 0
Age (years) -0.0371692 0.0018926 -19.639 0
Duration -0.0028712 0.0011919 -2.409 0.01604
Male 1.1562792 0.0579697 19.946 0

Regression - Sex thought – Interaction

reg_interaction(sex_data$thought, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.4014015 0.1317941 40.984 0
Married: True 0.3402770 0.1724148 1.974 0.04848
Age (years) -0.0256396 0.0031869 -8.045 0
Duration -0.0019961 0.0012055 -1.656 0.09782
Male 1.1650735 0.0578917 20.125 0
Married x Age -0.0171027 0.0038075 -4.492 1e-05

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Comfort Discussing Sex

Graphs

graphs_discrete(sex_data$comfort, sex_data, "Comfort Discussing Sex")

Regression - Comfort Discussing ~ Marriage

reg_simple(sex_data$comfort, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.5650865 0.0476178 116.87 0
Married: True -0.4565023 0.0568567 -8.029 0

Regression - Comfort Discusing ~ Marriage, Age, Gender, Duration

reg_more(sex_data$comfort, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.6686792 0.0787410 71.991 0
Married: True -0.3353835 0.0616217 -5.443 0
Age (years) -0.0066364 0.0017307 -3.835 0.00013
Duration -0.0024910 0.0010453 -2.383 0.01721
Male 0.3399399 0.0532421 6.385 0

Regression - Comfort Discussing – Interaction

reg_interaction(sex_data$comfort, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.4387274 0.1194017 45.55 0
Married: True 0.0353290 0.1573261 0.225 0.82233
Age (years) -0.0006952 0.0028939 -0.24 0.81017
Duration -0.0020791 0.0010570 -1.967 0.04924
Male 0.3446437 0.0532405 6.473 0
Married x Age -0.0089034 0.0034770 -2.561 0.01048

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Have More Sex When Happy

Graphs

graphs_discrete(sex_data$happy_moresex, sex_data, "More Sex When Happy")

Regression - More Sex Hhen Happy ~ Marriage

reg_simple(sex_data$happy_moresex, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.4318690 0.0429588 126.444 0
Married: True -0.3629252 0.0512766 -7.078 0

Regression - More Sex When Happy ~ Marriage, Age, Gender, Duration

reg_more(sex_data$happy_moresex, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.2776496 0.0693580 90.511 0
Married: True -0.0433788 0.0542584 -0.799 0.42405
Age (years) -0.0241874 0.0015223 -15.889 0
Duration 0.0003706 0.0009246 0.401 0.68859
Male 0.1463213 0.0468547 3.123 0.0018

Regression - More Sex When Happy – Interaction

reg_interaction(sex_data$happy_moresex, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.8619075 0.1050098 55.822 0
Married: True 0.6255343 0.1381779 4.527 1e-05
Age (years) -0.0134635 0.0025414 -5.298 0
Duration 0.0011242 0.0009329 1.205 0.22826
Male 0.1554121 0.0467483 3.324 0.00089
Married x Age -0.0160622 0.0030531 -5.261 0

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Feel Happier With More Sex

Graphs

graphs_discrete(sex_data$regsex_morehappy, sex_data, "Happier With More Sex")

Regression - Feel Happier With More Sex ~ Marriage

reg_simple(sex_data$regsex_morehappy, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.5465376 0.0416587 133.142 0
Married: True -0.3311676 0.0497247 -6.66 0

Regression -Feel Happier With More Sex ~ Marriage, Age, Gender, Duration

reg_more(sex_data$regsex_morehappy, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.8829738 0.0678255 86.737 0
Married: True -0.1488451 0.0530596 -2.805 0.00505
Age (years) -0.0154938 0.0014887 -10.408 0
Duration 0.0003163 0.0009042 0.35 0.72649
Male 0.5210109 0.0458194 11.371 0

Regression - Feel Happier With More Sex – Interaction

reg_interaction(sex_data$regsex_morehappy, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.5614478 0.1028079 54.096 0
Married: True 0.3684779 0.1352804 2.724 0.00648
Age (years) -0.0072001 0.0024881 -2.894 0.00382
Duration 0.0008991 0.0009134 0.984 0.32497
Male 0.5280415 0.0457681 11.537 0
Married x Age -0.0124222 0.0029891 -4.156 3e-05

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Feel Physically Attractive

Graphs

graphs_discrete(sex_data$PhysicallyAttractive, sex_data, "Feel Physically Attractive")

Regression - Feel Physically Attractive~ Marriage

reg_simple(sex_data$PhysicallyAttractive, sex_data)
Estimate Std. Error t_value p_value
Intercept 5.9405941 0.0609770 97.423 0
Married: True -0.4999782 0.0769465 -6.498 0

Regression - Feel Physically Attractive ~ Marriage, Age, Gender, Duration

reg_more(sex_data$PhysicallyAttractive, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.4060252 0.1045882 61.25 0
Married: True -0.3171995 0.0857432 -3.699 0.00022
Age (years) -0.0139702 0.0023516 -5.941 0
Duration 0.0012972 0.0010973 1.182 0.23727
Male 0.1329357 0.0767150 1.733 0.08326

Regression - Feel Physically Attractive – Interaction

reg_interaction(sex_data$PhysicallyAttractive, sex_data)
Estimate Std. Error t_value p_value
Intercept 6.2193710 0.1438303 43.241 0
Married: True 0.0610548 0.2177849 0.28 0.77924
Age (years) -0.0091526 0.0034679 -2.639 0.00837
Duration 0.0015142 0.0011027 1.373 0.16981
Male 0.1431872 0.0768613 1.863 0.06261
Married x Age -0.0085938 0.0045489 -1.889 0.059