Libraries

At first, we wanto to install some needed libraries:

library(car)
library(lmtest)

Working with dataset

We got the data from …. the variables are…

adot <- read.csv2("holt-Laury-experiment.csv",sep=",",dec = ".")
adot
summary(adot)
     choice          bro_sis     hardwork       money          gender         
 Min.   : 3.000   Min.   :0   Min.   :1.0   Min.   :3.000   Length:35         
 1st Qu.: 5.000   1st Qu.:0   1st Qu.:3.0   1st Qu.:3.500   Class :character  
 Median : 5.000   Median :1   Median :3.0   Median :4.000   Mode  :character  
 Mean   : 5.914   Mean   :1   Mean   :3.4   Mean   :3.943                     
 3rd Qu.: 7.000   3rd Qu.:1   3rd Qu.:4.0   3rd Qu.:4.000                     
 Max.   :10.000   Max.   :3   Max.   :5.0   Max.   :5.000                     

Linear regression

some motivation for the choice of the variables, expected signs of the estimated coefficients…

attach(adot)
aaares <- lm(choice ~ +1 + bro_sis + hardwork + money + gender)
summary(aaares)

Call:
lm(formula = choice ~ +1 + bro_sis + hardwork + money + gender)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.3271 -0.9588 -0.3783  0.6670  3.6217 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   0.7199     2.0722   0.347    0.731  
bro_sis       0.2296     0.3509   0.654    0.518  
hardwork      0.5571     0.3418   1.630    0.114  
money         0.7413     0.4091   1.812    0.080 .
genderGirl    0.2355     0.5894   0.399    0.692  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.59 on 30 degrees of freedom
Multiple R-squared:  0.1826,    Adjusted R-squared:  0.07366 
F-statistic: 1.676 on 4 and 30 DF,  p-value: 0.1816
plot(aaares)

We eliminate the gender variable, as it is not statistically signifficant.

attach(adot)
aaares <- lm(choice ~ +1 + bro_sis + hardwork + money )
summary(aaares)

Call:
lm(formula = choice ~ +1 + bro_sis + hardwork + money)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.4995 -0.9252 -0.4581  0.7742  3.7022 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   0.6887     2.0425   0.337    0.738  
bro_sis       0.2737     0.3286   0.833    0.411  
hardwork      0.5661     0.3364   1.683    0.102  
money         0.7678     0.3982   1.928    0.063 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.568 on 31 degrees of freedom
Multiple R-squared:  0.1783,    Adjusted R-squared:  0.09877 
F-statistic: 2.242 on 3 and 31 DF,  p-value: 0.1031
plot(aaares)

Now, bro_sis variable is not statistically significant, we exlude it.

attach(adot)
The following objects are masked from adot (pos = 3):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 4):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 5):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 6):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 7):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 8):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 9):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 10):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 11):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 12):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 13):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 14):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 15):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 16):

    bro_sis, choice, gender, hardwork, money

The following objects are masked from adot (pos = 17):

    bro_sis, choice, gender, hardwork, money
aaares <- lm(choice ~ +1 + hardwork + money )
summary(aaares)

Call:
lm(formula = choice ~ +1 + hardwork + money)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.4662 -0.8885 -0.4662  0.8520  3.7333 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   1.3169     1.8890   0.697    0.491  
hardwork      0.5190     0.3300   1.573    0.126  
money         0.7185     0.3918   1.834    0.076 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.56 on 32 degrees of freedom
Multiple R-squared:  0.1599,    Adjusted R-squared:  0.1074 
F-statistic: 3.045 on 2 and 32 DF,  p-value: 0.06155
plot(aaares)

We see that the statistical signifficance of the harworking worsened and at the same time the picture of the residuals agains the fitted vlaue of the choice looses its smoothness, and the red line is as Zig-Zag saying the residuals jump up and down… That is, why we return the the previous model as the final one.

attach(adot)
aaares <- lm(choice ~ +1 + bro_sis + hardwork + money )
summary(aaares)

Call:
lm(formula = choice ~ +1 + bro_sis + hardwork + money)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.4995 -0.9252 -0.4581  0.7742  3.7022 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   0.6887     2.0425   0.337    0.738  
bro_sis       0.2737     0.3286   0.833    0.411  
hardwork      0.5661     0.3364   1.683    0.102  
money         0.7678     0.3982   1.928    0.063 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.568 on 31 degrees of freedom
Multiple R-squared:  0.1783,    Adjusted R-squared:  0.09877 
F-statistic: 2.242 on 3 and 31 DF,  p-value: 0.1031

Based on the regression results, we see that the increasing hardworking will increase also the propensity to risk and, it raises aslo with the money-loving relation of the students. On the other side, we do not interpret the number of brothers/sisters, as this variable is not statistically signifficant and the corresponding regression coefficient can be considered zero.

Conclusion

In this research, we made ….

LS0tCnRpdGxlOiAiRmluYWwgQXNzaWdubWVudCIKb3V0cHV0OiBodG1sX25vdGVib29rCmF1dGhvcjogVi4gR2F6ZGEKLS0tCgojIyBMaWJyYXJpZXMKCkF0IGZpcnN0LCB3ZSB3YW50byB0byBpbnN0YWxs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