#Import data

read.csv("R.csv") #All students N=65
##     ID    username    feedback ITS pre_test_type post_test_type class
## 1    1      gocola      effort  12             B              A     1
## 2    4      goniku      effort  12             B              A     1
## 3    5      gosoba      effort  12             B              A     1
## 4    7    gotamago      effort  12             B              A     1
## 5    8      gotofu      effort  10             B              A     1
## 6   28     yescola      effort  12             A              B     1
## 7   29     yesfugu      effort  12             A              B     1
## 8   30     yesmiso      effort  12             A              B     1
## 9   31     yesniku      effort  12             A              B     1
## 10  33    yessushi      effort  12             A              B     1
## 11  34   yestamago      effort  12             A              B     1
## 12  35     yestofu      effort  12             A              B     1
## 13  37     gogyoza      effort  12             B              A     2
## 14  38       goika      effort  12             B              A     2
## 15  39      gokaki      effort  12             B              A     2
## 16  40   goonigiri      effort  12             B              A     2
## 17  41     goramen      effort  12             B              A     2
## 18  42    gosakana      effort  12             B              A     2
## 19  43      gotako      effort  12             B              A     2
## 20  44     gounagi      effort  12             B              A     2
## 21  45      goyuba      effort  12             B              A     2
## 22  69   yessakana      effort  12             A              B     2
## 23  74       goimo      effort  12             B              A     3
## 24  75      gonabe      effort  12             B              A     3
## 25  76    gonigiri      effort  12             B              A     3
## 26  77      goocha      effort  12             B              A     3
## 27  79     gosomen      effort  12             B              A     3
## 28 100      yesice      effort  12             A              B     3
## 29 101      yesimo      effort  12             A              B     3
## 30 102     yesnabe      effort  12             A              B     3
## 31 103   yesnigiri      effort  12             A              B     3
## 32 105     yessake      effort  12             A              B     3
## 33 106    yessomen      effort  12             A              B     3
## 34 107  yestaiyaki      effort  12             A              B     3
## 35  10    nicecola performance  11             A              B     1
## 36  12    nicemiso performance  12             A              B     1
## 37  13    niceniku performance  12             A              B     1
## 38  15   nicesushi performance  12             A              B     1
## 39  16  nicetamago performance  12             A              B     1
## 40  20      okfugu performance  12             B              A     1
## 41  21      okmiso performance  12             B              A     1
## 42  23      oksoba performance  12             B              A     1
## 43  25    oktamago performance  12             B              A     1
## 44  26      oktofu performance  12             B              A     1
## 45  27      okudon performance  12             B              A     1
## 46  46   nicegyoza performance  12             A              B     2
## 47  48    nicekaki performance  12             A              B     2
## 48  49 niceonigiri performance  12             A              B     2
## 49  50   niceramen performance  12             A              B     2
## 50  51  nicesakana performance  12             A              B     2
## 51  52    nicetako performance  12             A              B     2
## 52  53   niceunagi performance  12             A              B     2
## 53  54    niceyuba performance  12             A              B     2
## 54  56       okika performance  12             B              A     2
## 55  57      okkaki performance  12             B              A     2
## 56  58   okonigiri performance  12             B              A     2
## 57  62     okunagi performance  12             B              A     2
## 58  63      okyuba performance  12             B              A     2
## 59  82     niceice performance  12             A              B     3
## 60  83     niceimo performance  12             A              B     3
## 61  87    nicesake performance  12             A              B     3
## 62  91       okice performance  12             B              A     3
## 63  93      oknabe performance  12             B              A     3
## 64  96      oksake performance  12             B              A     3
## 65  98   oktaiyaki performance  12             B              A     3
##    PreTest_Total_Score PostTest_Total_Score Post_Pre Intrinsic_Value
## 1                   14                   14        0              15
## 2                   13                   12       -1              10
## 3                    4                    6        2               6
## 4                    3                    9        6              10
## 5                   10                    8       -2              13
## 6                   13                   14        1              11
## 7                    9                   11        2               8
## 8                   12                   14        2              14
## 9                   12                   11       -1               8
## 10                  11                   11        0              15
## 11                   4                    3       -1               6
## 12                   3                   10        7               9
## 13                   3                    3        0               6
## 14                  14                   14        0              15
## 15                   9                    4       -5              15
## 16                  11                   12        1              13
## 17                   2                    1       -1              11
## 18                  14                   14        0              14
## 19                  13                   13        0              12
## 20                   5                    8        3               8
## 21                  12                   12        0              13
## 22                   8                   11        3               5
## 23                  11                    3       -8               5
## 24                   8                    6       -2              10
## 25                  10                   12        2              13
## 26                  12                   10       -2              15
## 27                   5                   10        5               8
## 28                   9                    6       -3               9
## 29                  13                   13        0              11
## 30                   7                    2       -5              12
## 31                  13                   13        0              13
## 32                  12                   14        2              15
## 33                   1                    0       -1               6
## 34                  14                   13       -1              12
## 35                   9                   11        2              13
## 36                   9                    9        0              11
## 37                   1                   14       13              14
## 38                   8                    8        0              11
## 39                   3                    3        0               9
## 40                  13                   13        0              13
## 41                  11                   14        3              12
## 42                   5                    9        4              14
## 43                   3                    4        1               7
## 44                  11                   14        3               7
## 45                  10                   12        2              12
## 46                   5                    2       -3              10
## 47                  12                   13        1              15
## 48                   8                   11        3              15
## 49                  11                   13        2               7
## 50                  14                   14        0              11
## 51                   2                    3        1               8
## 52                  13                   12       -1              13
## 53                   3                   12        9               7
## 54                  11                   13        2              14
## 55                  13                   14        1              13
## 56                  11                   10       -1               9
## 57                  12                   12        0               7
## 58                  12                    6       -6              11
## 59                   3                    1       -2               4
## 60                   2                   13       11               3
## 61                  12                   12        0              12
## 62                   8                   12        4              12
## 63                   5                    8        3              13
## 64                  11                   13        2              11
## 65                  14                   14        0               8
##    Self.regulation Self.efficacy Test_anxiety Survey_Total_Score
## 1               19            20           14                 68
## 2               16            13            8                 47
## 3               11            12            7                 36
## 4               15            12            9                 46
## 5               16            17           15                 61
## 6               16            11            4                 42
## 7               11             9           15                 43
## 8               20            19           16                 69
## 9               13            12            8                 41
## 10              16            17           13                 61
## 11              12            11            7                 36
## 12              13            14           14                 50
## 13              15             6            4                 31
## 14              20            20            6                 61
## 15              18            14           12                 59
## 16              19            17            5                 54
## 17              16            16            4                 47
## 18              18            20           17                 69
## 19              11            16           10                 49
## 20              11            12            8                 39
## 21              13            20           20                 66
## 22              15            11            7                 38
## 23              10             6            6                 27
## 24              11             9           14                 44
## 25              16            15           12                 56
## 26              15            13            7                 50
## 27              14             7            7                 36
## 28               8             7           12                 36
## 29              11            16           14                 52
## 30              18            17           15                 62
## 31              16            16           15                 60
## 32              14            18           18                 65
## 33               9             9            9                 33
## 34              16            18           17                 63
## 35              18            16           15                 62
## 36              15            15           16                 57
## 37              17            17           15                 63
## 38              15            15            4                 45
## 39              13            10            8                 40
## 40              18            19           17                 67
## 41              15            12           12                 51
## 42              13            11            5                 43
## 43              14            13            9                 43
## 44              14            11           13                 45
## 45              14            11           12                 49
## 46              16            11            4                 41
## 47              16            18           15                 64
## 48              17            16           17                 65
## 49              14             8            7                 36
## 50              16            17           13                 57
## 51               7             5            5                 25
## 52              14            18           16                 61
## 53              13            12           13                 45
## 54              18            20           14                 66
## 55              19            18           10                 60
## 56              14            12            9                 44
## 57              14            12            7                 40
## 58              13            12           17                 53
## 59              17            11            4                 36
## 60              11             4            5                 23
## 61              19            15            8                 54
## 62              14            17           14                 57
## 63              17            15           16                 61
## 64              11            13           11                 46
## 65               7             5            8                 28
read.csv("effort.csv") #Only effort group N=34
##     ID   username feedback ITS pre_test_type post_test_type class
## 1    1     gocola   effort  12             B              A     1
## 2    4     goniku   effort  12             B              A     1
## 3    5     gosoba   effort  12             B              A     1
## 4    7   gotamago   effort  12             B              A     1
## 5    8     gotofu   effort  10             B              A     1
## 6   28    yescola   effort  12             A              B     1
## 7   29    yesfugu   effort  12             A              B     1
## 8   30    yesmiso   effort  12             A              B     1
## 9   31    yesniku   effort  12             A              B     1
## 10  33   yessushi   effort  12             A              B     1
## 11  34  yestamago   effort  12             A              B     1
## 12  35    yestofu   effort  12             A              B     1
## 13  37    gogyoza   effort  12             B              A     2
## 14  38      goika   effort  12             B              A     2
## 15  39     gokaki   effort  12             B              A     2
## 16  40  goonigiri   effort  12             B              A     2
## 17  41    goramen   effort  12             B              A     2
## 18  42   gosakana   effort  12             B              A     2
## 19  43     gotako   effort  12             B              A     2
## 20  44    gounagi   effort  12             B              A     2
## 21  45     goyuba   effort  12             B              A     2
## 22  69  yessakana   effort  12             A              B     2
## 23  74      goimo   effort  12             B              A     3
## 24  75     gonabe   effort  12             B              A     3
## 25  76   gonigiri   effort  12             B              A     3
## 26  77     goocha   effort  12             B              A     3
## 27  79    gosomen   effort  12             B              A     3
## 28 100     yesice   effort  12             A              B     3
## 29 101     yesimo   effort  12             A              B     3
## 30 102    yesnabe   effort  12             A              B     3
## 31 103  yesnigiri   effort  12             A              B     3
## 32 105    yessake   effort  12             A              B     3
## 33 106   yessomen   effort  12             A              B     3
## 34 107 yestaiyaki   effort  12             A              B     3
##    PreTest_Total_Score PostTest_Total_Score Post_Pre Intrinsic_Value
## 1                   14                   14        0              15
## 2                   13                   12       -1              10
## 3                    4                    6        2               6
## 4                    3                    9        6              10
## 5                   10                    8       -2              13
## 6                   13                   14        1              11
## 7                    9                   11        2               8
## 8                   12                   14        2              14
## 9                   12                   11       -1               8
## 10                  11                   11        0              15
## 11                   4                    3       -1               6
## 12                   3                   10        7               9
## 13                   3                    3        0               6
## 14                  14                   14        0              15
## 15                   9                    4       -5              15
## 16                  11                   12        1              13
## 17                   2                    1       -1              11
## 18                  14                   14        0              14
## 19                  13                   13        0              12
## 20                   5                    8        3               8
## 21                  12                   12        0              13
## 22                   8                   11        3               5
## 23                  11                    3       -8               5
## 24                   8                    6       -2              10
## 25                  10                   12        2              13
## 26                  12                   10       -2              15
## 27                   5                   10        5               8
## 28                   9                    6       -3               9
## 29                  13                   13        0              11
## 30                   7                    2       -5              12
## 31                  13                   13        0              13
## 32                  12                   14        2              15
## 33                   1                    0       -1               6
## 34                  14                   13       -1              12
##    Self.regulation Self.efficacy Test_anxiety Survey_Total_Score
## 1               19            20           14                 68
## 2               16            13            8                 47
## 3               11            12            7                 36
## 4               15            12            9                 46
## 5               16            17           15                 61
## 6               16            11            4                 42
## 7               11             9           15                 43
## 8               20            19           16                 69
## 9               13            12            8                 41
## 10              16            17           13                 61
## 11              12            11            7                 36
## 12              13            14           14                 50
## 13              15             6            4                 31
## 14              20            20            6                 61
## 15              18            14           12                 59
## 16              19            17            5                 54
## 17              16            16            4                 47
## 18              18            20           17                 69
## 19              11            16           10                 49
## 20              11            12            8                 39
## 21              13            20           20                 66
## 22              15            11            7                 38
## 23              10             6            6                 27
## 24              11             9           14                 44
## 25              16            15           12                 56
## 26              15            13            7                 50
## 27              14             7            7                 36
## 28               8             7           12                 36
## 29              11            16           14                 52
## 30              18            17           15                 62
## 31              16            16           15                 60
## 32              14            18           18                 65
## 33               9             9            9                 33
## 34              16            18           17                 63
read.csv("performance.csv") #Only performance group N=31
##    ID    username    feedback ITS pre_test_type post_test_type class
## 1  10    nicecola performance  11             A              B     1
## 2  12    nicemiso performance  12             A              B     1
## 3  13    niceniku performance  12             A              B     1
## 4  15   nicesushi performance  12             A              B     1
## 5  16  nicetamago performance  12             A              B     1
## 6  20      okfugu performance  12             B              A     1
## 7  21      okmiso performance  12             B              A     1
## 8  23      oksoba performance  12             B              A     1
## 9  25    oktamago performance  12             B              A     1
## 10 26      oktofu performance  12             B              A     1
## 11 27      okudon performance  12             B              A     1
## 12 46   nicegyoza performance  12             A              B     2
## 13 48    nicekaki performance  12             A              B     2
## 14 49 niceonigiri performance  12             A              B     2
## 15 50   niceramen performance  12             A              B     2
## 16 51  nicesakana performance  12             A              B     2
## 17 52    nicetako performance  12             A              B     2
## 18 53   niceunagi performance  12             A              B     2
## 19 54    niceyuba performance  12             A              B     2
## 20 56       okika performance  12             B              A     2
## 21 57      okkaki performance  12             B              A     2
## 22 58   okonigiri performance  12             B              A     2
## 23 62     okunagi performance  12             B              A     2
## 24 63      okyuba performance  12             B              A     2
## 25 82     niceice performance  12             A              B     3
## 26 83     niceimo performance  12             A              B     3
## 27 87    nicesake performance  12             A              B     3
## 28 91       okice performance  12             B              A     3
## 29 93      oknabe performance  12             B              A     3
## 30 96      oksake performance  12             B              A     3
## 31 98   oktaiyaki performance  12             B              A     3
##    PreTest_Total_Score PostTest_Total_Score Post_Pre Intrinsic_Value
## 1                    9                   11        2              13
## 2                    9                    9        0              11
## 3                    1                   14       13              14
## 4                    8                    8        0              11
## 5                    3                    3        0               9
## 6                   13                   13        0              13
## 7                   11                   14        3              12
## 8                    5                    9        4              14
## 9                    3                    4        1               7
## 10                  11                   14        3               7
## 11                  10                   12        2              12
## 12                   5                    2       -3              10
## 13                  12                   13        1              15
## 14                   8                   11        3              15
## 15                  11                   13        2               7
## 16                  14                   14        0              11
## 17                   2                    3        1               8
## 18                  13                   12       -1              13
## 19                   3                   12        9               7
## 20                  11                   13        2              14
## 21                  13                   14        1              13
## 22                  11                   10       -1               9
## 23                  12                   12        0               7
## 24                  12                    6       -6              11
## 25                   3                    1       -2               4
## 26                   2                   13       11               3
## 27                  12                   12        0              12
## 28                   8                   12        4              12
## 29                   5                    8        3              13
## 30                  11                   13        2              11
## 31                  14                   14        0               8
##    Self.regulation Self.efficacy Test_anxiety Survey_Total_Score
## 1               18            16           15                 62
## 2               15            15           16                 57
## 3               17            17           15                 63
## 4               15            15            4                 45
## 5               13            10            8                 40
## 6               18            19           17                 67
## 7               15            12           12                 51
## 8               13            11            5                 43
## 9               14            13            9                 43
## 10              14            11           13                 45
## 11              14            11           12                 49
## 12              16            11            4                 41
## 13              16            18           15                 64
## 14              17            16           17                 65
## 15              14             8            7                 36
## 16              16            17           13                 57
## 17               7             5            5                 25
## 18              14            18           16                 61
## 19              13            12           13                 45
## 20              18            20           14                 66
## 21              19            18           10                 60
## 22              14            12            9                 44
## 23              14            12            7                 40
## 24              13            12           17                 53
## 25              17            11            4                 36
## 26              11             4            5                 23
## 27              19            15            8                 54
## 28              14            17           14                 57
## 29              17            15           16                 61
## 30              11            13           11                 46
## 31               7             5            8                 28
read.csv("R_value.csv") #Feedback(effort=1,performance=2)
##     ID feedback ITS class PreTest_Total_Score PostTest_Total_Score Post_Pre
## 1    1        1  12     1                  14                   14        0
## 2    4        1  12     1                  13                   12       -1
## 3    5        1  12     1                   4                    6        2
## 4    7        1  12     1                   3                    9        6
## 5    8        1  10     1                  10                    8       -2
## 6   28        1  12     1                  13                   14        1
## 7   29        1  12     1                   9                   11        2
## 8   30        1  12     1                  12                   14        2
## 9   31        1  12     1                  12                   11       -1
## 10  33        1  12     1                  11                   11        0
## 11  34        1  12     1                   4                    3       -1
## 12  35        1  12     1                   3                   10        7
## 13  37        1  12     2                   3                    3        0
## 14  38        1  12     2                  14                   14        0
## 15  39        1  12     2                   9                    4       -5
## 16  40        1  12     2                  11                   12        1
## 17  41        1  12     2                   2                    1       -1
## 18  42        1  12     2                  14                   14        0
## 19  43        1  12     2                  13                   13        0
## 20  44        1  12     2                   5                    8        3
## 21  45        1  12     2                  12                   12        0
## 22  69        1  12     2                   8                   11        3
## 23  74        1  12     3                  11                    3       -8
## 24  75        1  12     3                   8                    6       -2
## 25  76        1  12     3                  10                   12        2
## 26  77        1  12     3                  12                   10       -2
## 27  79        1  12     3                   5                   10        5
## 28 100        1  12     3                   9                    6       -3
## 29 101        1  12     3                  13                   13        0
## 30 102        1  12     3                   7                    2       -5
## 31 103        1  12     3                  13                   13        0
## 32 105        1  12     3                  12                   14        2
## 33 106        1  12     3                   1                    0       -1
## 34 107        1  12     3                  14                   13       -1
## 35  10        2  11     1                   9                   11        2
## 36  12        2  12     1                   9                    9        0
## 37  13        2  12     1                   1                   14       13
## 38  15        2  12     1                   8                    8        0
## 39  16        2  12     1                   3                    3        0
## 40  20        2  12     1                  13                   13        0
## 41  21        2  12     1                  11                   14        3
## 42  23        2  12     1                   5                    9        4
## 43  25        2  12     1                   3                    4        1
## 44  26        2  12     1                  11                   14        3
## 45  27        2  12     1                  10                   12        2
## 46  46        2  12     2                   5                    2       -3
## 47  48        2  12     2                  12                   13        1
## 48  49        2  12     2                   8                   11        3
## 49  50        2  12     2                  11                   13        2
## 50  51        2  12     2                  14                   14        0
## 51  52        2  12     2                   2                    3        1
## 52  53        2  12     2                  13                   12       -1
## 53  54        2  12     2                   3                   12        9
## 54  56        2  12     2                  11                   13        2
## 55  57        2  12     2                  13                   14        1
## 56  58        2  12     2                  11                   10       -1
## 57  62        2  12     2                  12                   12        0
## 58  63        2  12     2                  12                    6       -6
## 59  82        2  12     3                   3                    1       -2
## 60  83        2  12     3                   2                   13       11
## 61  87        2  12     3                  12                   12        0
## 62  91        2  12     3                   8                   12        4
## 63  93        2  12     3                   5                    8        3
## 64  96        2  12     3                  11                   13        2
## 65  98        2  12     3                  14                   14        0
##    Intrinsic_Value Self.regulation Self.efficacy Test_anxiety
## 1               15              19            20           14
## 2               10              16            13            8
## 3                6              11            12            7
## 4               10              15            12            9
## 5               13              16            17           15
## 6               11              16            11            4
## 7                8              11             9           15
## 8               14              20            19           16
## 9                8              13            12            8
## 10              15              16            17           13
## 11               6              12            11            7
## 12               9              13            14           14
## 13               6              15             6            4
## 14              15              20            20            6
## 15              15              18            14           12
## 16              13              19            17            5
## 17              11              16            16            4
## 18              14              18            20           17
## 19              12              11            16           10
## 20               8              11            12            8
## 21              13              13            20           20
## 22               5              15            11            7
## 23               5              10             6            6
## 24              10              11             9           14
## 25              13              16            15           12
## 26              15              15            13            7
## 27               8              14             7            7
## 28               9               8             7           12
## 29              11              11            16           14
## 30              12              18            17           15
## 31              13              16            16           15
## 32              15              14            18           18
## 33               6               9             9            9
## 34              12              16            18           17
## 35              13              18            16           15
## 36              11              15            15           16
## 37              14              17            17           15
## 38              11              15            15            4
## 39               9              13            10            8
## 40              13              18            19           17
## 41              12              15            12           12
## 42              14              13            11            5
## 43               7              14            13            9
## 44               7              14            11           13
## 45              12              14            11           12
## 46              10              16            11            4
## 47              15              16            18           15
## 48              15              17            16           17
## 49               7              14             8            7
## 50              11              16            17           13
## 51               8               7             5            5
## 52              13              14            18           16
## 53               7              13            12           13
## 54              14              18            20           14
## 55              13              19            18           10
## 56               9              14            12            9
## 57               7              14            12            7
## 58              11              13            12           17
## 59               4              17            11            4
## 60               3              11             4            5
## 61              12              19            15            8
## 62              12              14            17           14
## 63              13              17            15           16
## 64              11              11            13           11
## 65               8               7             5            8
##    Survey_Total_Score
## 1                  68
## 2                  47
## 3                  36
## 4                  46
## 5                  61
## 6                  42
## 7                  43
## 8                  69
## 9                  41
## 10                 61
## 11                 36
## 12                 50
## 13                 31
## 14                 61
## 15                 59
## 16                 54
## 17                 47
## 18                 69
## 19                 49
## 20                 39
## 21                 66
## 22                 38
## 23                 27
## 24                 44
## 25                 56
## 26                 50
## 27                 36
## 28                 36
## 29                 52
## 30                 62
## 31                 60
## 32                 65
## 33                 33
## 34                 63
## 35                 62
## 36                 57
## 37                 63
## 38                 45
## 39                 40
## 40                 67
## 41                 51
## 42                 43
## 43                 43
## 44                 45
## 45                 49
## 46                 41
## 47                 64
## 48                 65
## 49                 36
## 50                 57
## 51                 25
## 52                 61
## 53                 45
## 54                 66
## 55                 60
## 56                 44
## 57                 40
## 58                 53
## 59                 36
## 60                 23
## 61                 54
## 62                 57
## 63                 61
## 64                 46
## 65                 28
read.csv("Latency.csv") #Latency N=65-3 (3:Too long Latency seconds in Q1)
##     ID    username Sum_of_Latency    feedback ITS pre_test_type post_test_type
## 1    1      gocola            492      effort  12             B              A
## 2   37     gogyoza           1367      effort  12             B              A
## 3   38       goika            936      effort  12             B              A
## 4   74       goimo           1762      effort  12             B              A
## 5   39      gokaki            767      effort  12             B              A
## 6   75      gonabe            863      effort  12             B              A
## 7   76    gonigiri            653      effort  12             B              A
## 8    4      goniku           1158      effort  12             B              A
## 9   77      goocha           2456      effort  12             B              A
## 10  40   goonigiri           1325      effort  12             B              A
## 11  41     goramen            607      effort  12             B              A
## 12  42    gosakana            729      effort  12             B              A
## 13   5      gosoba           1619      effort  12             B              A
## 14  79     gosomen           2242      effort  12             B              A
## 15  43      gotako           1622      effort  12             B              A
## 16   7    gotamago           1026      effort  12             B              A
## 17   8      gotofu           1250      effort  10             B              A
## 18  44     gounagi           2932      effort  12             B              A
## 19  45      goyuba            923      effort  12             B              A
## 20  10    nicecola            553 performance  11             A              B
## 21  46   nicegyoza           1232 performance  12             A              B
## 22  82     niceice            735 performance  12             A              B
## 23  83     niceimo           1190 performance  12             A              B
## 24  48    nicekaki            817 performance  12             A              B
## 25  12    nicemiso            892 performance  12             A              B
## 26  13    niceniku            941 performance  12             A              B
## 27  49 niceonigiri            646 performance  12             A              B
## 28  50   niceramen            766 performance  12             A              B
## 29  51  nicesakana           1382 performance  12             A              B
## 30  15   nicesushi           1618 performance  12             A              B
## 31  52    nicetako           1826 performance  12             A              B
## 32  16  nicetamago           1434 performance  12             A              B
## 33  53   niceunagi            790 performance  12             A              B
## 34  54    niceyuba            990 performance  12             A              B
## 35  20      okfugu            859 performance  12             B              A
## 36  91       okice           2485 performance  12             B              A
## 37  56       okika           1355 performance  12             B              A
## 38  57      okkaki            931 performance  12             B              A
## 39  21      okmiso           1144 performance  12             B              A
## 40  58   okonigiri            913 performance  12             B              A
## 41  23      oksoba            691 performance  12             B              A
## 42  98   oktaiyaki            957 performance  12             B              A
## 43  25    oktamago           1428 performance  12             B              A
## 44  26      oktofu           1473 performance  12             B              A
## 45  27      okudon           1407 performance  12             B              A
## 46  62     okunagi           1037 performance  12             B              A
## 47  63      okyuba            665 performance  12             B              A
## 48  28     yescola           1413      effort  12             A              B
## 49  29     yesfugu           1157      effort  12             A              B
## 50 100      yesice            713      effort  12             A              B
## 51 101      yesimo            826      effort  12             A              B
## 52  30     yesmiso           1322      effort  12             A              B
## 53 102     yesnabe            701      effort  12             A              B
## 54  87    nicesake             NA performance  12             A              B
## 55 103   yesnigiri            876      effort  12             A              B
## 56  93      oknabe             NA performance  12             B              A
## 57  96      oksake             NA performance  12             B              A
## 58  31     yesniku            925      effort  12             A              B
## 59  69   yessakana           1061      effort  12             A              B
## 60 105     yessake            911      effort  12             A              B
## 61 106    yessomen            742      effort  12             A              B
## 62  33    yessushi           1532      effort  12             A              B
## 63 107  yestaiyaki            714      effort  12             A              B
## 64  34   yestamago            665      effort  12             A              B
## 65  35     yestofu            842      effort  12             A              B
##    class PreTest_Total_Score PostTest_Total_Score Post_Pre Intrinsic_Value
## 1      1                  14                   14        0              15
## 2      2                   3                    3        0               6
## 3      2                  14                   14        0              15
## 4      3                  11                    3       -8               5
## 5      2                   9                    4       -5              15
## 6      3                   8                    6       -2              10
## 7      3                  10                   12        2              13
## 8      1                  13                   12       -1              10
## 9      3                  12                   10       -2              15
## 10     2                  11                   12        1              13
## 11     2                   2                    1       -1              11
## 12     2                  14                   14        0              14
## 13     1                   4                    6        2               6
## 14     3                   5                   10        5               8
## 15     2                  13                   13        0              12
## 16     1                   3                    9        6              10
## 17     1                  10                    8       -2              13
## 18     2                   5                    8        3               8
## 19     2                  12                   12        0              13
## 20     1                   9                   11        2              13
## 21     2                   5                    2       -3              10
## 22     3                   3                    1       -2               4
## 23     3                   2                   13       11               3
## 24     2                  12                   13        1              15
## 25     1                   9                    9        0              11
## 26     1                   1                   14       13              14
## 27     2                   8                   11        3              15
## 28     2                  11                   13        2               7
## 29     2                  14                   14        0              11
## 30     1                   8                    8        0              11
## 31     2                   2                    3        1               8
## 32     1                   3                    3        0               9
## 33     2                  13                   12       -1              13
## 34     2                   3                   12        9               7
## 35     1                  13                   13        0              13
## 36     3                   8                   12        4              12
## 37     2                  11                   13        2              14
## 38     2                  13                   14        1              13
## 39     1                  11                   14        3              12
## 40     2                  11                   10       -1               9
## 41     1                   5                    9        4              14
## 42     3                  14                   14        0               8
## 43     1                   3                    4        1               7
## 44     1                  11                   14        3               7
## 45     1                  10                   12        2              12
## 46     2                  12                   12        0               7
## 47     2                  12                    6       -6              11
## 48     1                  13                   14        1              11
## 49     1                   9                   11        2               8
## 50     3                   9                    6       -3               9
## 51     3                  13                   13        0              11
## 52     1                  12                   14        2              14
## 53     3                   7                    2       -5              12
## 54     3                  12                   12        0              12
## 55     3                  13                   13        0              13
## 56     3                   5                    8        3              13
## 57     3                  11                   13        2              11
## 58     1                  12                   11       -1               8
## 59     2                   8                   11        3               5
## 60     3                  12                   14        2              15
## 61     3                   1                    0       -1               6
## 62     1                  11                   11        0              15
## 63     3                  14                   13       -1              12
## 64     1                   4                    3       -1               6
## 65     1                   3                   10        7               9
##    Self.regulation Self.efficacy Test_anxiety Survey_Total_Score
## 1               19            20           14                 68
## 2               15             6            4                 31
## 3               20            20            6                 61
## 4               10             6            6                 27
## 5               18            14           12                 59
## 6               11             9           14                 44
## 7               16            15           12                 56
## 8               16            13            8                 47
## 9               15            13            7                 50
## 10              19            17            5                 54
## 11              16            16            4                 47
## 12              18            20           17                 69
## 13              11            12            7                 36
## 14              14             7            7                 36
## 15              11            16           10                 49
## 16              15            12            9                 46
## 17              16            17           15                 61
## 18              11            12            8                 39
## 19              13            20           20                 66
## 20              18            16           15                 62
## 21              16            11            4                 41
## 22              17            11            4                 36
## 23              11             4            5                 23
## 24              16            18           15                 64
## 25              15            15           16                 57
## 26              17            17           15                 63
## 27              17            16           17                 65
## 28              14             8            7                 36
## 29              16            17           13                 57
## 30              15            15            4                 45
## 31               7             5            5                 25
## 32              13            10            8                 40
## 33              14            18           16                 61
## 34              13            12           13                 45
## 35              18            19           17                 67
## 36              14            17           14                 57
## 37              18            20           14                 66
## 38              19            18           10                 60
## 39              15            12           12                 51
## 40              14            12            9                 44
## 41              13            11            5                 43
## 42               7             5            8                 28
## 43              14            13            9                 43
## 44              14            11           13                 45
## 45              14            11           12                 49
## 46              14            12            7                 40
## 47              13            12           17                 53
## 48              16            11            4                 42
## 49              11             9           15                 43
## 50               8             7           12                 36
## 51              11            16           14                 52
## 52              20            19           16                 69
## 53              18            17           15                 62
## 54              19            15            8                 54
## 55              16            16           15                 60
## 56              17            15           16                 61
## 57              11            13           11                 46
## 58              13            12            8                 41
## 59              15            11            7                 38
## 60              14            18           18                 65
## 61               9             9            9                 33
## 62              16            17           13                 61
## 63              16            18           17                 63
## 64              12            11            7                 36
## 65              13            14           14                 50
read.csv("Latency_effort.csv") 
##     ID   username Sum_of_Latency feedback ITS pre_test_type post_test_type
## 1    1     gocola            492   effort  12             B              A
## 2   37    gogyoza           1367   effort  12             B              A
## 3   38      goika            936   effort  12             B              A
## 4   74      goimo           1762   effort  12             B              A
## 5   39     gokaki            767   effort  12             B              A
## 6   75     gonabe            863   effort  12             B              A
## 7   76   gonigiri            653   effort  12             B              A
## 8    4     goniku           1158   effort  12             B              A
## 9   77     goocha           2456   effort  12             B              A
## 10  40  goonigiri           1325   effort  12             B              A
## 11  41    goramen            607   effort  12             B              A
## 12  42   gosakana            729   effort  12             B              A
## 13   5     gosoba           1619   effort  12             B              A
## 14  79    gosomen           2242   effort  12             B              A
## 15  43     gotako           1622   effort  12             B              A
## 16   7   gotamago           1026   effort  12             B              A
## 17   8     gotofu           1250   effort  10             B              A
## 18  44    gounagi           2932   effort  12             B              A
## 19  45     goyuba            923   effort  12             B              A
## 20  28    yescola           1413   effort  12             A              B
## 21  29    yesfugu           1157   effort  12             A              B
## 22 100     yesice            713   effort  12             A              B
## 23 101     yesimo            826   effort  12             A              B
## 24  30    yesmiso           1322   effort  12             A              B
## 25 102    yesnabe            701   effort  12             A              B
## 26 103  yesnigiri            876   effort  12             A              B
## 27  31    yesniku            925   effort  12             A              B
## 28  69  yessakana           1061   effort  12             A              B
## 29 105    yessake            911   effort  12             A              B
## 30 106   yessomen            742   effort  12             A              B
## 31  33   yessushi           1532   effort  12             A              B
## 32 107 yestaiyaki            714   effort  12             A              B
## 33  34  yestamago            665   effort  12             A              B
## 34  35    yestofu            842   effort  12             A              B
##    class PreTest_Total_Score PostTest_Total_Score Post_Pre Intrinsic_Value
## 1      1                  14                   14        0              15
## 2      2                   3                    3        0               6
## 3      2                  14                   14        0              15
## 4      3                  11                    3       -8               5
## 5      2                   9                    4       -5              15
## 6      3                   8                    6       -2              10
## 7      3                  10                   12        2              13
## 8      1                  13                   12       -1              10
## 9      3                  12                   10       -2              15
## 10     2                  11                   12        1              13
## 11     2                   2                    1       -1              11
## 12     2                  14                   14        0              14
## 13     1                   4                    6        2               6
## 14     3                   5                   10        5               8
## 15     2                  13                   13        0              12
## 16     1                   3                    9        6              10
## 17     1                  10                    8       -2              13
## 18     2                   5                    8        3               8
## 19     2                  12                   12        0              13
## 20     1                  13                   14        1              11
## 21     1                   9                   11        2               8
## 22     3                   9                    6       -3               9
## 23     3                  13                   13        0              11
## 24     1                  12                   14        2              14
## 25     3                   7                    2       -5              12
## 26     3                  13                   13        0              13
## 27     1                  12                   11       -1               8
## 28     2                   8                   11        3               5
## 29     3                  12                   14        2              15
## 30     3                   1                    0       -1               6
## 31     1                  11                   11        0              15
## 32     3                  14                   13       -1              12
## 33     1                   4                    3       -1               6
## 34     1                   3                   10        7               9
##    Self.regulation Self.efficacy Test_anxiety Survey_Total_Score
## 1               19            20           14                 68
## 2               15             6            4                 31
## 3               20            20            6                 61
## 4               10             6            6                 27
## 5               18            14           12                 59
## 6               11             9           14                 44
## 7               16            15           12                 56
## 8               16            13            8                 47
## 9               15            13            7                 50
## 10              19            17            5                 54
## 11              16            16            4                 47
## 12              18            20           17                 69
## 13              11            12            7                 36
## 14              14             7            7                 36
## 15              11            16           10                 49
## 16              15            12            9                 46
## 17              16            17           15                 61
## 18              11            12            8                 39
## 19              13            20           20                 66
## 20              16            11            4                 42
## 21              11             9           15                 43
## 22               8             7           12                 36
## 23              11            16           14                 52
## 24              20            19           16                 69
## 25              18            17           15                 62
## 26              16            16           15                 60
## 27              13            12            8                 41
## 28              15            11            7                 38
## 29              14            18           18                 65
## 30               9             9            9                 33
## 31              16            17           13                 61
## 32              16            18           17                 63
## 33              12            11            7                 36
## 34              13            14           14                 50
read.csv("Latency_performance.csv")
##    ID    username Sum_of_Latency    feedback ITS pre_test_type post_test_type
## 1  10    nicecola            553 performance  11             A              B
## 2  46   nicegyoza           1232 performance  12             A              B
## 3  82     niceice            735 performance  12             A              B
## 4  83     niceimo           1190 performance  12             A              B
## 5  48    nicekaki            817 performance  12             A              B
## 6  12    nicemiso            892 performance  12             A              B
## 7  13    niceniku            941 performance  12             A              B
## 8  49 niceonigiri            646 performance  12             A              B
## 9  50   niceramen            766 performance  12             A              B
## 10 51  nicesakana           1382 performance  12             A              B
## 11 15   nicesushi           1618 performance  12             A              B
## 12 52    nicetako           1826 performance  12             A              B
## 13 16  nicetamago           1434 performance  12             A              B
## 14 53   niceunagi            790 performance  12             A              B
## 15 54    niceyuba            990 performance  12             A              B
## 16 20      okfugu            859 performance  12             B              A
## 17 91       okice           2485 performance  12             B              A
## 18 56       okika           1355 performance  12             B              A
## 19 57      okkaki            931 performance  12             B              A
## 20 21      okmiso           1144 performance  12             B              A
## 21 58   okonigiri            913 performance  12             B              A
## 22 23      oksoba            691 performance  12             B              A
## 23 98   oktaiyaki            957 performance  12             B              A
## 24 25    oktamago           1428 performance  12             B              A
## 25 26      oktofu           1473 performance  12             B              A
## 26 27      okudon           1407 performance  12             B              A
## 27 62     okunagi           1037 performance  12             B              A
## 28 63      okyuba            665 performance  12             B              A
## 29 87    nicesake             NA performance  12             A              B
## 30 93      oknabe             NA performance  12             B              A
## 31 96      oksake             NA performance  12             B              A
##    class PreTest_Total_Score PostTest_Total_Score Post_Pre Intrinsic_Value
## 1      1                   9                   11        2              13
## 2      2                   5                    2       -3              10
## 3      3                   3                    1       -2               4
## 4      3                   2                   13       11               3
## 5      2                  12                   13        1              15
## 6      1                   9                    9        0              11
## 7      1                   1                   14       13              14
## 8      2                   8                   11        3              15
## 9      2                  11                   13        2               7
## 10     2                  14                   14        0              11
## 11     1                   8                    8        0              11
## 12     2                   2                    3        1               8
## 13     1                   3                    3        0               9
## 14     2                  13                   12       -1              13
## 15     2                   3                   12        9               7
## 16     1                  13                   13        0              13
## 17     3                   8                   12        4              12
## 18     2                  11                   13        2              14
## 19     2                  13                   14        1              13
## 20     1                  11                   14        3              12
## 21     2                  11                   10       -1               9
## 22     1                   5                    9        4              14
## 23     3                  14                   14        0               8
## 24     1                   3                    4        1               7
## 25     1                  11                   14        3               7
## 26     1                  10                   12        2              12
## 27     2                  12                   12        0               7
## 28     2                  12                    6       -6              11
## 29     3                  12                   12        0              12
## 30     3                   5                    8        3              13
## 31     3                  11                   13        2              11
##    Self.regulation Self.efficacy Test_anxiety Survey_Total_Score
## 1               18            16           15                 62
## 2               16            11            4                 41
## 3               17            11            4                 36
## 4               11             4            5                 23
## 5               16            18           15                 64
## 6               15            15           16                 57
## 7               17            17           15                 63
## 8               17            16           17                 65
## 9               14             8            7                 36
## 10              16            17           13                 57
## 11              15            15            4                 45
## 12               7             5            5                 25
## 13              13            10            8                 40
## 14              14            18           16                 61
## 15              13            12           13                 45
## 16              18            19           17                 67
## 17              14            17           14                 57
## 18              18            20           14                 66
## 19              19            18           10                 60
## 20              15            12           12                 51
## 21              14            12            9                 44
## 22              13            11            5                 43
## 23               7             5            8                 28
## 24              14            13            9                 43
## 25              14            11           13                 45
## 26              14            11           12                 49
## 27              14            12            7                 40
## 28              13            12           17                 53
## 29              19            15            8                 54
## 30              17            15           16                 61
## 31              11            13           11                 46
read.csv("Latency_value.csv") 
##     ID Sum_of_Latency feedback ITS class PreTest_Total_Score
## 1    1            492        1  12     1                  14
## 2   37           1367        1  12     2                   3
## 3   38            936        1  12     2                  14
## 4   74           1762        1  12     3                  11
## 5   39            767        1  12     2                   9
## 6   75            863        1  12     3                   8
## 7   76            653        1  12     3                  10
## 8    4           1158        1  12     1                  13
## 9   77           2456        1  12     3                  12
## 10  40           1325        1  12     2                  11
## 11  41            607        1  12     2                   2
## 12  42            729        1  12     2                  14
## 13   5           1619        1  12     1                   4
## 14  79           2242        1  12     3                   5
## 15  43           1622        1  12     2                  13
## 16   7           1026        1  12     1                   3
## 17   8           1250        1  10     1                  10
## 18  44           2932        1  12     2                   5
## 19  45            923        1  12     2                  12
## 20  10            553        2  11     1                   9
## 21  46           1232        2  12     2                   5
## 22  82            735        2  12     3                   3
## 23  83           1190        2  12     3                   2
## 24  48            817        2  12     2                  12
## 25  12            892        2  12     1                   9
## 26  13            941        2  12     1                   1
## 27  49            646        2  12     2                   8
## 28  50            766        2  12     2                  11
## 29  51           1382        2  12     2                  14
## 30  15           1618        2  12     1                   8
## 31  52           1826        2  12     2                   2
## 32  16           1434        2  12     1                   3
## 33  53            790        2  12     2                  13
## 34  54            990        2  12     2                   3
## 35  20            859        2  12     1                  13
## 36  91           2485        2  12     3                   8
## 37  56           1355        2  12     2                  11
## 38  57            931        2  12     2                  13
## 39  21           1144        2  12     1                  11
## 40  58            913        2  12     2                  11
## 41  23            691        2  12     1                   5
## 42  98            957        2  12     3                  14
## 43  25           1428        2  12     1                   3
## 44  26           1473        2  12     1                  11
## 45  27           1407        2  12     1                  10
## 46  62           1037        2  12     2                  12
## 47  63            665        2  12     2                  12
## 48  28           1413        1  12     1                  13
## 49  29           1157        1  12     1                   9
## 50 100            713        1  12     3                   9
## 51 101            826        1  12     3                  13
## 52  30           1322        1  12     1                  12
## 53 102            701        1  12     3                   7
## 54 103            876        1  12     3                  13
## 55  31            925        1  12     1                  12
## 56  69           1061        1  12     2                   8
## 57 105            911        1  12     3                  12
## 58 106            742        1  12     3                   1
## 59  33           1532        1  12     1                  11
## 60 107            714        1  12     3                  14
## 61  34            665        1  12     1                   4
## 62  35            842        1  12     1                   3
##    PostTest_Total_Score Post_Pre Intrinsic_Value Self.regulation Self.efficacy
## 1                    14        0              15              19            20
## 2                     3        0               6              15             6
## 3                    14        0              15              20            20
## 4                     3       -8               5              10             6
## 5                     4       -5              15              18            14
## 6                     6       -2              10              11             9
## 7                    12        2              13              16            15
## 8                    12       -1              10              16            13
## 9                    10       -2              15              15            13
## 10                   12        1              13              19            17
## 11                    1       -1              11              16            16
## 12                   14        0              14              18            20
## 13                    6        2               6              11            12
## 14                   10        5               8              14             7
## 15                   13        0              12              11            16
## 16                    9        6              10              15            12
## 17                    8       -2              13              16            17
## 18                    8        3               8              11            12
## 19                   12        0              13              13            20
## 20                   11        2              13              18            16
## 21                    2       -3              10              16            11
## 22                    1       -2               4              17            11
## 23                   13       11               3              11             4
## 24                   13        1              15              16            18
## 25                    9        0              11              15            15
## 26                   14       13              14              17            17
## 27                   11        3              15              17            16
## 28                   13        2               7              14             8
## 29                   14        0              11              16            17
## 30                    8        0              11              15            15
## 31                    3        1               8               7             5
## 32                    3        0               9              13            10
## 33                   12       -1              13              14            18
## 34                   12        9               7              13            12
## 35                   13        0              13              18            19
## 36                   12        4              12              14            17
## 37                   13        2              14              18            20
## 38                   14        1              13              19            18
## 39                   14        3              12              15            12
## 40                   10       -1               9              14            12
## 41                    9        4              14              13            11
## 42                   14        0               8               7             5
## 43                    4        1               7              14            13
## 44                   14        3               7              14            11
## 45                   12        2              12              14            11
## 46                   12        0               7              14            12
## 47                    6       -6              11              13            12
## 48                   14        1              11              16            11
## 49                   11        2               8              11             9
## 50                    6       -3               9               8             7
## 51                   13        0              11              11            16
## 52                   14        2              14              20            19
## 53                    2       -5              12              18            17
## 54                   13        0              13              16            16
## 55                   11       -1               8              13            12
## 56                   11        3               5              15            11
## 57                   14        2              15              14            18
## 58                    0       -1               6               9             9
## 59                   11        0              15              16            17
## 60                   13       -1              12              16            18
## 61                    3       -1               6              12            11
## 62                   10        7               9              13            14
##    Test_anxiety Survey_Total_Score
## 1            14                 68
## 2             4                 31
## 3             6                 61
## 4             6                 27
## 5            12                 59
## 6            14                 44
## 7            12                 56
## 8             8                 47
## 9             7                 50
## 10            5                 54
## 11            4                 47
## 12           17                 69
## 13            7                 36
## 14            7                 36
## 15           10                 49
## 16            9                 46
## 17           15                 61
## 18            8                 39
## 19           20                 66
## 20           15                 62
## 21            4                 41
## 22            4                 36
## 23            5                 23
## 24           15                 64
## 25           16                 57
## 26           15                 63
## 27           17                 65
## 28            7                 36
## 29           13                 57
## 30            4                 45
## 31            5                 25
## 32            8                 40
## 33           16                 61
## 34           13                 45
## 35           17                 67
## 36           14                 57
## 37           14                 66
## 38           10                 60
## 39           12                 51
## 40            9                 44
## 41            5                 43
## 42            8                 28
## 43            9                 43
## 44           13                 45
## 45           12                 49
## 46            7                 40
## 47           17                 53
## 48            4                 42
## 49           15                 43
## 50           12                 36
## 51           14                 52
## 52           16                 69
## 53           15                 62
## 54           15                 60
## 55            8                 41
## 56            7                 38
## 57           18                 65
## 58            9                 33
## 59           13                 61
## 60           17                 63
## 61            7                 36
## 62           14                 50
setwd("/Users/satoushintarou/Desktop/Master thesis/大宮北小/Data") #Directory


data<-read.csv("R.csv") 
datae<-read.csv("effort.csv") 
datap<-read.csv("performance.csv") 
datav<-read.csv("R_value.csv")

datalatency<-read.csv("Latency.csv")
datalatencye<-read.csv("Latency_effort.csv")
datalatencyp<-read.csv("Latency_performance.csv")
datalatencyv<-read.csv("Latency_value.csv")

#Demographic

#All Students (N=65)
table(data$feedback)
## 
##      effort performance 
##          34          31
#Pre-test/All Students (N=65)
mean(data$PreTest_Total_Score)
## [1] 8.907692
sd(data$PreTest_Total_Score)
## [1] 4.076315
median(data$PreTest_Total_Score)
## [1] 10
hist(data$PreTest_Total_Score,main="PreTest_Total_Score/All students (N=65)",ylim=c(0,15))

#Post-test/All Students (N=65)
mean(data$PostTest_Total_Score)
## [1] 9.784615
sd(data$PostTest_Total_Score)
## [1] 4.173923
median(data$PostTest_Total_Score)
## [1] 11
hist(data$PostTest_Total_Score,main="PostTest_Total_Score/All students (N=65)",ylim=c(0,15))

#Pre-test/effort group (N=34)
mean(datae$PreTest_Total_Score)
## [1] 9.235294
sd(datae$PreTest_Total_Score)
## [1] 4.068049
median(datae$PreTest_Total_Score)
## [1] 10.5
hist(datae$PreTest_Total_Score,main="PreTest_Total_Score/Effort group (N=34)",ylim=c(0,15))

#Post-test/effort group (N=34) 
mean(datae$PostTest_Total_Score)
## [1] 9.323529
sd(datae$PostTest_Total_Score)
## [1] 4.339533
median(datae$PostTest_Total_Score)
## [1] 11
hist(datae$PostTest_Total_Score,main="PostTest_Total_Score/Effort group (N=34)",ylim=c(0,15))

#Pre-test/performance group (N=31)
mean(datap$PreTest_Total_Score)
## [1] 8.548387
sd(datap$PreTest_Total_Score)
## [1] 4.121801
median(datap$PreTest_Total_Score)
## [1] 10
hist(datap$PreTest_Total_Score,main="PreTest_Total_Score/Performance group (N=31)",ylim=c(0,15))

#Post-test/performance group (N=31)
mean(datap$PostTest_Total_Score)
## [1] 10.29032
sd(datap$PostTest_Total_Score)
## [1] 3.993274
median(datap$PostTest_Total_Score)
## [1] 12
hist(datap$PostTest_Total_Score,main="PostTest_Total_Score/Performance group (N=31)",ylim=c(0,15))

#Latency(学習時間) #All Students (N=65-3, 3:Exculuded Studetns Too long Latency seconds in Q1)

#Comment: Not significant difference between the effort and performance group.

#T-test
#Sum of Latency (seconds) of total 11 math problems on ITS
#effort vs performance group
var.test(datalatencye$Sum_of_Latency,datalatencyp$Sum_of_Latency)#等分散
## 
##  F test to compare two variances
## 
## data:  datalatencye$Sum_of_Latency and datalatencyp$Sum_of_Latency
## F = 1.705, num df = 33, denom df = 27, p-value = 0.1589
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.8078479 3.5021008
## sample estimates:
## ratio of variances 
##           1.704953
t.test(Sum_of_Latency ~ feedback, var.equal=T,data = datalatency)
## 
##  Two Sample t-test
## 
## data:  Sum_of_Latency by feedback
## t = 0.29926, df = 60, p-value = 0.7658
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -216.5814  292.7873
## sample estimates:
##      mean in group effort mean in group performance 
##                  1150.853                  1112.750

#Analysis 1 #Compare Pre- vs. Post-Test #All Students (N=65)

#Comment:Overall, the test score increased significantly before and after the ITS learning activity. 

#T-test 
#Pre-test and Post-test
#p-value = 0.04363 
t.test(data$PreTest_Total_Score, data$PostTest_Total_Score, paired=TRUE)
## 
##  Paired t-test
## 
## data:  data$PreTest_Total_Score and data$PostTest_Total_Score
## t = -2.0584, df = 64, p-value = 0.04363
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
##  -1.72799831 -0.02584785
## sample estimates:
## mean difference 
##      -0.8769231

#Analysis 2 #Compare Pre-Test / Effort vs. Performance Group #Compare Post-Test / Effort vs. Performance Group

#Comment:No significant difference in the pre- and post-test between the effort and performance group. 

#T-test
#Pre-test between the effort and performance group
#p-value = 0.502
var.test(datae$PreTest_Total_Score,datap$PreTest_Total_Score)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$PreTest_Total_Score and datap$PreTest_Total_Score
## F = 0.97409, num df = 33, denom df = 30, p-value = 0.9373
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.4750086 1.9733731
## sample estimates:
## ratio of variances 
##          0.9740879
t.test(PreTest_Total_Score ~ feedback, var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  PreTest_Total_Score by feedback
## t = 0.67568, df = 63, p-value = 0.5017
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -1.344633  2.718447
## sample estimates:
##      mean in group effort mean in group performance 
##                  9.235294                  8.548387
#T-test
#Post-test between the effort and performance group
#p-value = 0.355
var.test(datae$PostTest_Total_Score,datap$PostTest_Total_Score)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$PostTest_Total_Score and datap$PostTest_Total_Score
## F = 1.1809, num df = 33, denom df = 30, p-value = 0.6484
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.5758789 2.3924284
## sample estimates:
## ratio of variances 
##            1.18094
t.test(PostTest_Total_Score ~ feedback, var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  PostTest_Total_Score by feedback
## t = -0.93176, df = 63, p-value = 0.355
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -3.040265  1.106678
## sample estimates:
##      mean in group effort mean in group performance 
##                  9.323529                 10.290323

#Graph #Compare Pre-Test / Effort vs. Performance Group

#mean/sdの確認
#effort
mean(datae$PreTest_Total_Score)
## [1] 9.235294
sd(datae$PreTest_Total_Score)
## [1] 4.068049
#performance
mean(datap$PreTest_Total_Score)
## [1] 8.548387
sd(datap$PreTest_Total_Score)
## [1] 4.121801
# グラフの描画に必要なデータの入力
bardata <- data.frame(
  Condition = c("Effort", "Performance"),
  Mean = c(mean(datae$PreTest_Total_Score), mean(datap$PreTest_Total_Score)),
  SD = c(sd(datae$PreTest_Total_Score), sd(datap$PreTest_Total_Score))
)

# ggplot2を使用してグラフを描画
library(ggplot2)

ggplot(bardata, aes(x = Condition, y = Mean, fill = Condition)) +
  geom_bar(stat = "identity", position = "dodge", width = 0.7) +
  geom_errorbar(
    aes(ymin = Mean - SD, ymax = Mean + SD),
    position = position_dodge(0.7),
    width = 0.2,
    size = 1
  ) +
  labs(
    title = "Pore-test/All Students (N=65)",
    x = " ",
    y = "Score"
  ) +
  
  scale_y_continuous(limits = c(0, 15), breaks = seq(0, 15, 5)) +  # y軸の範囲をに設定
  theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

#Graph #Compare Post-Test / Effort vs. Performance Group

#mean/sdの確認
#effort
mean(datae$PostTest_Total_Score)
## [1] 9.323529
sd(datae$PostTest_Total_Score)
## [1] 4.339533
#performance
mean(datap$PostTest_Total_Score)
## [1] 10.29032
sd(datap$PostTest_Total_Score)
## [1] 3.993274
# グラフの描画に必要なデータの入力
bardata <- data.frame(
  Condition = c("Effort", "Performance"),
  Mean = c(mean(datae$PostTest_Total_Score), mean(datap$PostTest_Total_Score)),
  SD = c(sd(datae$PostTest_Total_Score), sd(datap$PostTest_Total_Score))
)

# ggplot2を使用してグラフを描画
library(ggplot2)

ggplot(bardata, aes(x = Condition, y = Mean, fill = Condition)) +
  geom_bar(stat = "identity", position = "dodge", width = 0.7) +
  geom_errorbar(
    aes(ymin = Mean - SD, ymax = Mean + SD),
    position = position_dodge(0.7),
    width = 0.2,
    size = 1
  ) +
  labs(
    title = "Post-test/All Students (N=65)",
    x = " ",
    y = "Score"
  ) +
  
  scale_y_continuous(limits = c(0, 15), breaks = seq(0, 15, 5)) +  # y軸の範囲をに設定
  theme_minimal()

#Analysis 3 #Compare Test Score Increase (増加量) / Effort vs. Performance Group

#Comment:There is a trend (p=0.051) that greater test score increase [(Post_Test_Total_Score) - (Pre_Test_Total_Score)] among kids who received performance feedback compared to those who received effort-based feedback.

#T-test
#Score Increase [Post_pre = (Post_Test_Total_Score)ー(Pre_Test_Total_Score)] between the effort and performance group 
#p-value = 0.05177
var.test(datae$Post_Pre,datap$Post_Pre)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$Post_Pre and datap$Post_Pre
## F = 0.62939, num df = 33, denom df = 30, p-value = 0.1963
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.3069204 1.2750686
## sample estimates:
## ratio of variances 
##          0.6293939
t.test(Post_Pre ~ feedback,var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  Post_Pre by feedback
## t = -1.9827, df = 63, p-value = 0.05177
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -3.32044774  0.01304737
## sample estimates:
##      mean in group effort mean in group performance 
##                0.08823529                1.74193548

#Graph #Compare Test Score Increase (増加量) / Effort vs. Performance Group

#mean/sdの確認
#effort
mean(datae$Post_Pre)
## [1] 0.08823529
sd(datae$Post_Pre)
## [1] 2.968191
#performance
mean(datap$Post_Pre)
## [1] 1.741935
sd(datap$Post_Pre)
## [1] 3.74137
# グラフの描画に必要なデータの入力
bardata <- data.frame(
  Condition = c("Effort", "Performance"),
  Mean = c(mean(datae$Post_Pre), mean(datap$Post_Pre)),
  SD = c(sd(datae$Post_Pre), sd(datap$Post_Pre))
)

# ggplot2を使用してグラフを描画
library(ggplot2)

ggplot(bardata, aes(x = Condition, y = Mean, fill = Condition)) +
  geom_bar(stat = "identity", position = "dodge", width = 0.7) +
  geom_errorbar(
    aes(ymin = Mean - SD, ymax = Mean + SD),
    position = position_dodge(0.7),
    width = 0.2,
    size = 1
  ) +
  labs(
    title = " ",
    x = " ",
    y = "Score gain"
  ) +
  
  scale_y_continuous(limits = c(-7, 7), breaks = seq(-7, 7, 1)) +  # y軸の範囲をに設定
  theme_minimal()

#Analysis 4-1 #Regression Model/Predict “Post-test” #All Students (N=65)

#Comment:"Feedback" and "Pre-Test" has a trend to predict "Post-Test".

#y="Post-test", x="Feedback"
model1 <- lm(PostTest_Total_Score ~ feedback, data = data)
summary(model1)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ feedback, data = data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -9.323 -2.290  1.677  2.710  4.676 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           9.3235     0.7166  13.012   <2e-16 ***
## feedbackperformance   0.9668     1.0376   0.932    0.355    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.178 on 63 degrees of freedom
## Multiple R-squared:  0.01359,    Adjusted R-squared:  -0.002064 
## F-statistic: 0.8682 on 1 and 63 DF,  p-value: 0.355
#y="Post-test", x="Pre-test","Feedback"
model2 <- lm(PostTest_Total_Score ~ feedback*PreTest_Total_Score, data = data)
summary(model2)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ feedback * PreTest_Total_Score, 
##     data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.7402 -1.6567  0.6542  1.3433  7.9167 
## 
## Coefficients:
##                                         Estimate Std. Error t value Pr(>|t|)
## (Intercept)                               1.9096     1.3393   1.426   0.1590
## feedbackperformance                       3.6163     1.8685   1.935   0.0576
## PreTest_Total_Score                       0.8028     0.1330   6.034 1.02e-07
## feedbackperformance:PreTest_Total_Score  -0.2454     0.1915  -1.282   0.2047
##                                            
## (Intercept)                                
## feedbackperformance                     .  
## PreTest_Total_Score                     ***
## feedbackperformance:PreTest_Total_Score    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.109 on 61 degrees of freedom
## Multiple R-squared:  0.4712, Adjusted R-squared:  0.4452 
## F-statistic: 18.12 on 3 and 61 DF,  p-value: 1.598e-08
library(ggplot2)  
ggplot(data, aes(x = PreTest_Total_Score, y = PostTest_Total_Score, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'

#Comment:"Latency".

#y="Post-test",x="Condition","Latency","Pre-test"
modelnew<- lm(PostTest_Total_Score  ~ feedback + Sum_of_Latency + PreTest_Total_Score, data = datalatency)
summary(modelnew)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ feedback + Sum_of_Latency + 
##     PreTest_Total_Score, data = datalatency)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.8796 -2.0804  0.5884  1.5789  9.0490 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         2.2987006  1.5261787   1.506   0.1374    
## feedbackperformance 1.4455431  0.8251708   1.752   0.0851 .  
## Sum_of_Latency      0.0005464  0.0008383   0.652   0.5171    
## PreTest_Total_Score 0.6925547  0.1011832   6.845 5.34e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.215 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.4532, Adjusted R-squared:  0.4249 
## F-statistic: 16.02 on 3 and 58 DF,  p-value: 1.057e-07
modelnew2<- lm(PostTest_Total_Score  ~ feedback*Sum_of_Latency*PreTest_Total_Score, data = datalatency)
summary(modelnew2)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ feedback * Sum_of_Latency * 
##     PreTest_Total_Score, data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -8.194 -1.365  0.272  1.667  6.521 
## 
## Coefficients:
##                                                          Estimate Std. Error
## (Intercept)                                            -2.4544389  2.8010285
## feedbackperformance                                    16.5092994  5.4738744
## Sum_of_Latency                                          0.0039959  0.0022480
## PreTest_Total_Score                                     1.2522294  0.3038346
## feedbackperformance:Sum_of_Latency                     -0.0114024  0.0044718
## feedbackperformance:PreTest_Total_Score                -1.7674887  0.6142089
## Sum_of_Latency:PreTest_Total_Score                     -0.0004191  0.0002591
## feedbackperformance:Sum_of_Latency:PreTest_Total_Score  0.0013846  0.0005329
##                                                        t value Pr(>|t|)    
## (Intercept)                                             -0.876  0.38477    
## feedbackperformance                                      3.016  0.00390 ** 
## Sum_of_Latency                                           1.778  0.08111 .  
## PreTest_Total_Score                                      4.121  0.00013 ***
## feedbackperformance:Sum_of_Latency                      -2.550  0.01365 *  
## feedbackperformance:PreTest_Total_Score                 -2.878  0.00573 ** 
## Sum_of_Latency:PreTest_Total_Score                      -1.618  0.11159    
## feedbackperformance:Sum_of_Latency:PreTest_Total_Score   2.598  0.01206 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.092 on 54 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.5291, Adjusted R-squared:  0.4681 
## F-statistic: 8.668 on 7 and 54 DF,  p-value: 4.334e-07
library(ggplot2)  
ggplot(datalatency, aes(x = Sum_of_Latency, y = PostTest_Total_Score, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 3 rows containing missing values (`geom_point()`).

#y="Post-test",x="Latency"
model3 <- lm(PostTest_Total_Score ~ Sum_of_Latency, data = datalatency)
summary(model3)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ Sum_of_Latency, data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -9.801 -3.150  1.315  3.224  4.340 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     9.9439353  1.3651855   7.284 8.19e-10 ***
## Sum_of_Latency -0.0001924  0.0011050  -0.174    0.862    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.274 on 60 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.0005051,  Adjusted R-squared:  -0.01615 
## F-statistic: 0.03032 on 1 and 60 DF,  p-value: 0.8623
#y="Post-test",x="Feedback", "Latency"
model4 <- lm(PostTest_Total_Score ~ feedback*Sum_of_Latency, data = datalatency)
summary(model4)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ feedback * Sum_of_Latency, 
##     data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -9.614 -2.856  1.665  3.470  4.857 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         9.0079257  1.7279402   5.213 2.58e-06 ***
## feedbackperformance                 2.3837705  2.8985019   0.822    0.414    
## Sum_of_Latency                      0.0002742  0.0013571   0.202    0.841    
## feedbackperformance:Sum_of_Latency -0.0013323  0.0023831  -0.559    0.578    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.311 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.01675,    Adjusted R-squared:  -0.03411 
## F-statistic: 0.3294 on 3 and 58 DF,  p-value: 0.8041
library(ggplot2)  
ggplot(datalatency, aes(x = Sum_of_Latency, y = PostTest_Total_Score, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (`stat_smooth()`).
## Removed 3 rows containing missing values (`geom_point()`).

#y="Post-test",x="Pre-Test", "Latency"
model5 <- lm(PostTest_Total_Score ~ Sum_of_Latency*PreTest_Total_Score, data = datalatency)
summary(model5)
## 
## Call:
## lm(formula = PostTest_Total_Score ~ Sum_of_Latency * PreTest_Total_Score, 
##     data = datalatency)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.1238 -1.9789  0.4956  1.8279  9.8441 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                         2.0108144  2.5335365   0.794  0.43062   
## Sum_of_Latency                      0.0015418  0.0020543   0.751  0.45597   
## PreTest_Total_Score                 0.8234269  0.2789843   2.952  0.00456 **
## Sum_of_Latency:PreTest_Total_Score -0.0001373  0.0002398  -0.573  0.56909   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.29 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.4275, Adjusted R-squared:  0.3978 
## F-statistic: 14.43 on 3 and 58 DF,  p-value: 3.895e-07

#Analysis 4-2 #Regression Model/Predict “Score Increase” #All Students (N=65)

#Comment: "Feedback" has a trend to predict "Score Increase(増加量)".

#y="Score Increase(増加量)", x="Feedback" 
model6 <- lm(Post_Pre ~ feedback, data = data)
summary(model6)
## 
## Call:
## lm(formula = Post_Pre ~ feedback, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.0882 -1.7419 -0.0882  1.2581 11.2581 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)  
## (Intercept)          0.08824    0.57600   0.153   0.8787  
## feedbackperformance  1.65370    0.83407   1.983   0.0518 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.359 on 63 degrees of freedom
## Multiple R-squared:  0.05873,    Adjusted R-squared:  0.04379 
## F-statistic: 3.931 on 1 and 63 DF,  p-value: 0.05177
#y="Score Increase(増加量)", x="Feedback", "Pre-test"
model7 <- lm(Post_Pre ~ feedback*PreTest_Total_Score, data = data)
summary(model7)
## 
## Call:
## lm(formula = Post_Pre ~ feedback * PreTest_Total_Score, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.7402 -1.6567  0.6542  1.3433  7.9167 
## 
## Coefficients:
##                                         Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                               1.9096     1.3393   1.426   0.1590  
## feedbackperformance                       3.6163     1.8685   1.935   0.0576 .
## PreTest_Total_Score                      -0.1972     0.1330  -1.483   0.1434  
## feedbackperformance:PreTest_Total_Score  -0.2454     0.1915  -1.282   0.2047  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.109 on 61 degrees of freedom
## Multiple R-squared:  0.2191, Adjusted R-squared:  0.1807 
## F-statistic: 5.706 on 3 and 61 DF,  p-value: 0.001646
library(ggplot2)  
ggplot(data, aes(x = PreTest_Total_Score, y =  Post_Pre, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'

#Comment:"Latency" does not predict "Score Increase (増加量)".
#y="Score Increase (増加量)", x= "Latency"
model8 <- lm(Post_Pre ~ Sum_of_Latency, data = datalatency)
summary(model8)
## 
## Call:
## lm(formula = Post_Pre ~ Sum_of_Latency, data = datalatency)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.3369 -1.4963 -0.6079  1.2890 12.3140 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)
## (Intercept)    -0.0600540  1.1211068  -0.054    0.957
## Sum_of_Latency  0.0007928  0.0009074   0.874    0.386
## 
## Residual standard error: 3.509 on 60 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.01256,    Adjusted R-squared:  -0.003895 
## F-statistic: 0.7633 on 1 and 60 DF,  p-value: 0.3858
#y="Score Increase (増加量)", x="Feedback", "Latency"
model9 <- lm(Post_Pre ~ feedback*Sum_of_Latency, data = datalatency)
summary(model9)
## 
## Call:
## lm(formula = Post_Pre ~ feedback * Sum_of_Latency, data = datalatency)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.5923 -1.6609 -0.3346  1.1590 11.4098 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)
## (Intercept)                        -0.8610377  1.3873749  -0.621    0.537
## feedbackperformance                 1.5756770  2.3272268   0.677    0.501
## Sum_of_Latency                      0.0008248  0.0010896   0.757    0.452
## feedbackperformance:Sum_of_Latency  0.0001056  0.0019134   0.055    0.956
## 
## Residual standard error: 3.461 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.07143,    Adjusted R-squared:  0.02341 
## F-statistic: 1.487 on 3 and 58 DF,  p-value: 0.2275
library(ggplot2)  
ggplot(datalatency, aes(x = Sum_of_Latency, y =  Post_Pre, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 3 rows containing missing values (`geom_point()`).

#"Score Increase (増加量)",x="Pre-Test", "Latency"
model10 <- lm(Post_Pre ~ Sum_of_Latency*PreTest_Total_Score, data = datalatency)
summary(model10)
## 
## Call:
## lm(formula = Post_Pre ~ Sum_of_Latency * PreTest_Total_Score, 
##     data = datalatency)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.1238 -1.9789  0.4956  1.8279  9.8441 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)
## (Intercept)                         2.0108144  2.5335365   0.794    0.431
## Sum_of_Latency                      0.0015418  0.0020543   0.751    0.456
## PreTest_Total_Score                -0.1765731  0.2789843  -0.633    0.529
## Sum_of_Latency:PreTest_Total_Score -0.0001373  0.0002398  -0.573    0.569
## 
## Residual standard error: 3.29 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.1613, Adjusted R-squared:  0.1179 
## F-statistic: 3.717 on 3 and 58 DF,  p-value: 0.01629

#Analysis 4-3 #Regression Model/Predict Latency(学習時間) #All Students (N=65)

#Comment:"Pre-test" and "Feedback" does not predict "Latency".

#y=Latency, x="Pre-test"
model11 <- lm(Sum_of_Latency ~ PreTest_Total_Score, data = datalatency)
summary(model11)
## 
## Call:
## lm(formula = Sum_of_Latency ~ PreTest_Total_Score, data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -624.8 -336.1 -154.2  229.9 1743.0 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          1260.28     150.78   8.358  1.2e-11 ***
## PreTest_Total_Score   -14.25      15.42  -0.924    0.359    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 495.8 on 60 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.01404,    Adjusted R-squared:  -0.002394 
## F-statistic: 0.8543 on 1 and 60 DF,  p-value: 0.359
#y=Latency, x="Feedback"
model12<- lm(Sum_of_Latency ~ feedback, data = datalatency)
summary(model12)
## 
## Call:
## lm(formula = Sum_of_Latency ~ feedback, data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -658.9 -341.3 -163.8  257.2 1781.2 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          1150.85      85.56  13.450   <2e-16 ***
## feedbackperformance   -38.10     127.32  -0.299    0.766    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 498.9 on 60 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.00149,    Adjusted R-squared:  -0.01515 
## F-statistic: 0.08956 on 1 and 60 DF,  p-value: 0.7658
#y=Latency, x="Pre-test", "Feedback type"
model13 <- lm(Sum_of_Latency ~ PreTest_Total_Score*feedback, data = datalatency)
summary(model13)
## 
## Call:
## lm(formula = Sum_of_Latency ~ PreTest_Total_Score * feedback, 
##     data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -617.5 -359.7 -155.7  209.9 1738.0 
## 
## Coefficients:
##                                         Estimate Std. Error t value Pr(>|t|)
## (Intercept)                             1244.823    216.770   5.743 3.61e-07
## PreTest_Total_Score                      -10.175     21.532  -0.473    0.638
## feedbackperformance                       38.122    306.438   0.124    0.901
## PreTest_Total_Score:feedbackperformance   -9.932     31.500  -0.315    0.754
##                                            
## (Intercept)                             ***
## PreTest_Total_Score                        
## feedbackperformance                        
## PreTest_Total_Score:feedbackperformance    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 503.2 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.01822,    Adjusted R-squared:  -0.03256 
## F-statistic: 0.3587 on 3 and 58 DF,  p-value: 0.783
library(ggplot2)  
ggplot(datalatency, aes(x = PreTest_Total_Score, y = Sum_of_Latency, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 3 rows containing missing values (`geom_point()`).

#Analysis 4-3 #Regression Model/Predict Math Motivation score (算数学習への意欲) #All Students (N=65)

#Comment:Latency (学習時間) predict Math Motivation score (算数学習への意欲).
#y="Math Motivation score", x="Latency"
model14 <- lm(Survey_Total_Score ~ Sum_of_Latency, data = datalatency)
summary(model14)
## 
## Call:
## lm(formula = Survey_Total_Score ~ Sum_of_Latency, data = datalatency)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -26.007  -7.610   0.370   9.804  20.920 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    57.367276   3.813558  15.043   <2e-16 ***
## Sum_of_Latency -0.007025   0.003087  -2.276   0.0264 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 11.94 on 60 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.07947,    Adjusted R-squared:  0.06413 
## F-statistic:  5.18 on 1 and 60 DF,  p-value: 0.02643
#y="Math Motivation score", x="Feedback type", "Latency"
model15 <- lm(Survey_Total_Score ~ feedback*Sum_of_Latency, data = datalatency)
summary(model15)
## 
## Call:
## lm(formula = Survey_Total_Score ~ feedback * Sum_of_Latency, 
##     data = datalatency)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -25.3199  -7.8377   0.5695   9.9492  20.3861 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                        58.639327   4.855842  12.076   <2e-16 ***
## feedbackperformance                -3.143786   8.145344  -0.386   0.7009    
## Sum_of_Latency                     -0.007584   0.003814  -1.989   0.0515 .  
## feedbackperformance:Sum_of_Latency  0.001554   0.006697   0.232   0.8174    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 12.12 on 58 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.08354,    Adjusted R-squared:  0.03613 
## F-statistic: 1.762 on 3 and 58 DF,  p-value: 0.1644
library(ggplot2)  
ggplot(datalatency, aes(x = Sum_of_Latency, y =  Survey_Total_Score, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 3 rows containing missing values (`geom_point()`).

#Since there is a significant correlation between "Test_anxiety"and "Latency" in Analysis 6-3, this is the extra analysis of it. "Test_anxiety"predicts "Latency".
#y="Latency", x="Test_anxiety"
model16 <- lm(Sum_of_Latency ~ Test_anxiety, data = datalatency)
summary(model16)
## 
## Call:
## lm(formula = Sum_of_Latency ~ Test_anxiety, data = datalatency)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -760.4 -277.1 -125.8  245.7 1701.0 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   1503.78     158.62   9.480 1.55e-13 ***
## Test_anxiety   -34.10      13.52  -2.523   0.0143 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 474.7 on 60 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.0959, Adjusted R-squared:  0.08083 
## F-statistic: 6.364 on 1 and 60 DF,  p-value: 0.01431
library(ggplot2)  
ggplot(datalatency, aes(x =  Test_anxiety, y =  Sum_of_Latency, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (`stat_smooth()`).
## Removed 3 rows containing missing values (`geom_point()`).

#Comment:Post-test predict the Math Motivation score (算数学習への意欲).
#y="Math Motivation score", x="Post-test"
model17 <- lm(Survey_Total_Score ~ PostTest_Total_Score, data = data)
summary(model17)
## 
## Call:
## lm(formula = Survey_Total_Score ~ PostTest_Total_Score, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -30.9038  -7.9038   0.1117   9.0962  22.8197 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           36.5034     3.4616  10.545 1.52e-15 ***
## PostTest_Total_Score   1.3385     0.3258   4.108 0.000117 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.88 on 63 degrees of freedom
## Multiple R-squared:  0.2113, Adjusted R-squared:  0.1988 
## F-statistic: 16.88 on 1 and 63 DF,  p-value: 0.0001171
#y="Math Motivation score", x="Feedback", "PostTest_Total_Score"
model18 <- lm(Survey_Total_Score ~ feedback*PostTest_Total_Score, data = data)
summary(model18)
## 
## Call:
## lm(formula = Survey_Total_Score ~ feedback * PostTest_Total_Score, 
##     data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -29.253  -7.106  -0.972   9.168  23.566 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                               35.2992     4.5121   7.823 8.87e-11
## feedbackperformance                        2.5868     7.1315   0.363 0.718066
## PostTest_Total_Score                       1.5673     0.4399   3.563 0.000719
## feedbackperformance:PostTest_Total_Score  -0.4622     0.6670  -0.693 0.491023
##                                             
## (Intercept)                              ***
## feedbackperformance                         
## PostTest_Total_Score                     ***
## feedbackperformance:PostTest_Total_Score    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.97 on 61 degrees of freedom
## Multiple R-squared:  0.224,  Adjusted R-squared:  0.1858 
## F-statistic:  5.87 on 3 and 61 DF,  p-value: 0.001374
library(ggplot2)  
ggplot(datalatency, aes(x = PostTest_Total_Score, y =  Survey_Total_Score, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'

#Comment:Score Increse does not predict Math Motivation score (算数学習への意欲).
#y="Math Motivation score", x="Score Increse"
model19 <- lm(Survey_Total_Score ~ Post_Pre, data = data)
summary(model19)
## 
## Call:
## lm(formula = Survey_Total_Score ~ Post_Pre, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -26.2353  -8.7397  -0.5595  11.3324  19.4405 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 49.63159    1.56881  31.637   <2e-16 ***
## Post_Pre    -0.03603    0.44579  -0.081    0.936    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 12.25 on 63 degrees of freedom
## Multiple R-squared:  0.0001037,  Adjusted R-squared:  -0.01577 
## F-statistic: 0.006531 on 1 and 63 DF,  p-value: 0.9358
#y="Math Motivation score", x="Feedback", "Score Increse"
model20 <- lm(Survey_Total_Score ~ feedback*Post_Pre, data = data)
summary(model20)
## 
## Call:
## lm(formula = Survey_Total_Score ~ feedback * Post_Pre, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -25.7083  -8.8546  -0.2747  11.0929  19.0929 
## 
## Coefficients:
##                              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                   49.9071     2.1349  23.377   <2e-16 ***
## feedbackperformance           -0.5456     3.2666  -0.167    0.868    
## Post_Pre                       0.0525     0.7298   0.072    0.943    
## feedbackperformance:Post_Pre  -0.1119     0.9493  -0.118    0.907    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 12.44 on 61 degrees of freedom
## Multiple R-squared:  0.0009744,  Adjusted R-squared:  -0.04816 
## F-statistic: 0.01983 on 3 and 61 DF,  p-value: 0.9962
library(ggplot2)  
ggplot(datalatency, aes(x = Post_Pre, y =  Survey_Total_Score, col = feedback)) + geom_point() +geom_smooth(method = "lm",se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'

#Analysis 5 #Compare Math Motivation Score (算数学習への意欲) / Effort vs. Performance Group

#Comment:In terms of the Math motivation score, no significant difference between the two groups.

#T-test
#Math motivation score between the effort and performance group
#p-value = 0.8305
var.test(datae$Survey_Total_Score,datap$Survey_Total_Score)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$Survey_Total_Score and datap$Survey_Total_Score
## F = 0.99344, num df = 33, denom df = 30, p-value = 0.9808
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.4844434 2.0125693
## sample estimates:
## ratio of variances 
##          0.9934357
t.test(Survey_Total_Score ~ feedback,var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  Survey_Total_Score by feedback
## t = 0.21497, df = 63, p-value = 0.8305
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -5.423100  6.730501
## sample estimates:
##      mean in group effort mean in group performance 
##                  49.91176                  49.25806
#T-test
#Intrinsic value between the effort and performance group
#p-value = 0.7563 
var.test(datae$Intrinsic_Value,datap$Intrinsic_Value)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$Intrinsic_Value and datap$Intrinsic_Value
## F = 1.0885, num df = 33, denom df = 30, p-value = 0.8181
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.5308176 2.2052257
## sample estimates:
## ratio of variances 
##           1.088534
t.test(Intrinsic_Value ~ feedback,var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  Intrinsic_Value by feedback
## t = 0.31166, df = 63, p-value = 0.7563
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -1.345265  1.842419
## sample estimates:
##      mean in group effort mean in group performance 
##                  10.76471                  10.51613
#T-test
#Self efficacy between the effort and performance group
#p-value = 0.5474  
var.test(datae$Self.efficacy,datap$Self.efficacy)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$Self.efficacy and datap$Self.efficacy
## F = 1.0701, num df = 33, denom df = 30, p-value = 0.8552
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.5218127 2.1678160
## sample estimates:
## ratio of variances 
##           1.070068
t.test(Self.efficacy ~ feedback,var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  Self.efficacy by feedback
## t = 0.60497, df = 63, p-value = 0.5474
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -1.450972  2.710934
## sample estimates:
##      mean in group effort mean in group performance 
##                  13.82353                  13.19355
#T-test
#Self regulation between the effort and performance group
#p-value = 0.8525
var.test(datae$Self.regulation,datap$Self.regulation)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$Self.regulation and datap$Self.regulation
## F = 1.1886, num df = 33, denom df = 30, p-value = 0.6357
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.579596 2.407871
## sample estimates:
## ratio of variances 
##           1.188563
t.test(Self.regulation ~ feedback,var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  Self.regulation by feedback
## t = -0.18666, df = 63, p-value = 0.8525
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -1.665894  1.381264
## sample estimates:
##      mean in group effort mean in group performance 
##                  14.47059                  14.61290
#T-test
#Anxiety between the effort and performance group
#p-value = 0.9412 
var.test(datae$Test_anxiety,datap$Test_anxiety)#等分散
## 
##  F test to compare two variances
## 
## data:  datae$Test_anxiety and datap$Test_anxiety
## F = 1.0587, num df = 33, denom df = 30, p-value = 0.8786
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.5162518 2.1447136
## sample estimates:
## ratio of variances 
##           1.058664
t.test(Test_anxiety ~ feedback,var.equal=T,data = data)
## 
##  Two Sample t-test
## 
## data:  Test_anxiety by feedback
## t = -0.074085, df = 63, p-value = 0.9412
## alternative hypothesis: true difference in means between group effort and group performance is not equal to 0
## 95 percent confidence interval:
##  -2.309021  2.143936
## sample estimates:
##      mean in group effort mean in group performance 
##                  10.85294                  10.93548

#Graph #Compare Math Motivation Score (算数学習への意欲) / Effort vs. Performance Group

#mean/sdの確認
#effort
mean(datae$Survey_Total_Score)
## [1] 49.91176
sd(datae$Survey_Total_Score)
## [1] 12.22607
#performance
mean(datap$Survey_Total_Score)
## [1] 49.25806
sd(datap$Survey_Total_Score)
## [1] 12.2664
# グラフの描画に必要なデータの入力
bardata <- data.frame(
  Condition = c("Effort", "Performance"),
  Mean = c(mean(datae$Survey_Total_Score), mean(datap$Survey_Total_Score)),
  SD = c(sd(datae$Survey_Total_Score), sd(datap$Survey_Total_Score))
)

# ggplot2を使用してグラフを描画
library(ggplot2)

ggplot(bardata, aes(x = Condition, y = Mean, fill = Condition)) +
  geom_bar(stat = "identity", position = "dodge", width = 0.7) +
  geom_errorbar(
    aes(ymin = Mean - SD, ymax = Mean + SD),
    position = position_dodge(0.7),
    width = 0.2,
    size = 1
  ) +
  labs(
    title = " ",
    x = " ",
    y = "Score"
  ) +
  
 # scale_y_continuous(limits = c(-7, 7), breaks = seq(-7, 7, 1)) +  # y軸の範囲をに設定
  theme_minimal()

#Analysis 6-1 #Correlation #Math Motivation Score

library(corrplot)
## corrplot 0.92 loaded
round(cor(datav),2)
##                         ID feedback   ITS class PreTest_Total_Score
## ID                    1.00    -0.05  0.24  0.94                0.09
## feedback             -0.05     1.00  0.05 -0.08               -0.08
## ITS                   0.24     0.05  1.00  0.20               -0.03
## class                 0.94    -0.08  0.20  1.00                0.07
## PreTest_Total_Score   0.09    -0.08 -0.03  0.07                1.00
## PostTest_Total_Score -0.05     0.12  0.03 -0.09                0.65
## Post_Pre             -0.17     0.24  0.08 -0.19               -0.39
## Intrinsic_Value      -0.11    -0.04 -0.13 -0.08                0.48
## Self.regulation      -0.26     0.02 -0.12 -0.20                0.27
## Self.efficacy        -0.15    -0.08 -0.13 -0.15                0.45
## Test_anxiety          0.08     0.01 -0.16  0.00                0.35
## Survey_Total_Score   -0.12    -0.03 -0.16 -0.12                0.48
##                      PostTest_Total_Score Post_Pre Intrinsic_Value
## ID                                  -0.05    -0.17           -0.11
## feedback                             0.12     0.24           -0.04
## ITS                                  0.03     0.08           -0.13
## class                               -0.09    -0.19           -0.08
## PreTest_Total_Score                  0.65    -0.39            0.48
## PostTest_Total_Score                 1.00     0.44            0.42
## Post_Pre                             0.44     1.00           -0.07
## Intrinsic_Value                      0.42    -0.07            1.00
## Self.regulation                      0.27     0.00            0.58
## Self.efficacy                        0.42    -0.03            0.77
## Test_anxiety                         0.38     0.04            0.53
## Survey_Total_Score                   0.46    -0.01            0.87
##                      Self.regulation Self.efficacy Test_anxiety
## ID                             -0.26         -0.15         0.08
## feedback                        0.02         -0.08         0.01
## ITS                            -0.12         -0.13        -0.16
## class                          -0.20         -0.15         0.00
## PreTest_Total_Score             0.27          0.45         0.35
## PostTest_Total_Score            0.27          0.42         0.38
## Post_Pre                        0.00         -0.03         0.04
## Intrinsic_Value                 0.58          0.77         0.53
## Self.regulation                 1.00          0.70         0.19
## Self.efficacy                   0.70          1.00         0.57
## Test_anxiety                    0.19          0.57         1.00
## Survey_Total_Score              0.71          0.93         0.75
##                      Survey_Total_Score
## ID                                -0.12
## feedback                          -0.03
## ITS                               -0.16
## class                             -0.12
## PreTest_Total_Score                0.48
## PostTest_Total_Score               0.46
## Post_Pre                          -0.01
## Intrinsic_Value                    0.87
## Self.regulation                    0.71
## Self.efficacy                      0.93
## Test_anxiety                       0.75
## Survey_Total_Score                 1.00
cor_matrix<-round(cor(datav),2)
corrplot(corr=cor_matrix)

#Comment:There is a correlation between the Math motivation score and the test scores.
##Significant Correlation##

#Math Motivation Score × Pre-test
#p-value = 5.368e-05, cor 0.4792619 
cor.test(data$Survey_Total_Score,data$PreTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Survey_Total_Score and data$PreTest_Total_Score
## t = 4.3342, df = 63, p-value = 5.368e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2665163 0.6474765
## sample estimates:
##       cor 
## 0.4792619
#Math Motivation Score × Post-test
#p-value = 0.0001171, cor 0.4596764 
cor.test(data$Survey_Total_Score,data$PostTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Survey_Total_Score and data$PostTest_Total_Score
## t = 4.1083, df = 63, p-value = 0.0001171
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2430238 0.6326465
## sample estimates:
##       cor 
## 0.4596764
#Pre-Test × Post-Test
#p-value = 3.582e-09, cor 0.6535961
cor.test(data$PreTest_Total_Score,data$PostTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$PreTest_Total_Score and data$PostTest_Total_Score
## t = 6.8545, df = 63, p-value = 3.582e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.4873931 0.7740955
## sample estimates:
##       cor 
## 0.6535961
#Intrinsic value × Post-test
#p-value = 0.0005316, cor 0.4179531
cor.test(data$Intrinsic_Value,data$PostTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Intrinsic_Value and data$PostTest_Total_Score
## t = 3.6516, df = 63, p-value = 0.0005316
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1938108 0.6006254
## sample estimates:
##       cor 
## 0.4179531
#Self efficacy × Post-test
#p-value = 0.0005402, cor 0.4174799 
cor.test(data$Self.efficacy,data$PostTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Self.efficacy and data$PostTest_Total_Score
## t = 3.6466, df = 63, p-value = 0.0005402
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1932590 0.6002589
## sample estimates:
##       cor 
## 0.4174799
#Self regulation × Post-test
#p-value = 0.02902, cor 0.270957 
cor.test(data$Self.regulation,data$PostTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Self.regulation and data$PostTest_Total_Score
## t = 2.2342, df = 63, p-value = 0.02902
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02897262 0.48294046
## sample estimates:
##      cor 
## 0.270957
#Test anxiety × Post-test
#p-value = 0.001859, cor 0.3788359 
cor.test(data$Test_anxiety,data$PostTest_Total_Score)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Test_anxiety and data$PostTest_Total_Score
## t = 3.2491, df = 63, p-value = 0.001859
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1486740 0.5700625
## sample estimates:
##       cor 
## 0.3788359

#Analysis 6-2 #Correlation #Score Increase

#Comment:There is not significant correlation between the Math motivation score and the Score increase.

#Math motivation score × Score increase(増加量)
cor.test(data$Survey_Total_Score,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Survey_Total_Score and data$Post_Pre
## t = -0.080814, df = 63, p-value = 0.9358
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2534508  0.2342999
## sample estimates:
##         cor 
## -0.01018105
#Intrinsic value × Score increase
cor.test(data$Intrinsic_Value,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Intrinsic_Value and data$Post_Pre
## t = -0.52004, df = 63, p-value = 0.6049
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3044233  0.1814134
## sample estimates:
##        cor 
## -0.0653785
#Self efficacy × Score increase
cor.test(data$Self.efficacy,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Self.efficacy and data$Post_Pre
## t = -0.20616, df = 63, p-value = 0.8373
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2681662  0.2193227
## sample estimates:
##         cor 
## -0.02596541
#Self regulation × Score increase
cor.test(data$Self.regulation,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Self.regulation and data$Post_Pre
## t = 0.039199, df = 63, p-value = 0.9689
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2392488  0.2485383
## sample estimates:
##         cor 
## 0.004938531
#Test anxiety × Score increase
cor.test(data$Test_anxiety,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$Test_anxiety and data$Post_Pre
## t = 0.31772, df = 63, p-value = 0.7517
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2059111  0.2811531
## sample estimates:
##        cor 
## 0.03999669
#Posttest × Score increase(増加量)
cor.test(data$PostTest_Total_Score,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$PostTest_Total_Score and data$Post_Pre
## t = 3.884, df = 63, p-value = 0.0002491
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2191239 0.6172604
## sample estimates:
##       cor 
## 0.4395325
#Pretest × Score increase(増加量)
cor.test(data$PreTest_Total_Score,data$Post_Pre)
## 
##  Pearson's product-moment correlation
## 
## data:  data$PreTest_Total_Score and data$Post_Pre
## t = -3.3876, df = 63, p-value = 0.00122
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.5808305 -0.1643788
## sample estimates:
##        cor 
## -0.3925403

#Analysis 6-3 #Correlation #Latency

library(corrplot)
round(cor(datalatencyv),2)
##                         ID Sum_of_Latency feedback   ITS class
## ID                    1.00          -0.03    -0.13  0.24  0.93
## Sum_of_Latency       -0.03           1.00    -0.04  0.04  0.04
## feedback             -0.13          -0.04     1.00  0.04 -0.16
## ITS                   0.24           0.04     0.04  1.00  0.20
## class                 0.93           0.04    -0.16  0.20  1.00
## PreTest_Total_Score   0.09          -0.12    -0.09 -0.03  0.07
## PostTest_Total_Score -0.07          -0.02     0.11  0.03 -0.12
## Post_Pre             -0.19           0.11     0.24  0.07 -0.22
## Intrinsic_Value      -0.15          -0.16    -0.06 -0.13 -0.11
## Self.regulation      -0.31          -0.22     0.00 -0.13 -0.24
## Self.efficacy        -0.17          -0.21    -0.09 -0.13 -0.17
## Test_anxiety          0.07          -0.31     0.00 -0.16 -0.01
## Survey_Total_Score   -0.15          -0.28    -0.05 -0.17 -0.15
##                      PreTest_Total_Score PostTest_Total_Score Post_Pre
## ID                                  0.09                -0.07    -0.19
## Sum_of_Latency                     -0.12                -0.02     0.11
## feedback                           -0.09                 0.11     0.24
## ITS                                -0.03                 0.03     0.07
## class                               0.07                -0.12    -0.22
## PreTest_Total_Score                 1.00                 0.65    -0.39
## PostTest_Total_Score                0.65                 1.00     0.45
## Post_Pre                           -0.39                 0.45     1.00
## Intrinsic_Value                     0.50                 0.42    -0.07
## Self.regulation                     0.29                 0.29     0.01
## Self.efficacy                       0.46                 0.42    -0.03
## Test_anxiety                        0.39                 0.40     0.03
## Survey_Total_Score                  0.50                 0.47    -0.02
##                      Intrinsic_Value Self.regulation Self.efficacy Test_anxiety
## ID                             -0.15           -0.31         -0.17         0.07
## Sum_of_Latency                 -0.16           -0.22         -0.21        -0.31
## feedback                       -0.06            0.00         -0.09         0.00
## ITS                            -0.13           -0.13         -0.13        -0.16
## class                          -0.11           -0.24         -0.17        -0.01
## PreTest_Total_Score             0.50            0.29          0.46         0.39
## PostTest_Total_Score            0.42            0.29          0.42         0.40
## Post_Pre                       -0.07            0.01         -0.03         0.03
## Intrinsic_Value                 1.00            0.58          0.77         0.53
## Self.regulation                 0.58            1.00          0.71         0.20
## Self.efficacy                   0.77            0.71          1.00         0.58
## Test_anxiety                    0.53            0.20          0.58         1.00
## Survey_Total_Score              0.87            0.72          0.93         0.75
##                      Survey_Total_Score
## ID                                -0.15
## Sum_of_Latency                    -0.28
## feedback                          -0.05
## ITS                               -0.17
## class                             -0.15
## PreTest_Total_Score                0.50
## PostTest_Total_Score               0.47
## Post_Pre                          -0.02
## Intrinsic_Value                    0.87
## Self.regulation                    0.72
## Self.efficacy                      0.93
## Test_anxiety                       0.75
## Survey_Total_Score                 1.00
cor_matrix<-round(cor(datalatencyv),2)
corrplot(corr=cor_matrix)

### Test score × Latency ###

#Pre-test × Latency
#p-value = 0.359 , cor -0.118484  
cor.test(datalatency$PreTest_Total_Score,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$PreTest_Total_Score and datalatency$Sum_of_Latency
## t = -0.92428, df = 60, p-value = 0.359
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3576676  0.1352878
## sample estimates:
##       cor 
## -0.118484
#Post-test × Latency
#p-value = 0.8623, cor -0.02247468 
cor.test(datalatency$PostTest_Total_Score,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$PostTest_Total_Score and datalatency$Sum_of_Latency
## t = -0.17413, df = 60, p-value = 0.8623
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2707232  0.2285766
## sample estimates:
##         cor 
## -0.02247468
#Score increase(増加量)× Latency
#p-value = 0.3858, cor 0.1120818  
cor.test(datalatency$Post_Pre,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$Post_Pre and datalatency$Sum_of_Latency
## t = 0.87369, df = 60, p-value = 0.3858
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1416519  0.3519960
## sample estimates:
##       cor 
## 0.1120818
#Comment:There is a negative correlation between "Math Motivation score" and "Latency". Especially, "Test anxiety" and "Latency" are significant.
### Math Motivation score × Latency ###

#Math Motivation Score × Latency
#p-value = 0.02643, cor -0.2819058
cor.test(datalatency$Survey_Total_Score,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$Survey_Total_Score and datalatency$Sum_of_Latency
## t = -2.2759, df = 60, p-value = 0.02643
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.49670078 -0.03457188
## sample estimates:
##        cor 
## -0.2819058
#Intrinsic value × Latency
#p-value = 0.2249, cor -0.1563486 
cor.test(datalatency$Intrinsic_Value,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$Intrinsic_Value and datalatency$Sum_of_Latency
## t = -1.2262, df = 60, p-value = 0.2249
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.39085358  0.09721601
## sample estimates:
##        cor 
## -0.1563486
#Self efficacy × Latency
#p-value = 0.09369, cor -0.2147641
cor.test(datalatency$Self.efficacy,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$Self.efficacy and datalatency$Sum_of_Latency
## t = -1.7033, df = 60, p-value = 0.09369
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.44088278  0.03698822
## sample estimates:
##        cor 
## -0.2147641
#Self regulation × Latency
#p-value = 0.08645, cor -0.2195386 
cor.test(datalatency$Self.regulation,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$Self.regulation and datalatency$Sum_of_Latency
## t = -1.7431, df = 60, p-value = 0.08645
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.44491071  0.03198333
## sample estimates:
##        cor 
## -0.2195386
#Test anxiety × Latency 
#p-value = 0.01431, cor -0.3096778   
cor.test(datalatency$Test_anxiety,datalatency$Sum_of_Latency,use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  datalatency$Test_anxiety and datalatency$Sum_of_Latency
## t = -2.5228, df = 60, p-value = 0.01431
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.51928085 -0.06493195
## sample estimates:
##        cor 
## -0.3096778

Pre vs post

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ lubridate 1.9.2     ✔ tibble    3.2.1
## ✔ purrr     1.0.1     ✔ tidyr     1.3.0
## ✔ readr     2.1.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggpubr)
library(rstatix)
## 
## Attaching package: 'rstatix'
## 
## The following object is masked from 'package:stats':
## 
##     filter
# Data preparation
# Wide format
data<-read.csv("R.csv")

data <- data %>%
  gather(key = "test", value = "score", PreTest_Total_Score, PostTest_Total_Score) %>%
  convert_as_factor(ID, test)

data %>%
  group_by(test) %>%
  get_summary_stats(score, type = "mean_sd")
## # A tibble: 2 × 5
##   test                 variable     n  mean    sd
##   <fct>                <fct>    <dbl> <dbl> <dbl>
## 1 PostTest_Total_Score score       65  9.78  4.17
## 2 PreTest_Total_Score  score       65  8.91  4.08
bxp <- ggboxplot(data, x = "test", y = "score", add = "point")
bxp

data %>%
  group_by(test) %>%
  identify_outliers(score)
## # A tibble: 1 × 17
##   test          ID    username feedback   ITS pre_test_type post_test_type class
##   <fct>         <fct> <chr>    <chr>    <int> <chr>         <chr>          <int>
## 1 PostTest_Tot… 106   yessomen effort      12 A             B                  3
## # ℹ 9 more variables: Post_Pre <int>, Intrinsic_Value <int>,
## #   Self.regulation <int>, Self.efficacy <int>, Test_anxiety <int>,
## #   Survey_Total_Score <int>, score <int>, is.outlier <lgl>, is.extreme <lgl>
data %>%
  group_by(test) %>%
  shapiro_test(score)
## # A tibble: 2 × 4
##   test                 variable statistic          p
##   <fct>                <chr>        <dbl>      <dbl>
## 1 PostTest_Total_Score score        0.854 0.00000185
## 2 PreTest_Total_Score  score        0.892 0.0000368
ggqqplot(data, "score", facet.by = "test")

#ANOVA Table (type III tests)
res.aov <- anova_test(data = data, dv = score, wid = ID, within = test)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##   Effect DFn DFd     F     p p<.05   ges
## 1   test   1  64 4.237 0.044     * 0.011
print(res.aov)
## ANOVA Table (type III tests)
## 
##   Effect DFn DFd     F     p p<.05   ges
## 1   test   1  64 4.237 0.044     * 0.011
# pairwise comparisons
pwc <- data %>%
  pairwise_t_test(
    score ~ test, paired = TRUE,
    p.adjust.method = "bonferroni"
    )
pwc
## # A tibble: 1 × 10
##   .y.   group1       group2    n1    n2 statistic    df     p p.adj p.adj.signif
## * <chr> <chr>        <chr>  <int> <int>     <dbl> <dbl> <dbl> <dbl> <chr>       
## 1 score PostTest_To… PreTe…    65    65      2.06    64 0.044 0.044 *
#Visualization: box plots with p-values
pwc <- pwc %>% add_xy_position(x = "test")
bxp + 
  stat_pvalue_manual(pwc) +
  labs(
    subtitle = get_test_label(res.aov, detailed = TRUE),
    caption = get_pwc_label(pwc)
  )

## https://www.datanovia.com/en/lessons/repeated-measures-anova-in-r/#data-preparation