Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
7.5 1.5 1.8 2011 1 0 68 149 18 4 21 13 12 6 2.1 2.1 2011 1 1 39 139 31 4 22 8 8 6.5 2.1 2.2 2011 1 0 32 148 39 5 22 14 11 1 1.9 2.3 2011 1 1 62 158 46 4 18 16 13 1 1.6 2.1 2011 1 1 33 128 31 4 23 14 11 5.5 2.1 2.7 2011 1 1 52 224 67 9 12 13 10 8.5 2.1 2.1 2011 1 0 62 159 35 8 20 15 7 6.5 2.2 2.4 2011 1 1 77 105 52 11 22 13 10 4.5 1.5 2.9 2011 1 1 76 159 77 4 21 20 15 2 1.9 2.2 2011 1 1 41 167 37 4 19 17 12 5 2.2 2.1 2011 1 1 48 165 32 6 22 15 12 0.5 1.6 2.2 2011 1 1 63 159 36 4 15 16 10 5 1.5 2.2 2011 1 1 30 119 38 8 20 12 10 5 1.9 2.7 2011 1 0 78 176 69 4 19 17 14 2.5 0.1 1.9 2011 1 0 19 54 21 4 18 11 6 5 2.2 2 2011 0 0 31 91 26 11 15 16 12 5.5 1.8 2.5 2011 1 1 66 163 54 4 20 16 14 3.5 1.6 2.2 2011 1 0 35 124 36 4 21 15 11 3 2.2 2.3 2011 0 1 42 137 42 6 21 13 8 4 2.1 1.9 2011 1 0 45 121 23 6 15 14 12 0.5 1.9 2.1 2011 1 1 21 153 34 4 16 19 15 6.5 1.6 3.5 2011 1 1 25 148 112 8 23 16 13 4.5 1.9 2.1 2011 1 0 44 221 35 5 21 17 11 7.5 2.2 2.3 2011 1 1 69 188 47 4 18 10 12 5.5 1.8 2.3 2011 1 1 54 149 47 9 25 15 7 4 2.4 2.2 2011 1 1 74 244 37 4 9 14 11 7.5 2.4 3.5 2011 0 1 80 148 109 7 30 14 7 7 2.5 1.9 2011 0 0 42 92 24 10 20 16 12 4 1.9 1.9 2011 1 1 61 150 20 4 23 15 12 5.5 2.1 1.9 2011 1 0 41 153 22 4 16 17 13 2.5 1.9 1.9 2011 1 0 46 94 23 7 16 14 9 5.5 2.1 2.1 2011 1 0 39 156 32 12 19 16 11 3.5 1.5 2 2011 1 1 34 132 30 7 25 15 12 2.5 1.9 3.2 2011 1 1 51 161 92 5 18 16 15 4.5 2.1 2.3 2011 1 1 42 105 43 8 23 16 12 4.5 1.5 2.5 2011 1 1 31 97 55 5 21 10 6 4.5 2.1 1.8 2011 1 0 39 151 16 4 10 8 5 6 2.1 2.4 2011 0 1 20 131 49 9 14 17 13 2.5 1.8 2.8 2011 1 1 49 166 71 7 22 14 11 5 2.4 2.3 2011 1 0 53 157 43 4 26 10 6 0 2.1 2 2011 1 1 31 111 29 4 23 14 12 5 1.9 2.5 2011 1 1 39 145 56 4 23 12 10 6.5 2.1 2.3 2011 1 1 54 162 46 4 24 16 6 5 1.9 1.8 2011 1 1 49 163 19 4 24 16 12 6 2.4 1.9 2011 0 1 34 59 23 7 18 16 11 4.5 2.1 2.6 2011 1 0 46 187 59 4 23 8 6 5.5 2.2 2 2011 1 1 55 109 30 7 15 16 12 1 2.2 2.6 2011 0 1 42 90 61 4 19 15 12 7.5 1.8 1.6 2011 1 0 50 105 7 4 16 8 8 6 2.1 2.2 2011 0 1 13 83 38 4 25 13 10 5 2.4 2.1 2011 0 1 37 116 32 4 23 14 11 1 2.2 1.8 2011 0 1 25 42 16 8 17 13 7 5 2.1 1.8 2011 1 1 30 148 19 4 19 16 12 6.5 1.5 1.9 2011 0 1 28 155 22 4 21 19 13 7 1.9 2.4 2011 1 1 45 125 48 4 18 19 14 4.5 1.8 1.9 2011 1 1 35 116 23 4 27 14 12 0 1.8 2 2011 0 0 28 128 26 7 21 15 6 8.5 1.6 2.1 2011 1 1 41 138 33 12 13 13 14 3.5 1.2 1.7 2011 0 0 6 49 9 4 8 10 10 7.5 1.8 1.9 2011 0 1 45 96 24 4 29 16 12 3.5 1.5 2.1 2011 1 1 73 164 34 4 28 15 11 6 2.1 2.4 2011 1 0 17 162 48 5 23 11 10 1.5 2.4 1.8 2011 1 0 40 99 18 15 21 9 7 9 2.4 2.3 2011 1 1 64 202 43 5 19 16 12 3.5 1.5 2.1 2011 1 0 37 186 33 10 19 12 7 3.5 1.8 2 2011 0 1 25 66 28 9 20 12 12 4 2.1 2.8 2011 1 0 65 183 71 8 18 14 12 6.5 2.2 2 2011 1 1 100 214 26 4 19 14 10 7.5 2.1 2.7 2011 1 1 28 188 67 5 17 13 10 6 1.9 2.1 2011 0 0 35 104 34 4 19 15 12 5 2.1 2.9 2011 1 0 56 177 80 9 25 17 12 5.5 1.9 2 2011 1 0 29 126 29 4 19 14 12 3.5 1.6 1.8 2011 0 0 43 76 16 10 22 11 8 7.5 2.4 2.6 2011 0 1 59 99 59 4 23 9 10 6.5 1.9 2.1 2011 1 0 50 139 32 4 14 7 5 6.5 2.1 2.3 2011 1 0 59 162 43 7 16 15 10 6.5 1.8 2.2 2011 0 1 27 108 38 5 24 12 12 7 2.1 2 2011 1 0 61 159 29 4 20 15 11 3.5 2.4 2.2 2011 0 0 28 74 36 4 12 14 9 1.5 2.1 2.1 2011 1 1 51 110 32 4 24 16 12 4 2.2 2.1 2011 0 0 35 96 35 4 22 14 11 7.5 2.1 1.9 2011 0 0 29 116 21 4 12 13 10 4.5 2.2 2 2011 0 0 48 87 29 4 22 16 12 0 1.6 1.7 2011 0 1 25 97 12 6 20 13 10 3.5 2.4 2.2 2011 0 0 44 127 37 10 10 16 9 5.5 2.1 2.2 2011 0 1 64 106 37 7 23 16 11 5 1.9 2.3 2011 0 1 32 80 47 4 17 16 12 4.5 2.4 2.4 2011 0 0 20 74 51 4 22 10 7 2.5 2.1 2.1 2011 0 0 28 91 32 7 24 12 11 7.5 1.8 1.9 2011 0 0 34 133 21 4 18 12 12 7 2.1 1.7 2011 0 1 31 74 13 8 21 12 6 0 1.8 1.8 2011 0 1 26 114 14 11 20 12 9 4.5 1.9 1.5 2011 0 1 58 140 -2 6 20 19 15 3 1.9 1.9 2011 0 0 23 95 20 14 22 14 10 1.5 2.4 1.9 2011 0 1 21 98 24 5 19 13 11 3.5 1.8 1.7 2011 0 0 21 121 11 4 20 16 12 2.5 1.8 1.9 2011 0 1 33 126 23 8 26 15 12 5.5 2.1 1.9 2011 0 1 16 98 24 9 23 12 12 8 2.1 1.8 2011 0 1 20 95 14 4 24 8 11 1 2.4 2.4 2011 0 1 37 110 52 4 21 10 9 5 1.9 1.8 2011 0 1 35 70 15 5 21 16 11 4.5 1.8 1.9 2011 0 0 33 102 23 4 19 16 12 3 1.8 1.8 2011 0 1 27 86 19 5 8 10 12 3 2.2 2.1 2011 0 1 41 130 35 4 17 18 14 8 2.4 1.9 2011 0 1 40 96 24 4 20 12 8 2.5 1.8 2.2 2011 0 0 35 102 39 7 11 16 10 7 2.4 2 2011 0 0 28 100 29 10 8 10 9 0 1.8 1.7 2011 0 0 32 94 13 4 15 14 10 1 1.9 1.7 2011 0 0 22 52 8 5 18 12 9 3.5 2.4 1.8 2011 0 0 44 98 18 4 18 11 10 5.5 2.1 1.9 2011 0 0 27 118 24 4 19 15 12 5.5 1.9 1.8 2011 0 1 17 99 19 4 19 7 11 0.5 2.1 1 2012 1 1 12 48 23 6 23 16 9 7.5 2.7 1 2012 1 1 45 50 16 4 22 16 11 9 2.1 4 2012 1 1 37 150 33 8 21 16 12 9.5 2.1 4 2012 1 1 37 154 32 5 25 16 12 8.5 2.1 3 2012 0 0 108 109 37 4 30 12 7 7 2.1 2 2012 0 1 10 68 14 17 17 15 12 8 2.1 4 2012 1 1 68 194 52 4 27 14 12 10 2.1 4 2012 1 0 72 158 75 4 23 15 12 7 2.1 4 2012 1 1 143 159 72 8 23 16 10 8.5 2.1 2 2012 1 0 9 67 15 4 18 13 15 9 2.4 4 2012 1 0 55 147 29 7 18 10 10 9.5 1.95 1 2012 1 1 17 39 13 4 23 17 15 4 2.1 3 2012 1 1 37 100 40 4 19 15 10 6 2.1 3 2012 1 1 27 111 19 5 15 18 15 8 1.95 4 2012 1 1 37 138 24 7 20 16 9 5.5 2.1 3 2012 1 1 58 101 121 4 16 20 15 9.5 2.4 4 2012 0 1 66 131 93 4 24 16 12 7.5 2.1 3 2012 1 1 21 101 36 7 25 17 13 7 2.25 3 2012 1 1 19 114 23 11 25 16 12 7.5 2.4 4 2012 1 0 78 165 85 7 19 15 12 8 2.25 3 2012 1 1 35 114 41 4 19 13 8 7 2.55 3 2012 1 1 48 111 46 4 16 16 9 7 1.95 2 2012 1 1 27 75 18 4 19 16 15 6 2.4 2 2012 1 1 43 82 35 4 19 16 12 10 2.1 3 2012 1 1 30 121 17 4 23 17 12 2.5 2.1 1 2012 1 1 25 32 4 4 21 20 15 9 2.4 4 2012 1 0 69 150 28 6 22 14 11 8 2.1 3 2012 1 1 72 117 44 8 19 17 12 6 2.1 2 2012 0 1 23 71 10 23 20 6 6 8.5 2.25 4 2012 1 1 13 165 38 4 20 16 14 6 2.25 4 2012 1 1 61 154 57 8 3 15 12 9 2.4 4 2012 1 1 43 126 23 6 23 16 12 8 2.1 4 2012 1 0 51 149 36 4 23 16 12 9 2.4 4 2012 1 0 67 145 22 7 20 14 11 5.5 2.1 3 2012 1 1 36 120 40 4 15 16 12 7 2.1 3 2012 1 0 44 109 31 4 16 16 12 5.5 2.25 4 2012 1 0 45 132 11 4 7 16 12 9 2.25 4 2012 1 1 34 172 38 10 24 14 12 2 2.4 4 2012 1 0 36 169 24 6 17 14 8 8.5 2.25 3 2012 1 1 72 114 37 5 24 16 8 9 2.25 4 2012 1 1 39 156 37 5 24 16 12 8.5 2.1 4 2012 1 0 43 172 22 4 19 15 12 9 2.1 2 2012 0 1 25 68 15 4 25 16 11 7.5 2.1 2 2012 0 1 56 89 2 5 20 16 10 10 2.7 4 2012 1 1 80 167 43 5 28 18 11 9 2.1 3 2012 1 0 40 113 31 5 23 15 12 7.5 2.1 3 2012 0 0 73 115 29 5 27 16 13 6 2.25 2 2012 0 0 34 78 45 4 18 16 12 10.5 2.7 3 2012 0 0 72 118 25 6 28 16 12 8.5 2.4 2 2012 0 1 42 87 4 4 21 17 10 8 2.1 4 2012 1 0 61 173 31 4 19 14 10 10 2.1 1 2012 1 1 23 2 -4 4 23 18 11 10.5 2.4 4 2012 0 0 74 162 66 9 27 9 8 6.5 1.95 1 2012 0 1 16 49 61 18 22 15 12 9.5 2.7 4 2012 0 0 66 122 32 6 28 14 9 8.5 2.1 3 2012 0 1 9 96 31 5 25 15 12 7.5 2.25 3 2012 0 0 41 100 39 4 21 13 9 5 2.1 2 2012 0 0 57 82 19 11 22 16 11 8 2.7 3 2012 0 1 48 100 31 4 28 20 15 10 2.1 3 2012 0 0 51 115 36 10 20 14 8 7 2.1 4 2012 0 1 53 141 42 6 29 12 8 7.5 1.65 4 2012 1 1 29 165 21 8 25 15 11 7.5 1.65 4 2012 1 1 29 165 21 8 25 15 11 9.5 2.1 3 2012 0 1 55 110 25 6 20 15 11 6 2.1 3 2012 1 1 54 118 32 8 20 16 13 10 2.1 4 2012 1 0 43 158 26 4 16 11 7 7 2.1 4 2012 0 1 51 146 28 4 20 16 12 3 2.1 1 2012 1 0 20 49 32 9 20 7 8 6 2.4 2 2012 0 0 79 90 41 9 23 11 8 7 2.4 3 2012 0 0 39 121 29 5 18 9 4 10 2.1 4 2012 1 1 61 155 33 4 25 15 11 7 2.25 3 2012 0 0 55 104 17 4 18 16 10 3.5 2.4 4 2012 0 1 30 147 13 15 19 14 7 8 2.1 3 2012 0 0 55 110 32 10 25 15 12 10 2.1 3 2012 0 0 22 108 30 9 25 13 11 5.5 2.4 3 2012 0 0 37 113 34 7 25 13 9 6 2.4 3 2012 0 0 2 115 59 9 24 12 10 6.5 2.1 1 2012 0 1 38 61 13 6 19 16 8 6.5 2.1 1 2012 0 1 27 60 23 4 26 14 8 8.5 2.4 3 2012 0 1 56 109 10 7 10 16 11 4 2.1 2 2012 0 1 25 68 5 4 17 14 12 9.5 2.7 3 2012 0 0 39 111 31 7 13 15 10 8 2.1 2 2012 0 0 33 77 19 4 17 10 10 8.5 2.1 2 2012 0 1 43 73 32 15 30 16 12 5.5 2.25 4 2012 1 0 57 151 30 4 25 14 8 7 2.1 2 2012 0 0 43 89 25 9 4 16 11 9 2.4 2 2012 0 0 23 78 48 4 16 12 8 8 2.25 3 2012 0 0 44 110 35 4 21 16 10 10 2.25 4 2012 1 1 54 220 67 28 23 16 14 8 2.1 2 2012 0 1 28 65 15 4 22 15 9 6 2.1 4 2012 1 0 36 141 22 4 17 14 9 8 2.4 3 2012 0 0 39 117 18 4 20 16 10 5 2.25 4 2012 1 1 16 122 33 5 20 11 13 9 2.1 2 2012 0 0 23 63 46 4 22 15 12 4.5 2.1 1 2012 1 1 40 44 24 4 16 18 13 8.5 1.65 1 2012 0 1 24 52 14 12 23 13 8 9.5 2.7 4 2012 0 0 78 131 12 4 0 7 3 8.5 2.1 3 2012 0 1 57 101 38 6 18 7 8 7.5 1.95 1 2012 0 1 37 42 12 6 25 17 12 7.5 2.25 4 2012 1 1 27 152 28 5 23 18 11 5 2.4 3 2012 1 0 61 107 41 4 12 15 9 7 1.95 2 2012 0 0 27 77 12 4 18 8 12 8 2.1 4 2012 1 0 69 154 31 4 24 13 12 5.5 2.4 3 2012 1 1 34 103 33 10 11 13 12 8.5 2.1 3 2012 0 1 44 96 34 7 18 15 10 9.5 2.4 4 2012 1 1 34 175 21 4 23 18 13 7 2.4 1 2012 0 1 39 57 20 7 24 16 9 8 2.4 3 2012 0 0 51 112 44 4 29 14 12 8.5 2.25 4 2012 1 0 34 143 52 4 18 15 11 3.5 2.4 1 2012 0 0 31 49 7 12 15 19 14 6.5 2.1 3 2012 1 1 13 110 29 5 29 16 11 6.5 2.1 4 2012 1 1 12 131 11 8 16 12 9 10.5 1.8 4 2012 1 0 51 167 26 6 19 16 12 8.5 2.7 1 2012 0 0 24 56 24 17 22 11 8 8 2.1 4 2012 1 0 19 137 7 4 16 16 15 10 2.1 2 2012 0 1 30 86 60 5 23 15 12 10 2.4 3 2012 1 1 81 121 13 4 23 19 14 9.5 2.55 4 2012 1 0 42 149 20 5 19 15 12 9 2.55 4 2012 1 0 22 168 52 5 4 14 9 10 2.1 4 2012 1 0 85 140 28 6 20 14 9 7.5 2.1 2 2012 0 1 27 88 25 4 24 17 13 4.5 2.1 4 2012 1 1 25 168 39 4 20 16 13 4.5 2.25 2 2012 1 1 22 94 9 4 4 20 15 0.5 2.25 1 2012 1 1 19 51 19 6 24 16 11 6.5 2.1 1 2012 0 0 14 48 13 8 22 9 7 4.5 2.1 4 2012 1 1 45 145 60 10 16 13 10 5.5 1.95 2 2012 1 1 45 66 19 4 3 15 11 5 2.4 2 2012 0 1 28 85 34 5 15 19 14 6 2.1 3 2012 1 0 51 109 14 4 24 16 14 4 2.4 2 2012 0 0 41 63 17 4 17 17 13 8 2.4 3 2012 0 1 31 102 45 4 20 16 12 10.5 2.4 4 2012 0 0 74 162 66 16 27 9 8 6.5 1.95 2 2012 0 1 19 86 48 7 26 11 13 8 2.1 3 2012 0 1 51 114 29 4 23 14 9 8.5 2.1 4 2012 1 0 73 164 -2 4 17 19 12 5.5 2.55 3 2012 1 1 24 119 51 14 20 13 13 7 2.1 4 2012 1 0 61 126 2 5 22 14 11 5 2.1 4 2012 1 1 23 132 24 5 19 15 11 3.5 2.1 4 2012 1 1 14 142 40 5 24 15 13 5 1.95 2 2012 1 0 54 83 20 5 19 14 12 9 2.25 2 2012 0 1 51 94 19 7 23 16 12 8.5 2.4 2 2012 0 0 62 81 16 19 15 17 10 5 1.95 4 2012 1 1 36 166 20 16 27 12 9 9.5 2.1 3 2012 0 0 59 110 40 4 26 15 10 3 2.1 2 2012 0 1 24 64 27 4 22 17 13 1.5 1.95 2 2012 1 0 26 93 25 7 22 15 13 6 2.1 3 2012 0 0 54 104 49 9 18 10 9 0.5 2.1 3 2012 0 1 39 105 39 5 15 16 11 6.5 1.95 1 2012 0 1 16 49 61 14 22 15 12 7.5 2.1 2 2012 0 0 36 88 19 4 27 11 8 4.5 1.95 2 2012 0 1 31 95 67 16 10 16 12 8 2.4 3 2012 0 1 31 102 45 10 20 16 12 9 2.4 3 2012 0 0 42 99 30 5 17 16 12 7.5 2.4 2 2012 0 1 39 63 8 6 23 14 9 8.5 1.95 2 2012 0 0 25 76 19 4 19 14 12 7 2.7 3 2012 0 0 31 109 52 4 13 16 12 9.5 2.1 3 2012 0 1 38 117 22 4 27 16 11 6.5 1.95 1 2012 0 1 31 57 17 5 23 18 12 9.5 2.1 3 2012 0 0 17 120 33 4 16 14 6 6 1.95 2 2012 0 1 22 73 34 4 25 20 7 8 2.1 2 2012 0 0 55 91 22 5 2 15 10 9.5 2.25 3 2012 0 0 62 108 30 4 26 16 12 8 2.7 3 2012 0 1 51 105 25 4 20 16 10 8 2.1 3 2012 1 0 30 117 38 5 23 16 12 9 2.4 3 2012 0 0 49 119 26 8 22 12 9 5 1.35 1 2012 0 1 16 31 13 15 24 8 3
Names of X columns:
Ex PA PR year group gender CH LFM PRH AMS.A NUMERACYTOT CONFSTATTOT CONFSOFTTOT
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
No Linear Trend
Linear Trend
First Differences
Seasonal Differences (s)
First and Seasonal Differences (s)
Degree of Predetermination (lagged endogenous variables)
Degree of Seasonal Predetermination
Seasonality
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
library(lattice) library(lmtest) n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test mywarning <- '' par1 <- as.numeric(par1) if(is.na(par1)) { par1 <- 1 mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.' } if (par4=='') par4 <- 0 par4 <- as.numeric(par4) if (par5=='') par5 <- 0 par5 <- as.numeric(par5) x <- na.omit(t(y)) k <- length(x[1,]) n <- length(x[,1]) x1 <- cbind(x[,par1], x[,1:k!=par1]) mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) colnames(x1) <- mycolnames #colnames(x)[par1] x <- x1 if (par3 == 'First Differences'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 } if (par3 == 'Seasonal Differences (s=12)'){ (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if (par3 == 'First and Seasonal Differences (s=12)'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if(par4 > 0) { x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep=''))) for (i in 1:(n-par4)) { for (j in 1:par4) { x2[i,j] <- x[i+par4-j,par1] } } x <- cbind(x[(par4+1):n,], x2) n <- n - par4 } if(par5 > 0) { x2 <- array(0, dim=c(n-par5*12,par5), dimnames=list(1:(n-par5*12), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep=''))) for (i in 1:(n-par5*12)) { for (j in 1:par5) { x2[i,j] <- x[i+par5*12-j*12,par1] } } x <- cbind(x[(par5*12+1):n,], x2) n <- n - par5*12 } if (par2 == 'Include Monthly Dummies'){ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) for (i in 1:11){ x2[seq(i,n,12),i] <- 1 } x <- cbind(x, x2) } if (par2 == 'Include Quarterly Dummies'){ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) for (i in 1:3){ x2[seq(i,n,4),i] <- 1 } x <- cbind(x, x2) } (k <- length(x[n,])) if (par3 == 'Linear Trend'){ x <- cbind(x, c(1:n)) colnames(x)[k+1] <- 't' } x (k <- length(x[n,])) head(x) df <- as.data.frame(x) (mylm <- lm(df)) (mysum <- summary(mylm)) if (n > n25) { kp3 <- k + 3 nmkm3 <- n - k - 3 gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) numgqtests <- 0 numsignificant1 <- 0 numsignificant5 <- 0 numsignificant10 <- 0 for (mypoint in kp3:nmkm3) { j <- 0 numgqtests <- numgqtests + 1 for (myalt in c('greater', 'two.sided', 'less')) { j <- j + 1 gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value } if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 } gqarr } bitmap(file='test0.png') plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') points(x[,1]-mysum$resid) grid() dev.off() bitmap(file='test1.png') plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') grid() dev.off() bitmap(file='test2.png') hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') grid() dev.off() bitmap(file='test3.png') densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') dev.off() bitmap(file='test4.png') qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') qqline(mysum$resid) grid() dev.off() (myerror <- as.ts(mysum$resid)) bitmap(file='test5.png') dum <- cbind(lag(myerror,k=1),myerror) dum dum1 <- dum[2:length(myerror),] dum1 z <- as.data.frame(dum1) z plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') lines(lowess(z)) abline(lm(z)) grid() dev.off() bitmap(file='test6.png') acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') grid() dev.off() bitmap(file='test7.png') pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') grid() dev.off() bitmap(file='test8.png') opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) plot(mylm, las = 1, sub='Residual Diagnostics') par(opar) dev.off() if (n > n25) { bitmap(file='test9.png') plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') grid() dev.off() } load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) a<-table.row.end(a) myeq <- colnames(x)[1] myeq <- paste(myeq, '[t] = ', sep='') for (i in 1:k){ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') myeq <- paste(myeq, signif(mysum$coefficients[i,1],6), sep=' ') if (rownames(mysum$coefficients)[i] != '(Intercept)') { myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') } } myeq <- paste(myeq, ' + e[t]') a<-table.row.start(a) a<-table.element(a, myeq) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, mywarning) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Variable',header=TRUE) a<-table.element(a,'Parameter',header=TRUE) a<-table.element(a,'S.D.',header=TRUE) a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE) a<-table.element(a,'2-tail p-value',header=TRUE) a<-table.element(a,'1-tail p-value',header=TRUE) a<-table.row.end(a) for (i in 1:k){ a<-table.row.start(a) a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) a<-table.element(a,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' ')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable2.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Multiple R',1,TRUE) a<-table.element(a,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[2],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[3],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'p-value',1,TRUE) a<-table.element(a,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Residual Standard Deviation',1,TRUE) a<-table.element(a,formatC(signif(mysum$sigma,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') if(n < 200) { a<-table.start() a<-table.row.start(a) a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Time or Index', 1, TRUE) a<-table.element(a, 'Actuals', 1, TRUE) a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE) a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE) a<-table.row.end(a) for (i in 1:n) { a<-table.row.start(a) a<-table.element(a,i, 1, TRUE) a<-table.element(a,formatC(signif(x[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' ')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable4.tab') if (n > n25) { a<-table.start() a<-table.row.start(a) a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'p-values',header=TRUE) a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'breakpoint index',header=TRUE) a<-table.element(a,'greater',header=TRUE) a<-table.element(a,'2-sided',header=TRUE) a<-table.element(a,'less',header=TRUE) a<-table.row.end(a) for (mypoint in kp3:nmkm3) { a<-table.row.start(a) a<-table.element(a,mypoint,header=TRUE) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' ')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable5.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Description',header=TRUE) a<-table.element(a,'# significant tests',header=TRUE) a<-table.element(a,'% significant tests',header=TRUE) a<-table.element(a,'OK/NOK',header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'1% type I error level',header=TRUE) a<-table.element(a,signif(numsignificant1,6)) a<-table.element(a,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' ')) if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' a<-table.element(a,dum) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'5% type I error level',header=TRUE) a<-table.element(a,signif(numsignificant5,6)) a<-table.element(a,signif(numsignificant5/numgqtests,6)) if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' a<-table.element(a,dum) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'10% type I error level',header=TRUE) a<-table.element(a,signif(numsignificant10,6)) a<-table.element(a,signif(numsignificant10/numgqtests,6)) if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' a<-table.element(a,dum) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable6.tab') } }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation