-
Notifications
You must be signed in to change notification settings - Fork 0
/
MCS_UWS_.R
96 lines (67 loc) · 3.05 KB
/
MCS_UWS_.R
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
#####################################################################
#####################################################################
####### Using a subgroup of the data with only MCS and UWS #######
#####################################################################
#####################################################################
table_data_pks <- read.csv(file="/home/aldo/Documents/Projects/Avtivemeter/Data/group_table_pks.csv", header=TRUE, sep=",")
summary(table_data_pks)
# I want to consider only MCS and UWS
Group_MCS_UWS <- subset(table_data_pks, Group != 'EMCS')
summary(Group_MCS_UWS)
#pk1
Model_pks1 <- lm(Group_MCS_UWS$pk1 ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_pks1)
Anova(Model_pks1, type="II")
#pk2
Model_pks2 <- lm(Group_MCS_UWS$pk2 ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_pks2)
Anova(Model_pks2, type="II")
#pk3
Model_pks3 <- lm(Group_MCS_UWS$pk3 ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_pks3)
Anova(Model_pks3, type="II")
####################################################################################
################### MSA of the pks ###############################################
####################################################################################
#MSA pk1
Model_MSA_pks1 <- lm(Group_MCS_UWS$pk1_MSA ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_MSA_pks1)
Anova(Model_MSA_pks1, type="II")
#MSA pk2
Model_MSA_pks2 <- lm(Group_MCS_UWS$pk2_MSA ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_MSA_pks2)
Anova(Model_MSA_pks2, type="II")
#MSA pk3
Model_MSA_pks3 <- lm(Group_MCS_UWS$pk3_MSA ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_MSA_pks3)
Anova(Model_MSA_pks3, type="II")
####################################################################################
################### SE of the pks ################################################
####################################################################################
#SE pk1
Model_SE_pks1 <- lm(Group_MCS_UWS$pk1_SE ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_SE_pks1)
Anova(Model_SE_pks1, type="II")
#SE pk2
Model_SE_pks2 <- lm(Group_MCS_UWS$pk2_SE ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_SE_pks2)
Anova(Model_SE_pks2, type="II")
#SE pk3
Model_SE_pks3 <- lm(Group_MCS_UWS$pk3_SE ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_SE_pks3)
Anova(Model_SE_pks3, type="II")
####################################################################################
################### Mean, Std, CV, of SE #########################################
####################################################################################
#mean SE
Model_SE_mean <- lm(Group_MCS_UWS$mean_SE ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_SE_mean)
Anova(Model_SE_mean, type="II")
#std SE
Model_SE_std <- lm(Group_MCS_UWS$std_SE ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_SE_std)
Anova(Model_SE_std, type="II")
#cv SE
Model_SE_cv <- lm(Group_MCS_UWS$cv_SE ~ Group_MCS_UWS$Group*Group_MCS_UWS$Manu)
summary(Model_SE_cv)
Anova(Model_SE_cv, type="II")