Set up

library(ggplot2)

df <- read.csv("~/r10.csv")

summary(df)
##       age                      educ                   competition  
##  Min.   :16.00   7               :4801   competition is good:4639  
##  1st Qu.:28.00   University level:4016   5                  :3536  
##  Median :40.00   5               :3336   3                  :3459  
##  Mean   :42.88   3               :2588   2                  :2960  
##  3rd Qu.:56.00   6               :2501   4                  :2941  
##  Max.   :99.00   8               :2380   6                  :1866  
##                  (Other)         :3922   (Other)            :4143  
##     lrscale                   country             sex       
##  5      :5971   710. South Africa : 3033   1. Male  :11948  
##  6      :3303   840. United States: 2112   2. Female:11596  
##  7      :2752   566. Nigeria      : 1759                    
##  8      :2593   392. Japan        : 1591                    
##  4      :2093   528. Netherlands  : 1590                    
##  3      :1813   288. Ghana        : 1552                    
##  (Other):5019   (Other)           :11907                    
##     secular        emancipative   
##  Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:0.2631   1st Qu.:0.3292  
##  Median :0.3878   Median :0.4567  
##  Mean   :0.3884   Mean   :0.4637  
##  3rd Qu.:0.4989   3rd Qu.:0.5885  
##  Max.   :0.9583   Max.   :1.0000  
## 

Simple Linear Regression

fm1 <- lm(emancipative ~ secular, df)

summary(fm1)
## 
## Call:
## lm(formula = emancipative ~ secular, data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.51454 -0.12723 -0.00891  0.11825  0.61822 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 0.316243   0.002874  110.03   <2e-16 ***
## secular     0.379542   0.006788   55.91   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1755 on 23542 degrees of freedom
## Multiple R-squared:  0.1172, Adjusted R-squared:  0.1172 
## F-statistic:  3126 on 1 and 23542 DF,  p-value: < 2.2e-16
plot(fm1)