Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1998 1073 965 1178 1115 1080 1154 1222 1196 1139 1136 1116 1135 1999 1141 1094 1192 1108 1186 1197 1280 1189 1192 1191 1117 1255 2000 1239 1158 1200 1138 1323 1241 1241 1306 1196 1218 1237 1258 2001 1323 1152 1244 1267 1316 1298 1360 1352 1277 1360 1235 1311 2002 1274 1140 1280 1188 1231 1238 1370 1345 1266 1287 1234 1243 2003 1317 1151 1325 1325 1321 1352 1484 1352 1348 1338 1244 1373 2004 1390 1289 1305 1289 1279 1342 1446 1420 1395 1474 1345 1462 2005 1318 1305 1409 1362 1440 1418 1404 1386 1471 1407 1329 1456 2006 1472 1379 1379 1379 1540 1428 1475 1491 1491 1549 1437 1395 2007 1436 1299 1465 1328 1507 1419 1523 1623 1512 1518 1452 1531 1998 5281 4944 5500 5379 5088 5191 5661 5449 5460 5154 4804 4934 1999 5055 4819 5484 5276 5230 5348 5516 5207 5388 5018 4741 4953 2000 5219 4966 5451 5062 5624 5017 5351 5562 5185 5301 4911 4922 2001 5230 4604 5389 5151 5389 5138 5374 5243 4945 5161 4793 4724 2002 5200 4772 5192 5022 5141 4748 5306 5240 5056 5174 4634 4978 2003 5139 4567 5028 5101 4966 5075 5496 5200 5207 5099 4694 5131 2004 5215 4924 5366 5160 5106 5404 5607 5429 5388 5198 4953 5285 2005 5344 4922 5618 5265 5392 5452 5450 5776 5404 5497 5044 5348 2006 5550 4990 5725 5338 5631 5571 5670 5846 5776 5714 5218 5108 2007 5729 5253 5662 5382 5792 5526 5957 6038 5611 5692 5238 5351 1998 1516 1385 1596 1501 1435 1466 1649 1567 1645 1526 1341 1418 1999 1436 1335 1594 1556 1473 1551 1596 1521 1578 1457 1311 1378 2000 1477 1450 1564 1461 1614 1474 1601 1612 1482 1494 1408 1461 2001 1522 1284 1555 1455 1549 1499 1505 1473 1374 1487 1432 1389 2002 1506 1395 1541 1454 1509 1423 1563 1559 1469 1432 1335 1447 2003 1471 1355 1455 1512 1542 1553 1661 1511 1578 1541 1403 1462 2004 1493 1401 1578 1503 1502 1630 1665 1593 1609 1526 1463 1554 2005 1524 1442 1697 1515 1591 1666 1592 1686 1582 1617 1433 1639 2006 1570 1477 1689 1583 1690 1696 1680 1741 1722 1638 1522 1503 2007 1676 1600 1724 1535 1723 1645 1713 1837 1682 1673 1578 1580 1998 666 701 714 687 624 683 719 688 668 643 629 576 1999 695 649 684 671 688 664 713 663 677 673 607 601 2000 712 632 670 632 711 641 659 722 631 660 618 622 2001 687 599 664 667 696 648 728 680 627 647 623 604 2002 675 611 661 648 668 675 638 637 630 648 601 590 2003 707 551 625 641 571 606 707 673 629 643 564 611 2004 661 633 675 644 627 642 710 710 669 669 577 652 2005 663 575 667 651 701 676 717 743 665 676 627 621 2006 672 623 685 695 689 729 700 706 682 758 624 626 2007 760 647 679 718 746 692 748 811 718 708 651 673 1998 1228 1134 1250 1272 1235 1212 1227 1267 1285 1163 1149 1192 1999 1190 1129 1218 1191 1250 1240 1276 1188 1247 1124 1138 1167 2000 1160 1134 1296 1227 1319 1171 1212 1323 1235 1240 1167 1154 2001 1222 1092 1256 1164 1215 1251 1203 1237 1150 1193 1151 1130 2002 1229 1094 1185 1141 1110 1043 1230 1202 1165 1202 1098 1217 2003 1188 1064 1145 1146 1149 1176 1234 1269 1202 1169 1065 1222 2004 1223 1156 1266 1210 1202 1314 1341 1272 1255 1225 1216 1288 2005 1209 1191 1264 1260 1231 1270 1307 1408 1287 1278 1194 1271 2006 1326 1182 1402 1180 1337 1265 1350 1360 1374 1390 1246 1260 2007 1341 1218 1327 1266 1291 1303 1415 1402 1309 1371 1200 1267 1998 856 809 894 918 896 870 1009 904 842 873 809 855 1999 823 783 963 903 929 943 955 900 948 841 790 908 2000 886 817 889 833 971 845 892 949 910 928 836 832 2001 832 765 917 914 930 855 945 925 904 900 756 837 2002 844 825 826 902 932 781 947 896 947 925 785 857 2003 853 745 873 902 839 910 949 878 905 886 845 925 2004 913 877 934 926 874 861 950 914 913 913 854 891 2005 928 859 956 942 918 937 880 958 973 948 918 900 2006 969 827 966 907 927 947 999 1024 1043 988 890 859 2007 945 892 972 937 1008 941 1040 973 910 967 912 908 1998 1015 915 1046 1001 898 960 1057 1023 1020 949 876 893 1999 911 923 1025 955 890 950 976 935 938 923 895 899 2000 984 933 1032 909 1009 886 987 956 927 979 882 853 2001 967 864 997 951 999 885 993 928 890 934 831 764 2002 946 847 979 877 922 826 928 946 845 967 815 867 2003 920 852 930 900 865 830 945 869 893 860 817 911 2004 925 857 913 877 901 957 941 940 942 865 843 900 2005 1020 855 1034 897 951 903 954 981 897 978 872 917 2006 1013 881 983 973 988 934 941 1015 955 940 936 860 2007 1007 896 960 926 1024 945 1041 1015 992 973 897 923 1998 3138 2732 3115 3109 3070 3190 3412 3296 3385 3273 2952 3233 1999 3019 2921 3322 3220 3091 3173 3299 3187 3303 3156 3061 3241 2000 3311 3197 3288 3136 3248 3206 3418 3345 3182 3371 3157 3211 2001 3375 2930 3210 3209 3369 3067 3385 3405 3091 3345 3144 3206 2002 3185 2992 3283 2870 3063 2985 3387 3208 3132 3298 2952 3182 2003 3220 2924 3049 3184 3007 3021 3339 2996 3246 3159 2985 3242 2004 3224 2912 3111 2992 2777 3169 3391 3360 3202 3170 3131 3385 2005 3187 2945 3286 3192 3123 3178 3228 3379 3333 3329 3066 3159 2006 3136 2856 3370 3040 3319 3282 3299 3303 3428 3523 3177 3244 2007 3246 2959 3275 2991 3241 3167 3435 3522 3261 3624 3196 3334 1998 63 61 54 60 51 61 66 60 55 58 48 49 1999 60 55 55 61 58 45 61 41 54 62 50 43 2000 51 57 50 53 49 59 55 50 58 56 53 46 2001 58 51 50 48 53 51 54 44 54 44 43 31 2002 50 54 47 50 53 44 56 39 54 59 44 42 2003 55 51 51 54 64 54 52 47 34 48 29 40 2004 60 56 62 41 43 51 51 54 41 46 45 35 2005 56 40 50 72 58 58 54 55 41 42 45 42 2006 44 43 43 53 63 57 38 45 61 35 40 52 2007 47 37 46 28 49 54 51 62 38 46 44 40 1998 295 295 312 355 352 340 354 301 356 359 274 326 1999 315 305 360 341 319 329 352 325 318 296 299 329 2000 289 284 339 378 332 330 333 339 321 346 310 297 2001 347 310 324 308 356 343 334 338 314 340 311 309 2002 344 281 361 305 315 297 358 334 331 329 291 304 2003 310 314 312 335 302 306 362 310 308 341 296 350 2004 363 288 316 331 321 347 326 372 324 333 338 340 2005 314 299 361 339 357 357 318 339 314 349 298 328 2006 328 304 365 337 337 331 386 338 354 388 315 348 2007 315 326 344 329 331 318 332 349 369 390 304 332 1998 1190 1035 1222 1145 1139 1186 1300 1297 1305 1208 1166 1214 1999 1180 1110 1256 1245 1151 1238 1209 1246 1254 1214 1197 1257 2000 1292 1285 1252 1162 1202 1199 1315 1284 1187 1321 1201 1255 2001 1279 1121 1242 1269 1289 1181 1307 1305 1184 1269 1239 1236 2002 1220 1161 1226 1068 1151 1145 1305 1185 1181 1251 1140 1268 2003 1237 1108 1135 1212 1111 1142 1253 1119 1230 1205 1130 1228 2004 1228 1103 1139 1110 1044 1168 1316 1226 1256 1208 1214 1272 2005 1226 1145 1161 1207 1185 1180 1194 1329 1284 1256 1154 1188 2006 1177 1086 1250 1149 1213 1251 1231 1227 1269 1341 1244 1236 2007 1260 1157 1235 1124 1218 1213 1302 1353 1207 1363 1220 1313 1998 932 835 894 912 898 956 1045 976 977 971 845 968 1999 872 902 1022 939 943 955 1011 939 987 932 891 948 2000 982 919 934 928 977 990 1033 979 953 984 965 894 2001 996 868 962 956 1030 912 1004 1033 936 1023 910 992 2002 892 872 968 925 939 861 1030 985 926 1021 879 950 2003 964 883 940 942 916 923 948 857 967 944 869 969 2004 974 861 953 902 800 957 1004 1003 949 935 892 1034 2005 964 886 1029 962 949 988 981 997 1006 973 934 926 2006 960 857 1029 898 1000 943 993 1031 1077 1065 897 1010 2007 971 852 980 881 996 942 1022 1057 991 1049 986 988 1998 247 201 234 242 238 248 262 278 289 280 252 254 1999 249 217 250 270 255 232 254 266 275 248 265 238 2000 271 257 259 245 283 249 291 269 253 299 251 283 2001 270 223 247 249 247 233 300 259 256 255 246 242 2002 276 249 275 202 266 273 267 263 266 262 238 238 2003 264 243 235 251 249 236 271 259 280 266 250 270 2004 227 232 274 232 241 246 291 281 279 247 232 273 2005 247 232 268 261 225 241 272 283 293 259 231 264 2006 253 229 286 233 276 305 239 250 258 241 281 240 2007 277 223 279 245 255 274 273 270 237 320 241 245 1998 474 366 453 455 443 460 451 444 458 455 415 471 1999 403 387 434 425 423 419 473 411 469 466 409 469 2000 477 452 504 423 454 438 446 474 468 421 430 482 2001 483 408 435 427 447 398 440 470 401 458 438 427 2002 453 429 453 370 392 409 427 441 428 435 404 422 2003 445 376 427 444 429 414 505 451 461 403 440 425 2004 432 428 429 417 371 451 454 478 394 447 455 466 2005 436 383 467 423 407 412 463 431 436 492 449 453 2006 418 380 440 423 493 452 450 457 470 488 440 410 2007 423 401 437 412 441 420 506 493 457 502 445 456
Names of X columns:
Jaar Januari Februari Maart April Mei Juni Juli Augustus September Oktober November December
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