Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1687 -183.9235445 1508 -177.0726091 1507 -228.6351091 1385 -237.4476091 1632 -127.7601091 1511 -193.0101091 1559 -220.6351091 1630 -164.5101091 1579 -268.3226091 1653 -333.6976091 2152 -34.26010911 2148 -154.8851091 1752 -97.74528053 1765 101.1056549 1717 2.543154874 1558 -43.26934513 1575 -163.5818451 1520 -162.8318451 1805 46.54315487 1800 26.66815487 1719 -107.1443451 2008 42.48065487 2242 76.91815487 2478 196.2931549 2030 201.4329835 1655 12.28391886 1693 -0.278581137 1623 42.90891886 1805 87.59641886 1746 84.34641886 1795 57.72141886 1926 173.8464189 1619 -185.9660811 1992 47.65891886 2233 89.09641886 2192 -68.52858114 2080 272.6112475 1768 146.4621829 1835 162.8996829 1569 10.08718285 1976 279.7746829 1853 212.5246829 1965 248.8996829 1689 -41.97531715 1778 -5.787817149 1976 52.83718285 2397 274.2746829 2654 414.6496829 2097 310.7895114 1963 362.6404468 1677 26.07794684 1941 403.2654468 2003 327.9529468 1813 193.7029468 2012 317.0779468 1912 202.2029468 2084 321.3904468 2080 178.0154468 2118 16.45294684 2150 -68.17205316 1608 -157.0322246 1503 -76.18128917 1548 -81.74378917 1382 -134.5562892 1731 77.13121083 1798 199.8812108 1779 105.2562108 1887 198.3812108 2004 262.5687108 2077 196.1937108 2092 11.63121083 2051 -145.9937892 1577 -166.8539606 1356 -202.0030252 1652 43.43447482 1382 -113.3780252 1519 -113.6905252 1421 -155.9405252 1442 -210.5655252 1543 -124.4405252 1656 -64.25302518 1561 -298.6280252 1905 -154.1905252 2199 23.18447482 1473 -249.6756966 1655 118.1752388 1407 -180.3872612 1395 -79.19976119 1530 -81.51226119 1309 -246.7622612 1526 -105.3872612 1327 -319.2622612 1627 -72.07476119 1748 -90.44976119 1958 -80.01226119 2274 119.3627388 1648 -53.49743261 1401 -114.6464972 1411 -155.2089972 1403 -50.02149721 1394 -196.3339972 1520 -14.58399721 1528 -82.20899721 1643 17.91600279 1515 -162.8964972 1685 -132.2714972 2000 -16.83399721 2215 81.54100279 1956 275.6808314 1462 -32.46823322 1563 17.96926678 1459 27.15676678 1446 -123.1557332 1622 108.5942668 1657 67.96926678 1638 34.09426678 1643 -13.71823322 1683 -113.0932332 2050 54.34426678 2262 149.7192668 1813 153.8590954 1445 -28.28996923 1762 238.1475308 1461 50.33503077 1556 8.022530771 1431 -61.22746923 1427 -140.8524692 1554 -28.72746923 1645 9.460030771 1653 -121.9149692 2016 41.52253077 2207 115.8975308 1665 27.03735936 1361 -91.11170524 1506 3.325794759 1360 -29.48670524 1453 -73.79920524 1522 50.95079476 1460 -86.67420524 1552 -9.54920524 1548 -66.36170524 1827 73.26329476 1737 -216.2992052 1941 -128.9242052 1474 -142.7843767 1458 27.06655875 1542 60.50405875 1404 35.69155875 1522 16.37905875 1385 -64.87094125 1641 115.5040587 1510 -30.37094125 1681 87.81655875 1938 205.4415587 1868 -64.12094125 1726 -322.7459413 1456 -139.6061127 1445 35.24482274 1456 -4.317677263 1365 17.86982274 1487 2.557322737 1558 129.3073227 1488 -16.31767726 1684 164.8073227 1594 21.99482274 1850 138.6198227 1998 87.05732274 2079 51.43232274 1494 -80.42784867
Names of X columns:
Dood Afwijking
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Include Monthly 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) 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)) 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, 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') 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() 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] = ', '') for (i in 1:k){ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') myeq <- paste(myeq, mysum$coefficients[i,1], ' ') if (rownames(mysum$coefficients)[i] != '(Intercept)') myeq <- paste(myeq, rownames(mysum$coefficients)[i], '') } 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,mysum$coefficients[i,2]) a<-table.element(a,mysum$coefficients[i,3]) a<-table.element(a,mysum$coefficients[i,4]) a<-table.element(a,mysum$coefficients[i,4]/2) 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')
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