Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
103.1 98.6 98.1 98.6 0 100.6 98 101.1 98 0 103.1 106.8 111.1 106.8 0 95.5 96.6 93.3 96.7 0 90.5 100.1 100 100.2 0 90.9 107.7 108 107.7 0 88.8 91.5 70.4 92 0 90.7 97.8 75.4 98.4 0 94.3 107.4 105.5 107.4 0 104.6 117.5 112.3 117.7 0 111.1 105.6 102.5 105.7 0 110.8 97.4 93.5 97.5 0 107.2 99.5 86.7 99.9 1 99 98 95.2 98.2 1 99 104.3 103.8 104.5 1 91 100.6 97 100.8 1 96.2 101.1 95.5 101.5 1 96.9 103.9 101 103.9 1 96.2 96.9 67.5 99.6 1 100.1 95.5 64 98.4 1 99 108.4 106.7 112.7 1 115.4 117 100.6 118.4 1 106.9 103.8 101.2 108.1 1 107.1 100.8 93.1 105.4 1 99.3 110.6 84.2 114.6 1 99.2 104 85.8 106.9 1 108.3 112.6 91.8 115.9 1 105.6 107.3 92.4 109.8 1 99.5 98.9 80.3 101.8 1 107.4 109.8 79.7 114.2 1 93.1 104.9 62.5 110.8 1 88.1 102.2 57.1 108.4 1 110.7 123.9 100.8 127.5 1 113.1 124.9 100.7 128.6 1 99.6 112.7 86.2 116.6 1 93.6 121.9 83.2 127.4 1 98.6 100.6 71.7 105 1 99.6 104.3 77.5 108.3 1 114.3 120.4 89.8 125 1 107.8 107.5 80.3 111.6 1 101.2 102.9 78.7 106.5 1 112.5 125.6 93.8 130.3 1 100.5 107.5 57.6 115 1 93.9 108.8 60.6 116.1 1 116.2 128.4 91 134 1 112 121.1 85.3 126.5 1 106.4 119.5 77.4 125.8 1 95.7 128.7 77.3 136.4 1 96 108.7 68.3 114.9 1 95.8 105.5 69.9 110.9 1 103 119.8 81.7 125.5 1 102.2 111.3 75.1 116.8 1 98.4 110.6 69.9 116.8 1 111.4 120.1 84 125.5 1 86.6 97.5 54.3 104.2 1 91.3 107.7 60 115.1 1 107.9 127.3 89.9 132.8 1 101.8 117.2 77 123.3 1 104.4 119.8 85.3 124.8 1 93.4 116.2 77.6 122 1 100.1 111 69.2 117.4 1 98.5 112.4 75.5 117.9 1 112.9 130.6 85.7 137.4 1 101.4 109.1 72.2 114.6 1 107.1 118.8 79.9 124.7 1 110.8 123.9 85.3 129.6 1 90.3 101.6 52.2 109.4 1 95.5 112.8 61.2 120.9 1 111.4 128 82.4 134.9 1 113 129.6 85.4 136.3 1 107.5 125.8 78.2 133.2 1 95.9 119.5 70.2 127.2 1 106.3 115.7 70.2 122.7 1 105.2 113.6 69.3 120.5 1 117.2 129.7 77.5 137.8 1 106.9 112 66.1 119.1 1 108.2 116.8 69 124.3 1 110 126.3 75.3 134.3 1 96.1 112.9 58.2 121.7 1 100.6 115.9 59.7 125 1
Names of X columns:
intermediair-goederen totale-consumptie Duurzame-consumptiegoederen Niet-duurzame-consumptiegoederen invoering-Euro
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
1
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
0
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
3
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, 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') 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] = ', 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')
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