Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
15.27 .21 .90 .85 .92 .59 .62 .98 1.19 .99 -.73 -.05 .17 .57 16.00 13.09 14.63 15.66 16.12 15.18 .20 .90 .84 .95 .58 .62 .96 1.17 .96 -.72 -.03 .17 .59 15.92 13.08 14.52 15.52 16.24 15.13 .19 .89 .86 .94 .58 .61 .97 1.17 .95 -.72 -.03 .19 .57 15.86 13.13 14.65 15.54 16.06 15.14 .20 .89 .82 .95 .59 .60 .98 1.17 .95 -.72 -.05 .17 .57 15.87 13.14 14.64 15.51 15.91 15.10 .19 .89 .81 .95 .58 .59 .97 1.18 .93 -.72 -.04 .17 .59 15.82 13.06 14.56 15.45 15.87 15.17 .20 .88 .84 .96 .57 .61 .97 1.18 .94 -.71 -.04 .17 .60 15.89 13.05 14.54 15.41 15.85 15.11 .19 .88 .82 .95 .56 .61 .97 1.18 .97 -.72 -.06 .16 .60 15.83 13.12 14.53 15.40 15.92 15.09 .19 .88 .79 .95 .57 .58 .94 1.18 .98 -.72 -.04 .17 .60 15.83 13.12 14.57 15.45 15.95 15.10 .17 .88 .81 .95 .57 .59 .94 1.17 .97 -.72 -.03 .16 .58 15.80 13.03 14.51 15.38 15.95 15.06 .17 .87 .85 .94 .55 .58 .96 1.17 .97 -.72 -.03 .17 .58 15.79 13.06 14.51 15.36 15.91 15.03 .18 .88 .86 .93 .56 .55 .91 1.17 .96 -.71 -.04 .19 .59 15.79 13.02 14.49 15.32 15.92 15.03 .17 .87 .80 .92 .53 .55 .88 1.17 .96 -.72 -.05 .16 .57 15.81 13.02 14.55 15.35 15.90 15.13 .17 .86 .84 .92 .54 .57 .92 1.17 .97 -.72 -.04 .19 .59 15.88 12.96 14.60 15.41 15.90 15.02 .18 .88 .82 .95 .57 .57 .91 1.18 .91 -.71 -.04 .19 .60 15.78 13.04 14.50 15.37 15.88 15.01 .19 .86 .83 .97 .57 .55 .92 1.18 .93 -.70 -.03 .20 .59 15.78 13.03 14.52 15.38 15.84 15.04 .19 .85 .84 .97 .57 .57 .93 1.17 .92 -.70 -.04 .17 .59 15.80 13.02 14.57 15.40 15.85 15.02 .18 .85 .89 .96 .57 .56 .92 1.18 .94 -.70 -.06 .20 .58 15.82 12.98 14.61 15.36 15.95 15.00 .18 .86 .90 .97 .57 .58 .92 1.18 .96 -.70 -.05 .22 .59 15.82 13.04 14.59 15.34 15.89 15.13 .19 .86 .91 .98 .57 .58 .91 1.17 .96 -.68 -.06 .21 .60 16.04 12.95 14.86 15.47 16.07 15.06 .19 .88 .90 .97 .58 .58 .91 1.17 .95 -.68 -.07 .20 .59 15.91 12.98 14.71 15.34 15.99 14.90 .19 .86 .89 .95 .58 .58 .92 1.17 .88 -.68 -.02 .21 .60 15.69 13.11 14.49 15.28 15.85 14.91 .18 .85 .86 .94 .57 .56 .90 1.18 .83 -.69 -.07 .19 .55 15.66 13.07 14.58 15.37 15.94 14.92 .19 .86 .85 .95 .56 .57 .92 1.18 .94 -.70 -.07 .20 .57 15.67 13.02 14.54 15.37 15.91 14.97 .19 .85 .77 .94 .58 .57 .92 1.18 .94 -.69 -.04 .21 .58 15.73 13.02 14.58 15.40 15.88 14.97 .19 .85 .80 .95 .59 .57 .92 1.18 1.00 -.71 -.03 .17 .56 15.72 13.07 14.60 15.38 15.95 15.03 .18 .85 .77 .92 .57 .61 .95 1.19 .99 -.71 -.03 .19 .56 15.78 13.04 14.63 15.40 15.95 15.01 .18 .85 .79 .94 .56 .62 .93 1.18 1.01 -.70 -.06 .20 .54 15.75 13.14 14.58 15.37 15.94 15.02 .18 .85 .82 .97 .57 .61 .93 1.19 1.01 -.70 -.05 .20 .56 15.77 13.15 14.58 15.39 15.89 14.98 .18 .86 .80 1.00 .54 .60 .94 1.20 1.06 -.69 -.04 .20 .57 15.73 13.31 14.62 15.43 15.96 15.03 .18 .87 .84 1.01 .59 .60 .95 1.19 1.07 -.69 -.02 .20 .57 15.77 13.37 14.60 15.44 15.98 14.99 .20 .88 .85 1.01 .57 .60 .95 1.20 1.09 -.69 -.02 .20 .57 15.74 13.33 14.61 15.44 15.92 15.05 .20 .87 .85 .98 .59 .61 .95 1.20 1.08 -.69 -.03 .18 .55 15.80 13.32 14.63 15.48 15.94 15.04 .19 .87 .83 .96 .58 .61 .95 1.20 1.07 -.71 -.02 .19 .58 15.78 13.82 14.70 15.52 16.00 15.11 .23 .90 .84 .98 .60 .50 .95 1.21 1.09 -.70 -.02 .18 .54 15.89 13.53 14.66 15.48 16.08 15.14 .23 .88 .84 .99 .59 .50 .93 1.21 1.09 -.70 -.01 .21 .57 15.93 13.49 14.58 15.43 16.02 15.06 .24 .90 .84 .99 .59 .51 .95 1.21 1.08 -.72 -.01 .22 .50 15.83 13.47 14.74 15.59 15.97 15.10 .25 .88 .84 1.00 .56 .50 .93 1.22 1.08 -.69 -.03 .21 .53 15.86 13.81 14.61 15.49 16.02 15.20 .24 .84 .83 1.02 .55 .49 .95 1.20 1.05 -.70 -.02 .21 .55 15.98 13.66 14.65 15.48 16.02 15.13 .25 .88 .84 1.02 .57 .50 .96 1.21 1.07 -.69 -.03 .21 .58 15.92 13.42 14.67 15.54 16.03 15.21 .25 .90 .85 1.00 .58 .50 .97 1.21 1.08 -.67 -.03 .21 .58 15.96 13.44 14.64 15.48 16.15 15.17 .23 .90 .84 .99 .57 .52 .97 1.21 1.08 -.68 -.03 .21 .58 15.94 13.55 14.63 15.49 16.01 15.18 .24 .91 .84 .99 .56 .51 .97 1.20 1.07 -.69 -.02 .21 .59 15.96 13.49 14.79 15.70 16.13 15.21 .23 .90 .84 .99 .56 .51 .97 1.20 1.07 -.68 -.03 .20 .54 15.97 13.44 14.88 15.81 16.12 15.25 .24 .90 .85 .98 .58 .51 .98 1.21 1.05 -.67 -.03 .19 .59 16.03 13.48 14.70 15.65 16.14 15.18 .24 .89 .86 1.01 .56 .49 .95 1.21 1.06 -.68 -.02 .24 .59 15.94 13.60 14.70 15.62 16.23 15.19 .24 .89 .86 1.02 .55 .50 .96 1.21 1.05 -.68 -.02 .20 .58 15.95 13.38 14.68 15.64 16.15 15.25 .25 .90 .85 1.03 .57 .50 .97 1.22 1.05 -.67 -.06 .20 .57 16.02 13.20 14.54 15.49 16.06 15.21 .23 .91 .82 1.02 .58 .52 .96 1.22 1.04 -.68 -.03 .17 .55 15.96 13.29 14.69 15.68 16.04 15.20 .24 .92 .79 1.03 .59 .52 .97 1.22 1.05 -.68 -.03 .17 .56 15.96 13.11 14.71 15.75 16.04 15.28 .24 .92 .81 1.02 .60 .53 .97 1.22 1.06 -.68 -.03 .19 .56 16.04 13.26 14.53 15.52 16.21 15.41 .25 .92 .84 1.01 .58 .53 .97 1.21 1.07 -.67 -.03 .22 .56 16.17 13.21 14.74 15.81 16.24 15.45 .25 .92 .84 1.00 .58 .54 .97 1.22 1.07 -.67 -.02 .22 .58 16.20 13.09 14.88 16.08 16.12 15.31 .24 .93 .86 1.00 .58 .53 .97 1.23 1.05 -.68 -.02 .20 .57 16.06 13.24 14.65 15.72 16.29 15.19 .24 .93 .86 1.01 .57 .52 .96 1.21 1.05 -.65 -.02 .20 .57 15.96 13.23 14.59 15.53 16.11 15.18 .22 .93 .86 1.01 .58 .51 .96 1.22 1.07 -.68 -.04 .16 .56 15.92 13.45 14.70 15.51 16.17 15.26 .22 .93 .85 1.00 .59 .50 .97 1.23 1.07 -.66 -.02 .17 .57 15.98 13.45 14.68 15.49 16.12 15.24 .22 .91 .84 1.00 .60 .51 .97 1.22 1.07 -.67 .00 .18 .51 15.97 13.33 14.61 15.45 16.06 15.14 .22 .90 .82 .98 .59 .50 .96 1.22 1.07 -.66 .01 .18 .56 15.88 13.31 14.67 15.57 16.02 15.08 .21 .89 .83 .98 .58 .49 .96 1.22 1.04 -.67 .02 .18 .59 15.83 13.33 14.63 15.51 16.02 15.12 .21 .89 .83 .98 .56 .48 .96 1.21 1.04 -.67 .01 .17 .59 15.87 13.27 14.61 15.49 16.08 15.11 .21 .89 .83 .99 .57 .50 .95 1.22 1.05 -.68 .01 .16 .61 15.85 13.33 14.54 15.40 16.00 15.08 .21 .88 .83 .98 .57 .47 .89 1.22 .98 -.68 .02 .19 .61 15.82 13.31 14.57 15.37 15.98 15.06 .21 .88 .86 1.00 .57 .47 .90 1.21 1.01 -.68 .01 .20 .62 15.84 13.32 14.50 15.32 15.99 15.17 .21 .89 .85 .99 .58 .47 .93 1.21 1.05 -.69 .01 .19 .61 15.95 13.29 14.58 15.35 16.03 15.11 .22 .88 .85 .97 .58 .46 .93 1.21 1.06 -.70 .01 .19 .60 15.88 13.28 14.63 15.41 16.06 15.03 .22 .90 .83 .98 .58 .49 .95 1.21 1.06 -.69 .02 .21 .61 15.83 13.33 14.53 15.35 15.96 15.02 .23 .90 .81 .99 .61 .50 .92 1.21 1.06 -.69 .02 .20 .61 15.82 13.32 14.54 15.36 15.96 15.02 .23 .90 .80 .99 .65 .50 .93 1.21 1.06 -.68 .02 .19 .60 15.83 13.34 14.56 15.40 16.01 15.04 .24 .89 .82 1.00 .65 .49 .95 1.21 1.05 -.68 .01 .19 .60 15.88 13.27 14.58 15.39 15.99 15.01 .23 .90 .86 1.01 .62 .49 .94 1.21 1.04 -.67 .01 .19 .61 15.86 13.32 14.58 15.36 15.98 15.06 .25 .90 .87 1.02 .57 .52 .96 1.21 1.03 -.63 -.01 .20 .62 15.96 13.34 14.85 15.50 16.20 15.09 .25 .91 .88 1.03 .59 .51 .96 1.20 1.04 -.66 .00 .21 .62 16.01 13.26 14.71 15.29 16.10 15.11 .25 .91 .86 1.01 .59 .53 .97 1.21 1.09 -.68 .01 .21 .62 15.95 13.30 14.59 15.25 15.90 14.94 .24 .89 .86 .99 .59 .50 .97 1.21 1.09 -.69 -.01 .19 .61 15.75 13.39 14.61 15.44 15.98 14.94 .26 .88 .86 .99 .59 .51 .96 1.21 1.08 -.69 .00 .19 .61 15.75 13.41 14.58 15.40 15.96 14.97 .26 .90 .83 .99 .59 .51 .98 1.22 1.08 -.69 .01 .20 .60 15.78 13.41 14.59 15.39 15.96 14.99 .25 .89 .78 1.00 .59 .50 .97 1.22 1.08 -.69 .01 .19 .61 15.78 13.50 14.62 15.41 15.99 15.06 .25 .89 .80 .99 .57 .51 .97 1.21 1.08 -.68 .01 .19 .62 15.85 13.46 14.66 15.49 16.02 15.03 .24 .88 .81 .99 .57 .51 .98 1.22 1.09 -.68 .01 .18 .61 15.82 13.44 14.60 15.43 15.99 15.00 .23 .89 .77 .99 .57 .51 .98 1.22 1.09 -.69 .03 .19 .61 15.80 13.36 14.54 15.41 15.99 15.01 .24 .89 .80 .99 .58 .50 .97 1.22 1.09 -.68 .02 .19 .59 15.79 13.45 14.60 15.41 16.07 15.02 .24 .87 .82 1.00 .57 .49 .97 1.22 1.10 -.66 .02 .20 .60 15.80 13.47 14.67 15.49 16.06 15.03 .24 .87 .81 .99 .59 .52 .98 1.22 1.10 -.66 .03 .20 .59 15.81 13.49 14.63 15.45 16.02 15.08 .24 .88 .81 .98 .59 .51 .98 1.22 1.09 -.66 .03 .19 .59 15.85 13.48 14.62 15.49 16.04 15.13 .26 .88 .82 .99 .59 .52 .98 1.22 1.07 -.66 .02 .20 .57 15.93 13.44 14.59 15.45 16.12 15.15 .25 .86 .82 .98 .58 .51 .98 1.22 1.07 -.70 .02 .19 .55 15.91 13.38 14.65 15.56 16.10 15.14 .26 .87 .84 .99 .60 .51 .98 1.24 1.10 -.71 .02 .21 .57 15.92 13.40 14.62 15.46 16.08 15.10 .26 .86 .85 .98 .59 .51 .98 1.26 1.10 -.71 .02 .20 .48 15.89 13.46 14.59 15.48 16.23 15.12 .26 .87 .83 .99 .58 .51 .95 1.25 1.07 -.72 .03 .22 .55 15.89 13.52 14.68 15.51 16.08 15.23 .26 .86 .83 .99 .58 .51 .98 1.25 1.07 -.72 .02 .21 .54 16.00 13.62 14.74 15.62 16.11 15.24 .26 .87 .79 .98 .58 .51 .98 1.25 1.09 -.70 .02 .23 .58 16.02 13.61 14.70 15.58 16.14 15.19 .25 .98 .76 .98 .58 .52 .97 1.25 1.10 -.67 .02 .21 .56 15.98 13.54 14.68 15.57 16.07 15.21 .25 .91 .76 .97 .59 .50 .95 1.24 1.09 -.69 .03 .21 .57 15.98 13.47 14.63 15.54 16.09 15.33 .26 .96 .75 .97 .62 .54 .97 1.24 1.10 -.69 .02 .19 .53 16.09 13.50 14.68 15.61 16.33 15.21 .26 .97 .75 .95 .66 .55 .97 1.24 1.10 -.69 .02 .18 .53 15.98 13.92 14.75 15.63 16.39 15.19 .27 .98 .77 .94 .59 .54 .99 1.24 1.11 -.69 .02 .18 .55 15.98 13.75 14.76 15.73 16.22 15.32 .27 1.00 .79 .97 .53 .55 .97 1.24 1.11 -.71 .02 .21 .55 16.09 13.64 14.67 15.57 16.24 15.51 .29 1.00 .79 .99 .55 .56 .97 1.24 1.10 -.71 .02 .21 .55 16.26 13.57 14.62 15.48 16.26 15.34 .27 .91 .82 1.00 .55 .55 .98 1.26 1.06 -.72 .00 .20 .58 16.10 13.61 14.65 15.56 16.17 15.23 .26 .88 .84 1.00 .55 .54 .96 1.24 1.07 -.71 .03 .21 .61 16.02 13.50 14.55 15.48 16.34 15.40 .27 .90 .84 1.00 .57 .56 .95 1.24 1.09 -.73 .04 .22 .60 16.18 13.62 14.50 15.42 16.38 15.23 .27 .93 .85 1.00 .56 .54 .95 1.24 1.08 -.72 .03 .19 .60 16.03 13.79 14.56 15.53 16.18 15.30 .27 .94 .84 1.00 .58 .54 .97 1.24 1.08 -.71 .02 .19 .60 16.08 13.51 14.73 15.73 16.45 15.25 .26 .92 .84 1.00 .58 .54 .96 1.24 1.08 -.71 .04 .17 .60 16.04 13.44 14.77 15.85 16.59 15.22 .26 .92 .85 .99 .60 .54 .96 1.24 1.08 -.72 .04 .27 .60 15.99 13.37 14.65 15.68 16.31 15.24 .26 .92 .84 1.00 .60 .53 .95 1.23 1.08 -.73 .03 .20 .60 16.02 13.43 14.70 15.52 16.18 15.17 .26 .92 .78 .99 .61 .51 .97 1.25 1.09 -.73 -.01 .21 .60 15.97 13.62 14.57 15.48 16.19 15.31 .26 .92 .76 1.00 .62 .53 .97 1.25 1.09 -.73 .03 .21 .62 16.09 13.54 14.76 15.63 16.17 15.27 .26 .90 .77 .99 .62 .53 .97 1.25 1.09 -.73 .07 .21 .64 16.04 13.62 14.71 15.67 16.13 15.16 .24 .90 .81 .98 .61 .52 .96 1.25 1.08 -.72 .09 .21 .67 15.92 13.63 14.59 15.51 16.26 15.18 .23 .90 .83 .98 .63 .54 .95 1.26 1.10 -.73 .08 .22 .68 15.91 13.70 14.54 15.44 16.18 15.15 .22 .89 .83 .99 .63 .53 .98 1.25 1.10 -.74 .05 .22 .67 15.91 13.62 14.60 15.47 16.17 15.11 .23 .89 .83 .99 .65 .55 .98 1.26 1.09 -.70 .06 .25 .68 15.87 13.61 14.61 15.51 16.06 15.15 .24 .87 .84 1.00 .65 .54 .97 1.27 1.10 -.73 .04 .25 .67 15.92 13.58 14.58 15.44 16.10 15.11 .23 .87 .84 .99 .66 .55 .97 1.26 1.09 -.73 .06 .23 .67 15.92 13.53 14.54 15.42 16.02 15.20 .23 .87 .85 1.00 .64 .56 .97 1.24 1.10 -.73 .06 .20 .67 16.00 13.52 14.63 15.49 16.08 15.10 .23 .88 .84 1.00 .65 .54 .95 1.25 1.09 -.75 .07 .21 .67 15.90 13.52 14.60 15.43 16.12 15.09 .23 .86 .77 1.00 .64 .54 .86 1.26 1.09 -.74 .08 .22 .67 15.90 13.63 14.50 15.33 16.04 15.07 .23 .87 .63 1.01 .65 .55 .97 1.26 1.08 -.74 .07 .22 .65 15.91 13.55 14.52 15.35 16.03 15.00 .23 .88 .70 1.04 .65 .55 .97 1.26 1.08 -.73 .05 .22 .64 15.82 13.57 14.52 15.35 16.08 15.06 .23 .90 .73 1.01 .65 .54 .97 1.27 1.08 -.73 .04 .24 .66 15.90 13.57 14.59 15.40 16.08 15.03 .24 .91 .80 1.02 .67 .55 .99 1.27 1.10 -.73 .04 .23 .65 15.88 13.56 14.72 15.41 16.04 15.06 .25 .92 .88 1.02 .67 .55 .99 1.27 1.12 -.72 .04 .23 .66 15.96 13.59 14.71 15.44 16.25 15.18 .26 .93 .90 1.03 .68 .58 .99 1.27 1.13 -.70 .04 .22 .64 16.13 13.56 14.74 15.33 16.12 15.13 .26 .93 .89 1.02 .68 .57 .99 1.28 1.12 -.71 .06 .22 .65 16.03 13.57 14.71 15.39 16.00 14.99 .23 .92 .87 1.01 .66 .54 .99 1.27 1.11 -.71 .08 .22 .64 15.77 13.65 14.65 15.53 16.08 14.99 .22 .89 .87 1.01 .66 .55 .99 1.26 1.11 -.65 .08 .22 .64 15.76 13.66 14.62 15.54 16.04 15.03 .23 .93 .87 1.00 .65 .54 .99 1.26 1.10 -.65 .08 .21 .64 15.79 13.64 14.62 15.52 16.04 15.03 .22 .92 .86 1.01 .66 .54 .98 1.27 1.13 -.66 .07 .20 .63 15.78 13.68 14.63 15.49 16.08 15.05 .21 .91 .84 1.00 .65 .54 .98 1.27 1.14 -.62 .06 .21 .63 15.84 13.67 14.67 15.56 16.13
Names of X columns:
QBEPIL PBEPIL PBELUX PBABD PBFRU PBEPAL PBESTO PBEWIT PBENA PCHSAN PWABR PSOCOLA PSOBIT PSPORT BUDBEER BUDCHIL BUDAMB BUDWATER BUDSISSS
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
No Linear Trend
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