> library("lsr", lib.loc="C:/Program
Files/R/R-3.1.1/library")
> library("psych", lib.loc="C:/Program
Files/R/R-3.1.1/library")
> datareal <-
read.csv("C:/Users/Administrator/Desktop/datareal.csv")
> View(datareal)
> View(datareal)
> summary(datareal)
Sex age Status Education
female:272 :
2 married :162
bechalor :276
male
:128 15 - 20:
10 seperated: 8
High school :
20
21 – 25 : 72 single
:230 High Vocational Certificate:
30
26 – 30 :210 master degree : 70
31 – 35 : 44 Vocational Certificate :
4
36 up : 62
OccupationType income expense behavior1
behavior2
Min.
:1.00 < 5000 : 28
< 5000 :
22 1
:218 2 :106
1st
Qu.:2.00 10,001 – 15,000: 72 10,001 – 15,000: 84 1, 2:
4 5 :104
Median
:3.00 15,001 – 20,000:104 15,001 – 20,000:100 2 :
90 3 : 80
Mean
:3.07 20,001 – 25,000: 60 20,001 – 25,000: 40 3
: 2 4
: 78
3rd
Qu.:4.00 25,000 – 30,000: 26 25,000 – 30,000: 32 4
: 40 1 : 24
Max.
:6.00 30,001 > : 90
30,001 > : 46 5 :
18 4 :
4
5,001 – 10,000 : 20 5,001 –
10,000 : 76 6 : 28
(Other): 4
behavior3
behavior4 behavior5 behavior6 behavior7 behavior8
1 : 46
6 :114 1
: 54 2 :186
1 :190 1
:136
1,
2: 4
5 :102 6
: 22 2, 6 : 42
3 :148 2
: 86
2 : 90
2 : 44 8
: 18 6 : 28
2 : 46 3
: 52
3 :100
9 : 28 10
: 12 1 : 16
9 : 4
6 : 44
4 : 54
1 : 14 12
: 12 1, 2 : 12
: 2 5
: 32
5 :106
2, 6 : 14 14
: 12 2, 5 : 12
1, 2 : 2
4 : 28
(Other): 84 (Other):270 (Other):104
(Other): 8 (Other): 22
behavior9 behavior10 behavior11 behavior12 web1
3 :158
2 :188
: 2 2
:164 Min. :1.000
2 : 68
3 : 82 1
: 98 1 : 96
1st Qu.:3.000
1 : 60
1 : 60 1, 2
: 16 3 : 78
Median :3.000
4 : 56
4 : 16 1, 2, 3: 10
4 : 42 Mean
:3.485
5 : 46
1, 2, 3: 10 2 :228
2, 3 : 12 3rd Qu.:4.000
2,
3 :
4 2, 3 : 10
2, 3 : 4 1,
2 :
4 Max. :5.000
(Other):
8 (Other): 34 3
: 42 (Other): 4
web2 web3 web4 web5 web6
Min.
:1.000 Min. :1
Min. :1.000 Min.
:1.00 Min. :1.000
1st
Qu.:3.000 1st Qu.:3 1st Qu.:4.000 1st Qu.:3.00 1st Qu.:3.000
Median
:4.000 Median :4 Median :5.000 Median :4.00 Median :4.000
Mean
:4.085 Mean :4
Mean :4.201 Mean
:3.79 Mean :3.965
3rd
Qu.:5.000 3rd Qu.:5 3rd Qu.:5.000 3rd Qu.:5.00 3rd Qu.:5.000
Max.
:5.000 Max. :5
Max. :5.000 Max.
:5.00 Max. :5.000
NA's :2 NA's :2
web7 web8 web9 web10 web11
Min.
:1.000 Min. :1.000
Min. :1.000 Min.
:1.00 Min. :1.00
1st
Qu.:3.000 1st Qu.:4.000 1st Qu.:3.000 1st Qu.:3.00 1st Qu.:3.00
Median
:5.000 Median :5.000 Median :4.000 Median :4.00 Median :4.00
Mean
:4.222 Mean :4.265
Mean :3.965 Mean
:3.92 Mean :4.05
3rd
Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.00 3rd Qu.:5.00
Max.
:5.000 Max. :5.000
Max. :5.000 Max.
:5.00 Max. :5.00
NA's
:4
web12
web13 web14 web15 web16
Min.
:1.000 Min. :1.000
Min. :1.000 Min.
:1.000 Min. :1.00
1st
Qu.:3.000 1st Qu.:3.000 1st Qu.:4.000 1st Qu.:4.000 1st Qu.:3.00
Median
:4.000 Median :4.000 Median :5.000 Median :5.000 Median :4.00
Mean
:3.964 Mean :3.815
Mean :4.256 Mean
:4.307 Mean :3.88
3rd
Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.00
Max.
:5.000 Max. :5.000
Max. :5.000 Max.
:5.000 Max. :5.00
NA's
:10 NA's :2
NA's :2
web17 web18 web19 web20 web21
Min.
:1.000 Min. :1.000
Min. :1.000 Min.
:1.000 Min. :1.000
1st
Qu.:4.000 1st Qu.:4.000 1st Qu.:4.000 1st Qu.:4.000 1st Qu.:4.000
Median
:4.000 Median :4.000 Median :5.000 Median :5.000 Median :4.000
Mean
:4.126 Mean :4.175
Mean :4.195 Mean
:4.242 Mean :4.116
3rd
Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000
Max.
:5.000 Max. :5.000
Max. :5.000 Max.
:5.000 Max. :5.000
NA's
:2 NA's :4
NA's :2
web22 web23 web24 sumweb meanweb
Min.
:1.000 Min. :1.000
Min. :1.00 Min.
: 24.00 Min. :1.000
1st
Qu.:3.000 1st Qu.:4.000 1st Qu.:4.00 1st Qu.: 89.00 1st Qu.:3.708
Median
:4.000 Median :4.000 Median :4.00 Median :100.00 Median :4.167
Mean
:3.662 Mean :4.166
Mean :4.23 Mean
: 96.72 Mean :4.030
3rd
Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.00 3rd Qu.:109.25 3rd Qu.:4.552
Max.
:5.000 Max. :5.000
Max. :5.00 Max.
:120.00 Max. :5.000
NA's
:4 NA's :2
done decision
Min.
:0.000 Min. :0.00
1st
Qu.:1.000 1st Qu.:1.00
Median
:1.000 Median :1.00
Mean
:0.905 Mean :0.98
3rd
Qu.:1.000 3rd Qu.:1.00
Max.
:1.000 Max. :1.00
> independentSamplesTTest(
+ formula = meanweb ~
Sex,
+ data = datareal,
+ var.equal = TRUE)
Student's independent samples t-test
Outcome variable: meanweb
Grouping variable: Sex
Descriptive statistics:
female male
mean 4.107 3.866
std
dev. 0.691 0.873
Hypotheses:
null: population means
equal for both groups
alternative: different population means in each group
Test results:
t-statistic: 2.983
degrees of freedom: 398
p-value: 0.003
Other information:
two-sided 95% confidence interval:
[0.082, 0.4]
estimated effect size (Cohen's d):
0.32
>
> mod1<-aov(meanweb ~ age, data=datareal)
> summary(mod1)
Df Sum Sq Mean Sq F value
Pr(>F)
age
5 19.03 3.805
7.065 2.43e-06 ***
Residuals
394 212.22 0.539
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod2<-aov(meanweb ~ Status, data=datareal)
> summary(mod2)
Df Sum Sq Mean Sq F value Pr(>F)
Status
2 1.59 0.7938
1.372 0.255
Residuals
397 229.66 0.5785
> mod2<-aov(meanweb ~ Education, data=datareal)
> mod3<-aov(meanweb ~ Education, data=datareal)
> summary(mod3)
Df Sum Sq Mean Sq F value
Pr(>F)
Education
4 27.38 6.845
13.26 3.78e-10 ***
Residuals
395 203.86 0.516
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod4<-aov(meanweb ~ OccupationType, data=datareal)
> summary(mod4)
Df Sum Sq Mean Sq F value
Pr(>F)
OccupationType
1 5.77 5.769
10.18 0.00153 **
Residuals
398 225.48 0.567
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod5<-aov(meanweb ~ income, data=datareal)
> summary(mod5)
Df Sum Sq Mean Sq F value
Pr(>F)
income
6 12.19 2.0321
3.646 0.00156 **
Residuals
393 219.05 0.5574
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod6<-aov(meanweb ~ expense, data=datareal)
> summary(mod6)
Df Sum Sq Mean Sq F value
Pr(>F)
expense
6 24.75 4.124
7.849 5.35e-08 ***
Residuals
393 206.50 0.525
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod7<-aov(meanweb ~ behavior1, data=datareal)
> summary(mod7)
Df Sum Sq Mean Sq F value Pr(>F)
behavior1
6 8.43 1.405
2.478 0.023 *
Residuals
393 222.82 0.567
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod8<-aov(decision ~ behavior1, data=datareal)
> summary(mod8)
Df Sum Sq Mean Sq F value Pr(>F)
behavior1
6 0.303 0.05047 2.631 0.0163 *
Residuals
393 7.537 0.01918
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod9<-aov(meanweb ~ behavior2, data=datareal)
> summary(mod9)
Df Sum Sq Mean Sq F value Pr(>F)
behavior2
7 4.08 0.5832
1.006 0.426
Residuals
392 227.16 0.5795
> mod10<-aov(decision ~ behavior2, data=datareal)
> summary(mod10)
Df Sum Sq Mean Sq F value Pr(>F)
behavior2
7 0.236 0.03374 1.739 0.0984 .
Residuals
392 7.604 0.01940
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod11<-aov(meanweb ~ behavior3, data=datareal)
> summary(mod11)
Df Sum Sq Mean Sq F value Pr(>F)
behavior3
5 3.59 0.7187
1.244 0.288
Residuals
394 227.65 0.5778
> mod12<-aov(decision ~ behavior3, data=datareal)
> summary(mod12)
Df Sum Sq Mean Sq F value Pr(>F)
behavior3
5 0.261 0.05220 2.714
0.02 *
Residuals
394 7.579 0.01924
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod13<-aov(decision ~ meanweb, data=datareal)
> summary(mod13)
Df Sum Sq Mean Sq F value
Pr(>F)
meanweb
1 0.41 0.4101
21.97 3.81e-06 ***
Residuals
398 7.43 0.0187
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod14<-aov(decision ~ web1, data=datareal)
> summary(mod14)
Df Sum Sq Mean Sq F value Pr(>F)
web1
1 0.034 0.03391 1.729
0.189
Residuals
398 7.806 0.01961
> mod15<-aov(decision ~ web4, data=datareal)
> summary(mod14)
Df Sum Sq Mean Sq F value Pr(>F)
web1
1 0.034 0.03391 1.729
0.189
Residuals
398 7.806 0.01961
> mod15<-aov(decision ~ web5, data=datareal)
> summary(mod15)
Df Sum Sq Mean Sq F value Pr(>F)
web5
1 0.076 0.07647 3.92 0.0484 *
Residuals
398 7.764 0.01951
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> mod16<-aov(decision ~ web6, data=datareal)
> summary(mod16)
Df Sum Sq Mean Sq F value
Pr(>F)
web6
1 0.170 0.17046 8.802 0.00319 **
Residuals
396 7.669 0.01937
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
2 observations deleted due to missingness
> mod17<-aov(decision ~ web7, data=datareal)
> summary(web7)
Error in summary(web7) : object 'web7' not found
> summary(mod17)
Df Sum Sq Mean Sq F value
Pr(>F)
web7
1 0.327 0.3268
17.14 4.24e-05 ***
Residuals
394 7.512 0.0191
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
4 observations deleted due to missingness
> mod18<-aov(decision ~ behavior4, data=datareal)
> summary(mod18)
Df Sum Sq Mean Sq F value Pr(>F)
behavior4
26 0.399 0.01533 0.769
0.787
Residuals
373 7.441 0.01995
> mod19<-aov(decision ~ behavior5, data=datareal)
> summary(mod20)
Error in summary(mod20) : object 'mod20' not found
> summary(mod19)
Df Sum Sq Mean Sq F value
Pr(>F)
behavior5
97 2.496 0.02573 1.454 0.00907 **
Residuals
302 5.344 0.01770
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> summary(mod20)
Error in summary(mod20) : object 'mod20' not found