Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
17.98 586.9642 830.36 1609.84 404.45 2342.32 17.83 582.1727 750 1477.27 387.97 2258.39 19.45 586.19396 830.36 1653.84 390.27 2293.62 21.04 590.49531 803.57 1512.02 384.72 2418.80 20.03 589.70506 830.36 1352.37 371.35 2480.15 20.01 590.07518 803.57 1436.84 367.73 2440.06 19.64 595.2568 830.36 1503.27 375.21 2660.66 18.52 604.1796 830.36 1649.09 365.55 2737.27 19.59 605.00987 803.57 1545.82 361.80 2692.82 20.09 610.71165 830.36 1622.21 366.80 2645.08 19.82 618.31404 803.57 1650.19 394.36 2706.27 21.09 614.74292 830.36 1696.73 409.66 2753.20 22.64 609.16284 544.75 1502.97 410.12 2590.54 22.11 611.73756 492.03 1469.44 416.54 2627.25 20.42 620.77222 544.75 1565.22 393.66 2707.21 18.58 618.00755 527.18 1485.36 374.93 2656.76 18.24 612.3328 544.75 1268.54 368.85 2876.66 16.87 604.04309 527.18 994.85 352.66 2880.69 18.64 605.08732 544.75 1352.65 361.82 2905.20 27.17 569.6086 544.75 1574.06 394.86 2614.36 33.69 595.0899 527.18 1531.7 389.56 2452.48 35.92 598.49214 544.75 1473.81 381.33 2442.33 32.30 606.67306 527.18 1367.53 381.87 2559.65 27.34 608.78857 544.75 1584.21 378.16 2633.66 24.96 606.9776 572.15 1733.32 384.59 2736.39 20.52 603.86769 516.78 1217.95 363.75 2882.18 19.86 606.42144 572.15 1234.38 363.39 2913.86 20.82 592.42386 553.7 1034.78 358.05 2887.87 21.24 590.6524 572.15 1154.2 357.12 3027.50 20.20 592.57978 553.7 1208.67 366.36 2906.75 21.42 602.51677 572.15 1207.28 368.01 3024.82 21.69 595.5471 572.15 1552.86 356.72 3043.60 21.86 605.94461 553.7 1727.05 348.46 3016.77 23.23 605.4981 572.15 1564.18 358.83 3069.10 22.47 607.95824 553.7 1488.7 359.96 2894.68 19.52 612.04311 572.15 1714.22 361.88 3168.83 18.82 612.7243 598.11 1735.74 354.44 3223.39 19.00 604.3511 559.52 1340.51 353.85 3267.67 18.92 597.85685 598.11 1237.53 344.64 3235.47 20.24 601.4573 578.81 1178.62 338.73 3359.12 20.94 590.17392 598.11 946.28 337.04 3396.88 22.38 592.59948 578.81 1333.87 340.78 3318.52 21.76 597.24933 598.11 1474.77 352.45 3393.78 21.35 597.11685 598.11 1650.77 343.60 3257.35 21.90 599.7328 578.81 1509.81 345.30 3271.66 21.69 607.71194 598.11 1670.26 344.28 3226.28 20.34 604.82143 578.81 1691.55 334.92 3305.16 19.41 608.02913 598.11 1602.71 334.66 3301.11 19.08 606.1822 525.29 1702.93 328.99 3310.03 20.05 609.73516 474.46 1513.12 329.31 3370.81 20.35 602.5858 525.29 1608.6 329.97 3435.11 20.27 595.55291 508.35 1375.56 341.95 3427.55 19.94 597.41659 525.29 1062.49 367.04 3527.43 19.07 594.57492 508.35 1084.64 371.91 3516.08 17.87 600.63662 525.29 1212.23 392.03 3539.47 18.01 598.85984 525.29 1691.14 379.80 3651.25 17.51 598.97301 508.35 1553.52 355.56 3555.12 18.15 603.61033 525.29 1597.22 364.00 3680.59 16.70 604.24871 508.35 1666.38 373.94 3683.95 14.51 608.12389 525.29 1659.2 383.24 3754.09 15.00 610.69475 500.86 2124.88 387.11 3978.36 14.78 608.90087 452.39 1612.62 381.66 3832.02 14.66 607.98959 500.86 1685.45 384.00 3635.96 16.38 603.37721 484.71 1509.59 377.91 3681.69 17.88 607.81136 500.86 1145.09 381.34 3758.37 19.07 610.96411 484.71 1283.41 385.71 3624.96 19.65 606.97026 500.86 1802.44 385.45 3764.50 18.38 605.89335 500.86 1592.68 380.21 3913.42 17.46 611.97502 484.71 1490.27 391.35 3843.19 17.71 616.95077 500.86 1737.23 390.16 3908.12 18.10 618.69499 484.71 1660.53 384.38 3739.23 17.16 621.90975 500.86 1629.52 379.48 3834.44 17.99 617.85264 502.23 1516.25 378.74 3843.86 18.53 623.04912 453.63 1262.19 376.75 4011.05 18.55 615.57 502.23 1520.71 381.82 4157.69 19.87 623.58574 486.03 1712.45 391.34 4321.27 19.74 623.63317 502.23 1444.67 385.23 4465.14 18.42 615.04568 486.03 1377.22 387.62 4556.10 17.30 624.57004 502.23 1984.51 386.14 4708.47 18.03 625.8824 502.23 2034.11 383.50 4610.56 18.23 629.83163 486.03 1746.18 382.93 4789.08 17.44 626.42181 502.23 1923.87 383.20 4755.48 17.99 628.40528 486.03 1717.86 385.21 5074.49 19.04 632.30782 502.23 1679.66 387.44 5117.12 18.88 631.60361 518.74 1814.81 398.70 5395.30 19.07 635.57585 485.27 1411.08 404.92 5485.62 21.36 634.08687 518.74 1649.91 396.51 5587.14 23.57 632.61106 502 1220.32 392.87 5569.08 21.25 632.6136 518.74 1445.62 391.99 5643.18 20.45 635.80934 502 1631.53 385.25 5654.63 21.32 636.67236 518.74 1836.95 383.46 5528.91 21.96 633.388 518.74 2014.7 387.51 5616.21 23.99 638.09523 502 1660.62 383.29 5882.17 24.90 641.6666 518.74 2039.59 380.91 6029.38 23.71 646.15675 502 1947.42 377.87 6521.70 25.39 651.88736 518.74 1654.5 369.34 6448.27 25.17 651.22665 426.79 1904.27 355.03 6813.09 22.21 654.79548 385.49 1475.2 346.40 6877.74 20.99 654.65449 426.79 1661.09 352.31 6583.48 19.72 659.91121 413.03 1648.04 344.71 7008.99 20.83 653.37456 426.79 1761.21 344.10 7331.04 19.17 645.67016 413.03 1491.73 340.80 7672.79 19.63 650.11779 426.79 1704.51 323.78 8222.61 19.93 658.91968 426.79 1754.12 324.00 7622.42 19.79 662.42603 413.03 1663.4 322.62 7945.26 21.26 667.60539 426.79 2092.92 324.86 7442.08 20.17 666.14582 413.03 1760.79 306.35 7823.13 18.32 664.27573 426.79 1654.32 288.78 7908.25 16.71 676.48872 384.2 1937.54 289.26 7906.50 16.06 680.1659 347.02 1397.88 297.74 8545.72 15.02 678.99055 384.2 1583.78 295.87 8799.81 15.44 677.61221 371.81 1579.95 308.56 9063.37 14.86 672.24744 384.2 1650.45 298.97 8899.95 13.66 669.48689 371.81 1133.21 292.22 8952.02 14.08 668.19145 384.2 1625.27 292.87 8883.29 13.36 658.29031 384.2 1686.83 284.23 7539.07 14.95 659.15736 371.81 1641.04 288.66 7842.62 14.39 660.34479 384.2 1776.56 296.60 8592.10 12.85 668.77636 371.81 1502.57 294.24 9116.55 11.28 667.01524 384.2 1777.23 291.36 9181.43 12.47 669.37186 392.58 1854.73 287.31 9358.83 12.01 672.58801 354.59 1420.68 287.50 9306.58 14.66 669.36903 392.58 1306.17 286.24 9786.16 17.34 654.958 379.92 1615.22 282.62 10789.04 17.75 653.03433 392.58 1952.35 276.93 10559.74 17.89 642.61224 379.92 1513.77 261.40 10970.80 20.07 657.74554 392.58 1773.85 256.20 10655.15 21.26 656.64312 392.58 1722.86 256.94 10829.28 23.88 657.08444 379.92 1583.14 264.47 10336.95 22.64 662.14989 392.58 1424.79 311.56 10729.86 24.97 661.94064 379.92 1676.9 293.65 10877.81 26.08 653.83966 392.58 1498.38 283.74 11497.12 27.18 664.17629 414.99 1355.03 284.59 10940.53 29.35 670.41666 388.22 1584.14 300.85 10128.31 29.89 670.73615 414.99 1678.71 286.70 10921.92 25.74 677.35214 401.6 1613.18 279.96 10733.91 28.78 682.47259 414.99 1578.63 275.29 10522.33 31.83 680.40158 401.6 1419.16 285.37 10447.89 29.77 686.65088 414.99 1633.3 282.15 10521.98 31.22 694.91907 414.99 1649.25 274.52 11215.10 33.88 695.01497 401.6 1528.83 273.68 10650.92 33.08 699.45908 414.99 1759.59 270.40 10971.14 34.40 705.01325 401.6 1716.6 265.99 10414.49 28.46 692.39885 414.99 1764.26 271.89 10787.99 29.58 691.58396 373.1 1510.48 265.93 10887.36 29.61 686.89767 336.99 1339.31 262.02 10495.28 27.24 693.52192 373.1 1445 263.27 9878.78 27.41 684.19211 361.06 1414.76 260.75 10734.97 28.64 677.3194 373.1 1366.59 272.06 10911.94 27.60 661.73269 361.06 1381.92 270.74 10502.40 26.45 681.12618 373.1 1432.29 267.71 10522.81 27.47 682.86649 373.1 1478.19 272.66 9949.75 25.88 678.14703 361.06 1394.56 282.48 8847.56 22.21 677.16558 373.1 1505.45 283.32 9075.14 19.67 680.69632 361.06 1446.22 276.25 9851.56 19.33 676.53337 373.1 1472.11 275.99 10021.57 19.67 668.03667 381.3 1457.88 281.76 9920.00 20.74 668.97155 344.4 1275.17 295.68 10106.13 24.42 666.98498 381.3 1349.08 294.35 10403.94 26.27 661.76808 369 1354.25 302.86 9946.22 27.02 667.50585 381.3 1441.49 314.48 9925.25 25.52 666.06849 369 1349.13 321.54 9243.26 26.94 670.68352 381.3 1508.98 313.57 8736.59 28.38 667.93756 381.3 1383.7 310.05 8663.50 29.67 673.30419 369 1463.2 318.71 7591.93 28.85 687.39311 381.3 1586.98 316.75 8397.03 26.27 688.37189 369 1474.1 319.25 8896.09 29.42 671.79872 381.3 1552.81 333.30 8341.63 32.94 677.22114 400.16 1446.58 356.86 8053.81 35.87 693.12414 361.43 1314.74 359.58 7891.08 33.55 698.4465 400.16 1430.98 341.56 7992.13 28.25 687.64631 387.25 1406.64 328.21 8480.09 28.14 687.61812 400.16 1420.11 355.41 8850.26 30.72 679.51819 387.25 1399.8 356.91 8985.44 30.76 685.70631 400.16 1495.12 350.75 9233.80 31.59 690.25711 400.16 1466.13 358.99 9415.82 28.29 696.94325 387.25 1413.35 378.86 9275.06 30.33 705.98803 400.16 1460.87 379.09 9801.12 31.09 708.31175 387.25 1438.22 390.20 9782.46 32.15 720.88209 400.16 1562.51 407.67 10453.92 34.27 717.75784 408.87 1605 414.50 10488.07 34.74 717.55138 382.5 1468.66 404.73 10583.92 36.76 716.99835 408.87 1525.6 405.98 10357.70 36.69 716.65894 395.69 1549.46 404.85 10225.57 40.28 713.41968 408.87 1482.39 383.95 10188.45 38.02 729.40358 395.69 1503.44 391.78 10435.48 40.69 733.9712 408.87 1577.22 398.44 10139.71 44.94 723.67358 408.87 1557.89 400.13 10173.92 45.95 729.87932 395.69 1495.91 405.40 10080.27 53.13 736.03188 408.87 1578.21 420.21 10027.47 48.46 732.64932 395.69 1529.81 439.06 10428.02 43.33 728.98133 408.87 1655.61 442.97 10783.01 46.84 731.63834 430.2 1627.23 424.08 10489.94 47.97 734.6898 388.57 1539.44 423.43 10766.23 54.31 737.88677 430.2 1571.91 434.35 10503.76 53.04 740.78089 416.32 1512.01 429.14 10192.51 49.83 741.90176 430.2 1543.38 422.90 10467.48 56.26 738.40627 416.32 1517.73 430.30 10274.97 58.70 736.92209 430.2 1594.17 424.75 10640.91 64.97 737.36337 430.2 1588.63 437.77 10481.60 65.57 732.89592 416.32 1530.09 455.94 10568.70 62.37 733.55081 430.2 1574.33 470.11 10440.07 58.30 738.51387 416.32 1527.53 476.67 10805.87 59.43 741.46149 430.2 1605.32 509.42 10717.50 65.51 736.41252 403.84 1712.4 549.43 10864.86 61.63 735.99137 364.76 1499.51 555.52 10993.41 62.90 734.26023 403.84 1585.3 557.22 11109.32 69.69 734.85552 390.81 1524.73 611.85 11367.14 70.94 730.46576 403.84 1563.37 676.77 11168.31 70.96 729.38976 390.81 1555.93 597.90 11150.22 74.41 739.7233 403.84 1648.48 633.09 11185.68 73.05 736.24305 403.84 1639 631.56 11381.15 63.87 733.40158 390.81 1596.12 600.15 11679.07 58.88 736.50854 403.84 1655.14 586.65 12080.73 59.37 733.27274 390.81 1625.19 626.83 12221.93 62.03 731.06448 403.84 1692.72 629.51 12463.15 54.57 727.84077 447.5 1668.59 630.35 12621.69 59.26 730.40812 404.19 1520.68 665.10 12268.63 60.56 729.59849 447.5 1643.49 655.89 12354.35 63.97 731.9837 433.07 1611.85 680.01 13062.91 63.46 727.2243 447.5 1627.28 668.31 13627.64 67.48 723.33322 433.07 1585.24 655.71 13408.62 74.18 728.46526 447.5 1659.34 665.27 13211.99 72.39 721.99641 447.5 1636.16 664.53 13357.74 79.93 729.75831 433.07 1592.16 710.65 13895.63 86.20 736.52441 447.5 1673.23 754.48 13930.01 94.62 733.60152 433.07 1665.26 808.31 13371.72 91.73 737.86398 447.5 1760.76 803.62 13264.82 92.95 738.99614 478.16 1875.02 887.78 12650.36 95.35 740.62804 447.31 1649.36 924.28 12266.39 105.56 742.35983 478.16 1722.74 971.06 12262.89 112.57 736.59008 462.74 1705.32 912.02 12820.13 125.39 739.67615 478.16 1741.22 889.13 12638.32 133.93 739.77171 462.74 1651.61 889.54 11350.01 133.44 746.85967 478.16 1721.75 941.17 11378.02 116.61 734.762 478.16 1722.93 840.39 11543.55 103.90 725.37503 462.74 1646.61 824.92 10850.66 76.65 735.5332 478.16 1734.27 812.82 9325.01 57.44 733.90288 462.74 1704.02 757.85 8829.04 41.02 725.90513 478.16 1652.21 819.94 8776.39 41.74 715.5104 478.5 1634.11 857.73 8000.86 39.16 720.74408 432.2 1503.58 939.76 7062.93 47.98 718.75698 478.5 1629.93 925.99 7608.92 49.79 719.95689 463.07 1568.78 892.66 8168.12 59.16 716.1199 478.5 1631.97 926.86 8500.33 69.68 718.00358 463.07 1621.95 947.81 8447.00 64.09 727.08914 478.5 1771.27 934.27 9171.61 71.06 722.45696 478.5 1813.63 949.50 9496.28 69.46 726.53179 463.07 1705.55 996.44 9712.28 75.82 731.11631 478.5 1796.49 1043.51 9712.73 78.08 731.65889 463.07 1783.88 1126.12 10344.84 74.30 728.91337 478.5 1832.1 1135.01 10428.05
Names of X columns:
PRICE PRODUCTION RENEW_RISID RENEW_IND GOLD DOWJONES
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
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