Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5 7.8 0.88 0 2.6 0.098 25 67 0.9968 3.2 0.68 9.8 5 7.8 0.76 0.04 2.3 0.092 15 54 0.997 3.26 0.65 9.8 5 11.2 0.28 0.56 1.9 0.075 17 60 0.998 3.16 0.58 9.8 6 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5 7.4 0.66 0 1.8 0.075 13 40 0.9978 3.51 0.56 9.4 5 7.9 0.6 0.06 1.6 0.069 15 59 0.9964 3.3 0.46 9.4 5 7.3 0.65 0 1.2 0.065 15 21 0.9946 3.39 0.47 10 7 7.8 0.58 0.02 2 0.073 9 18 0.9968 3.36 0.57 9.5 7 7.5 0.5 0.36 6.1 0.071 17 102 0.9978 3.35 0.8 10.5 5 6.7 0.58 0.08 1.8 0.097 15 65 0.9959 3.28 0.54 9.2 5 7.5 0.5 0.36 6.1 0.071 17 102 0.9978 3.35 0.8 10.5 5 5.6 0.615 0 1.6 0.089 16 59 0.9943 3.58 0.52 9.9 5 7.8 0.61 0.29 1.6 0.114 9 29 0.9974 3.26 1.56 9.1 5 8.9 0.62 0.18 3.8 0.176 52 145 0.9986 3.16 0.88 9.2 5 8.9 0.62 0.19 3.9 0.17 51 148 0.9986 3.17 0.93 9.2 5 8.5 0.28 0.56 1.8 0.092 35 103 0.9969 3.3 0.75 10.5 7 8.1 0.56 0.28 1.7 0.368 16 56 0.9968 3.11 1.28 9.3 5 7.4 0.59 0.08 4.4 0.086 6 29 0.9974 3.38 0.5 9 4 7.9 0.32 0.51 1.8 0.341 17 56 0.9969 3.04 1.08 9.2 6 8.9 0.22 0.48 1.8 0.077 29 60 0.9968 3.39 0.53 9.4 6 7.6 0.39 0.31 2.3 0.082 23 71 0.9982 3.52 0.65 9.7 5 7.9 0.43 0.21 1.6 0.106 10 37 0.9966 3.17 0.91 9.5 5 8.5 0.49 0.11 2.3 0.084 9 67 0.9968 3.17 0.53 9.4 5 6.9 0.4 0.14 2.4 0.085 21 40 0.9968 3.43 0.63 9.7 6 6.3 0.39 0.16 1.4 0.08 11 23 0.9955 3.34 0.56 9.3 5 7.6 0.41 0.24 1.8 0.08 4 11 0.9962 3.28 0.59 9.5 5 7.9 0.43 0.21 1.6 0.106 10 37 0.9966 3.17 0.91 9.5 5 7.1 0.71 0 1.9 0.08 14 35 0.9972 3.47 0.55 9.4 5 7.8 0.645 0 2 0.082 8 16 0.9964 3.38 0.59 9.8 6 6.7 0.675 0.07 2.4 0.089 17 82 0.9958 3.35 0.54 10.1 5 6.9 0.685 0 2.5 0.105 22 37 0.9966 3.46 0.57 10.6 6 8.3 0.655 0.12 2.3 0.083 15 113 0.9966 3.17 0.66 9.8 5 6.9 0.605 0.12 10.7 0.073 40 83 0.9993 3.45 0.52 9.4 6 5.2 0.32 0.25 1.8 0.103 13 50 0.9957 3.38 0.55 9.2 5 7.8 0.645 0 5.5 0.086 5 18 0.9986 3.4 0.55 9.6 6 7.8 0.6 0.14 2.4 0.086 3 15 0.9975 3.42 0.6 10.8 6 8.1 0.38 0.28 2.1 0.066 13 30 0.9968 3.23 0.73 9.7 7 5.7 1.13 0.09 1.5 0.172 7 19 0.994 3.5 0.48 9.8 4 7.3 0.45 0.36 5.9 0.074 12 87 0.9978 3.33 0.83 10.5 5 7.3 0.45 0.36 5.9 0.074 12 87 0.9978 3.33 0.83 10.5 5 8.8 0.61 0.3 2.8 0.088 17 46 0.9976 3.26 0.51 9.3 4 7.5 0.49 0.2 2.6 0.332 8 14 0.9968 3.21 0.9 10.5 6 8.1 0.66 0.22 2.2 0.069 9 23 0.9968 3.3 1.2 10.3 5 6.8 0.67 0.02 1.8 0.05 5 11 0.9962 3.48 0.52 9.5 5 4.6 0.52 0.15 2.1 0.054 8 65 0.9934 3.9 0.56 13.1 4 7.7 0.935 0.43 2.2 0.114 22 114 0.997 3.25 0.73 9.2 5 8.7 0.29 0.52 1.6 0.113 12 37 0.9969 3.25 0.58 9.5 5 6.4 0.4 0.23 1.6 0.066 5 12 0.9958 3.34 0.56 9.2 5 5.6 0.31 0.37 1.4 0.074 12 96 0.9954 3.32 0.58 9.2 5 8.8 0.66 0.26 1.7 0.074 4 23 0.9971 3.15 0.74 9.2 5 6.6 0.52 0.04 2.2 0.069 8 15 0.9956 3.4 0.63 9.4 6 6.6 0.5 0.04 2.1 0.068 6 14 0.9955 3.39 0.64 9.4 6 8.6 0.38 0.36 3 0.081 30 119 0.997 3.2 0.56 9.4 5 7.6 0.51 0.15 2.8 0.11 33 73 0.9955 3.17 0.63 10.2 6 7.7 0.62 0.04 3.8 0.084 25 45 0.9978 3.34 0.53 9.5 5 10.2 0.42 0.57 3.4 0.07 4 10 0.9971 3.04 0.63 9.6 5 7.5 0.63 0.12 5.1 0.111 50 110 0.9983 3.26 0.77 9.4 5 7.8 0.59 0.18 2.3 0.076 17 54 0.9975 3.43 0.59 10 5 7.3 0.39 0.31 2.4 0.074 9 46 0.9962 3.41 0.54 9.4 6 8.8 0.4 0.4 2.2 0.079 19 52 0.998 3.44 0.64 9.2 5 7.7 0.69 0.49 1.8 0.115 20 112 0.9968 3.21 0.71 9.3 5 7.5 0.52 0.16 1.9 0.085 12 35 0.9968 3.38 0.62 9.5 7 7 0.735 0.05 2 0.081 13 54 0.9966 3.39 0.57 9.8 5 7.2 0.725 0.05 4.65 0.086 4 11 0.9962 3.41 0.39 10.9 5 7.2 0.725 0.05 4.65 0.086 4 11 0.9962 3.41 0.39 10.9 5 7.5 0.52 0.11 1.5 0.079 11 39 0.9968 3.42 0.58 9.6 5 6.6 0.705 0.07 1.6 0.076 6 15 0.9962 3.44 0.58 10.7 5 9.3 0.32 0.57 2 0.074 27 65 0.9969 3.28 0.79 10.7 5 8 0.705 0.05 1.9 0.074 8 19 0.9962 3.34 0.95 10.5 6 7.7 0.63 0.08 1.9 0.076 15 27 0.9967 3.32 0.54 9.5 6 7.7 0.67 0.23 2.1 0.088 17 96 0.9962 3.32 0.48 9.5 5 7.7 0.69 0.22 1.9 0.084 18 94 0.9961 3.31 0.48 9.5 5 8.3 0.675 0.26 2.1 0.084 11 43 0.9976 3.31 0.53 9.2 4 9.7 0.32 0.54 2.5 0.094 28 83 0.9984 3.28 0.82 9.6 5 8.8 0.41 0.64 2.2 0.093 9 42 0.9986 3.54 0.66 10.5 5 8.8 0.41 0.64 2.2 0.093 9 42 0.9986 3.54 0.66 10.5 5 6.8 0.785 0 2.4 0.104 14 30 0.9966 3.52 0.55 10.7 6 6.7 0.75 0.12 2 0.086 12 80 0.9958 3.38 0.52 10.1 5 8.3 0.625 0.2 1.5 0.08 27 119 0.9972 3.16 1.12 9.1 4 6.2 0.45 0.2 1.6 0.069 3 15 0.9958 3.41 0.56 9.2 5 7.8 0.43 0.7 1.9 0.464 22 67 0.9974 3.13 1.28 9.4 5 7.4 0.5 0.47 2 0.086 21 73 0.997 3.36 0.57 9.1 5 7.3 0.67 0.26 1.8 0.401 16 51 0.9969 3.16 1.14 9.4 5 6.3 0.3 0.48 1.8 0.069 18 61 0.9959 3.44 0.78 10.3 6 6.9 0.55 0.15 2.2 0.076 19 40 0.9961 3.41 0.59 10.1 5 8.6 0.49 0.28 1.9 0.11 20 136 0.9972 2.93 1.95 9.9 6 7.7 0.49 0.26 1.9 0.062 9 31 0.9966 3.39 0.64 9.6 5 9.3 0.39 0.44 2.1 0.107 34 125 0.9978 3.14 1.22 9.5 5 7 0.62 0.08 1.8 0.076 8 24 0.9978 3.48 0.53 9 5 7.9 0.52 0.26 1.9 0.079 42 140 0.9964 3.23 0.54 9.5 5 8.6 0.49 0.28 1.9 0.11 20 136 0.9972 2.93 1.95 9.9 6 8.6 0.49 0.29 2 0.11 19 133 0.9972 2.93 1.98 9.8 5 7.7 0.49 0.26 1.9 0.062 9 31 0.9966 3.39 0.64 9.6 5 5 1.02 0.04 1.4 0.045 41 85 0.9938 3.75 0.48 10.5 4 4.7 0.6 0.17 2.3 0.058 17 106 0.9932 3.85 0.6 12.9 6 6.8 0.775 0 3 0.102 8 23 0.9965 3.45 0.56 10.7 5 7 0.5 0.25 2 0.07 3 22 0.9963 3.25 0.63 9.2 5 7.6 0.9 0.06 2.5 0.079 5 10 0.9967 3.39 0.56 9.8 5 8.1 0.545 0.18 1.9 0.08 13 35 0.9972 3.3 0.59 9 6 8.3 0.61 0.3 2.1 0.084 11 50 0.9972 3.4 0.61 10.2 6 7.8 0.5 0.3 1.9 0.075 8 22 0.9959 3.31 0.56 10.4 6 8.1 0.545 0.18 1.9 0.08 13 35 0.9972 3.3 0.59 9 6 8.1 0.575 0.22 2.1 0.077 12 65 0.9967 3.29 0.51 9.2 5 7.2 0.49 0.24 2.2 0.07 5 36 0.996 3.33 0.48 9.4 5 8.1 0.575 0.22 2.1 0.077 12 65 0.9967 3.29 0.51 9.2 5 7.8 0.41 0.68 1.7 0.467 18 69 0.9973 3.08 1.31 9.3 5 6.2 0.63 0.31 1.7 0.088 15 64 0.9969 3.46 0.79 9.3 5 8 0.33 0.53 2.5 0.091 18 80 0.9976 3.37 0.8 9.6 6 8.1 0.785 0.52 2 0.122 37 153 0.9969 3.21 0.69 9.3 5 7.8 0.56 0.19 1.8 0.104 12 47 0.9964 3.19 0.93 9.5 5 8.4 0.62 0.09 2.2 0.084 11 108 0.9964 3.15 0.66 9.8 5 8.4 0.6 0.1 2.2 0.085 14 111 0.9964 3.15 0.66 9.8 5 10.1 0.31 0.44 2.3 0.08 22 46 0.9988 3.32 0.67 9.7 6 7.8 0.56 0.19 1.8 0.104 12 47 0.9964 3.19 0.93 9.5 5 9.4 0.4 0.31 2.2 0.09 13 62 0.9966 3.07 0.63 10.5 6 8.3 0.54 0.28 1.9 0.077 11 40 0.9978 3.39 0.61 10 6 7.8 0.56 0.12 2 0.082 7 28 0.997 3.37 0.5 9.4 6 8.8 0.55 0.04 2.2 0.119 14 56 0.9962 3.21 0.6 10.9 6 7 0.69 0.08 1.8 0.097 22 89 0.9959 3.34 0.54 9.2 6 7.3 1.07 0.09 1.7 0.178 10 89 0.9962 3.3 0.57 9 5 8.8 0.55 0.04 2.2 0.119 14 56 0.9962 3.21 0.6 10.9 6 7.3 0.695 0 2.5 0.075 3 13 0.998 3.49 0.52 9.2 5 8 0.71 0 2.6 0.08 11 34 0.9976 3.44 0.53 9.5 5 7.8 0.5 0.17 1.6 0.082 21 102 0.996 3.39 0.48 9.5 5 9 0.62 0.04 1.9 0.146 27 90 0.9984 3.16 0.7 9.4 5 8.2 1.33 0 1.7 0.081 3 12 0.9964 3.53 0.49 10.9 5 8.1 1.33 0 1.8 0.082 3 12 0.9964 3.54 0.48 10.9 5 8 0.59 0.16 1.8 0.065 3 16 0.9962 3.42 0.92 10.5 7 6.1 0.38 0.15 1.8 0.072 6 19 0.9955 3.42 0.57 9.4 5 8 0.745 0.56 2 0.118 30 134 0.9968 3.24 0.66 9.4 5 5.6 0.5 0.09 2.3 0.049 17 99 0.9937 3.63 0.63 13 5 5.6 0.5 0.09 2.3 0.049 17 99 0.9937 3.63 0.63 13 5 6.6 0.5 0.01 1.5 0.06 17 26 0.9952 3.4 0.58 9.8 6 7.9 1.04 0.05 2.2 0.084 13 29 0.9959 3.22 0.55 9.9 6 8.4 0.745 0.11 1.9 0.09 16 63 0.9965 3.19 0.82 9.6 5 8.3 0.715 0.15 1.8 0.089 10 52 0.9968 3.23 0.77 9.5 5 7.2 0.415 0.36 2 0.081 13 45 0.9972 3.48 0.64 9.2 5 7.8 0.56 0.19 2.1 0.081 15 105 0.9962 3.33 0.54 9.5 5 7.8 0.56 0.19 2 0.081 17 108 0.9962 3.32 0.54 9.5 5 8.4 0.745 0.11 1.9 0.09 16 63 0.9965 3.19 0.82 9.6 5 8.3 0.715 0.15 1.8 0.089 10 52 0.9968 3.23 0.77 9.5 5 5.2 0.34 0 1.8 0.05 27 63 0.9916 3.68 0.79 14 6 6.3 0.39 0.08 1.7 0.066 3 20 0.9954 3.34 0.58 9.4 5 5.2 0.34 0 1.8 0.05 27 63 0.9916 3.68 0.79 14 6 8.1 0.67 0.55 1.8 0.117 32 141 0.9968 3.17 0.62 9.4 5 5.8 0.68 0.02 1.8 0.087 21 94 0.9944 3.54 0.52 10 5 7.6 0.49 0.26 1.6 0.236 10 88 0.9968 3.11 0.8 9.3 5 6.9 0.49 0.1 2.3 0.074 12 30 0.9959 3.42 0.58 10.2 6 8.2 0.4 0.44 2.8 0.089 11 43 0.9975 3.53 0.61 10.5 6 7.3 0.33 0.47 2.1 0.077 5 11 0.9958 3.33 0.53 10.3 6 9.2 0.52 1 3.4 0.61 32 69 0.9996 2.74 2 9.4 4 7.5 0.6 0.03 1.8 0.095 25 99 0.995 3.35 0.54 10.1 5 7.5 0.6 0.03 1.8 0.095 25 99 0.995 3.35 0.54 10.1 5 7.1 0.43 0.42 5.5 0.07 29 129 0.9973 3.42 0.72 10.5 5 7.1 0.43 0.42 5.5 0.071 28 128 0.9973 3.42 0.71 10.5 5 7.1 0.43 0.42 5.5 0.07 29 129 0.9973 3.42 0.72 10.5 5 7.1 0.43 0.42 5.5 0.071 28 128 0.9973 3.42 0.71 10.5 5 7.1 0.68 0 2.2 0.073 12 22 0.9969 3.48 0.5 9.3 5 6.8 0.6 0.18 1.9 0.079 18 86 0.9968 3.59 0.57 9.3 6 7.6 0.95 0.03 2 0.09 7 20 0.9959 3.2 0.56 9.6 5 7.6 0.68 0.02 1.3 0.072 9 20 0.9965 3.17 1.08 9.2 4 7.8 0.53 0.04 1.7 0.076 17 31 0.9964 3.33 0.56 10 6 7.4 0.6 0.26 7.3 0.07 36 121 0.9982 3.37 0.49 9.4 5 7.3 0.59 0.26 7.2 0.07 35 121 0.9981 3.37 0.49 9.4 5 7.8 0.63 0.48 1.7 0.1 14 96 0.9961 3.19 0.62 9.5 5 6.8 0.64 0.1 2.1 0.085 18 101 0.9956 3.34 0.52 10.2 5 7.3 0.55 0.03 1.6 0.072 17 42 0.9956 3.37 0.48 9 4 6.8 0.63 0.07 2.1 0.089 11 44 0.9953 3.47 0.55 10.4 6 7.5 0.705 0.24 1.8 0.36 15 63 0.9964 3 1.59 9.5 5 7.9 0.885 0.03 1.8 0.058 4 8 0.9972 3.36 0.33 9.1 4 8 0.42 0.17 2 0.073 6 18 0.9972 3.29 0.61 9.2 6 8 0.42 0.17 2 0.073 6 18 0.9972 3.29 0.61 9.2 6 7.4 0.62 0.05 1.9 0.068 24 42 0.9961 3.42 0.57 11.5 6 7.3 0.38 0.21 2 0.08 7 35 0.9961 3.33 0.47 9.5 5 6.9 0.5 0.04 1.5 0.085 19 49 0.9958 3.35 0.78 9.5 5 7.3 0.38 0.21 2 0.08 7 35 0.9961 3.33 0.47 9.5 5 7.5 0.52 0.42 2.3 0.087 8 38 0.9972 3.58 0.61 10.5 6 7 0.805 0 2.5 0.068 7 20 0.9969 3.48 0.56 9.6 5 8.8 0.61 0.14 2.4 0.067 10 42 0.9969 3.19 0.59 9.5 5 8.8 0.61 0.14 2.4 0.067 10 42 0.9969 3.19 0.59 9.5 5 8.9 0.61 0.49 2 0.27 23 110 0.9972 3.12 1.02 9.3 5 7.2 0.73 0.02 2.5 0.076 16 42 0.9972 3.44 0.52 9.3 5 6.8 0.61 0.2 1.8 0.077 11 65 0.9971 3.54 0.58 9.3 5 6.7 0.62 0.21 1.9 0.079 8 62 0.997 3.52 0.58 9.3 6 8.9 0.31 0.57 2 0.111 26 85 0.9971 3.26 0.53 9.7 5 7.4 0.39 0.48 2 0.082 14 67 0.9972 3.34 0.55 9.2 5 7.7 0.705 0.1 2.6 0.084 9 26 0.9976 3.39 0.49 9.7 5 7.9 0.5 0.33 2 0.084 15 143 0.9968 3.2 0.55 9.5 5 7.9 0.49 0.32 1.9 0.082 17 144 0.9968 3.2 0.55 9.5 5 8.2 0.5 0.35 2.9 0.077 21 127 0.9976 3.23 0.62 9.4 5 6.4 0.37 0.25 1.9 0.074 21 49 0.9974 3.57 0.62 9.8 6 6.8 0.63 0.12 3.8 0.099 16 126 0.9969 3.28 0.61 9.5 5 7.6 0.55 0.21 2.2 0.071 7 28 0.9964 3.28 0.55 9.7 5 7.6 0.55 0.21 2.2 0.071 7 28 0.9964 3.28 0.55 9.7 5 7.8 0.59 0.33 2 0.074 24 120 0.9968 3.25 0.54 9.4 5 7.3 0.58 0.3 2.4 0.074 15 55 0.9968 3.46 0.59 10.2 5 11.5 0.3 0.6 2 0.067 12 27 0.9981 3.11 0.97 10.1 6 5.4 0.835 0.08 1.2 0.046 13 93 0.9924 3.57 0.85 13 7 6.9 1.09 0.06 2.1 0.061 12 31 0.9948 3.51 0.43 11.4 4
Names of X columns:
fixedacidity volatileacidity citricacid residualsugar chlorides freesulfurdioxide totalsulfurdioxide density pH sulphates alcohol quality
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 par1 <- as.numeric(par1) x <- 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'){ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) for (i in 1:n-1) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 } 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[1,]) if (par3 == 'Linear Trend'){ x <- cbind(x, c(1:n)) colnames(x)[k+1] <- 't' } x k <- length(x[1,]) 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, mysum$coefficients[i,1], 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.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,mysum$coefficients[i,1]) a<-table.element(a, round(mysum$coefficients[i,2],6)) a<-table.element(a, round(mysum$coefficients[i,3],4)) a<-table.element(a, round(mysum$coefficients[i,4],6)) a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) 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, sqrt(mysum$r.squared)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a, mysum$r.squared) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a, mysum$adj.r.squared) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a, mysum$fstatistic[1]) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) a<-table.element(a, mysum$fstatistic[2]) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) a<-table.element(a, mysum$fstatistic[3]) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'p-value',1,TRUE) a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) 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, mysum$sigma) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a, sum(myerror*myerror)) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') 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,x[i]) a<-table.element(a,x[i]-mysum$resid[i]) a<-table.element(a,mysum$resid[i]) 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,gqarr[mypoint-kp3+1,1]) a<-table.element(a,gqarr[mypoint-kp3+1,2]) a<-table.element(a,gqarr[mypoint-kp3+1,3]) 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,numsignificant1) a<-table.element(a,numsignificant1/numgqtests) 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,numsignificant5) a<-table.element(a,numsignificant5/numgqtests) 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,numsignificant10) a<-table.element(a,numsignificant10/numgqtests) 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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation