Home » date » 2008 » Nov » 24 »

Q3 - omzet ind prod with seasonal dummies

*The author of this computation has been verified*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 24 Nov 2008 14:04:57 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg.htm/, Retrieved Mon, 24 Nov 2008 21:06:25 +0000
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg.htm/},
    year = {2008},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
104.2 0 103.2 0 112.7 0 106.4 0 102.6 0 110.6 0 95.2 0 89.0 0 112.5 0 116.8 0 107.2 0 113.6 0 101.8 0 102.6 0 122.7 0 110.3 0 110.5 0 121.6 0 100.3 0 100.7 0 123.4 0 127.1 0 124.1 0 131.2 0 111.6 0 114.2 0 130.1 0 125.9 0 119.0 0 133.8 0 107.5 0 113.5 0 134.4 0 126.8 0 135.6 0 139.9 0 129.8 0 131.0 0 153.1 0 134.1 1 144.1 1 155.9 1 123.3 1 128.1 1 144.3 1 153.0 1 149.9 1 150.9 1 141.0 1 138.9 1 157.4 1 142.9 1 151.7 1 161.0 1 138.5 1 135.9 1 151.5 1 164.0 1 159.1 1 157.0 1 142.1 1 144.8 1 152.1 1 154.6 1 148.7 1 157.7 1 146.7 1
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 109.194965986394 + 5.76411564625848x[t] -12.6330328798186M1[t] -12.6835714285714M2[t] + 2.1325566893424M3[t] -8.56200113378684M4[t] -8.9125396825397M5[t] + 1.00358843537414M6[t] -21.2636167800454M7[t] -22.0778458049887M8[t] -3.04838435374149M9[t] + 0.521077097505679M10[t] -2.58946145124716M11[t] + 0.750538548752835t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)109.1949659863942.6266841.571500
x5.764115646258482.3772372.42470.0187620.009381
M1-12.63303287981862.977126-4.24348.9e-054.4e-05
M2-12.68357142857142.974374-4.26438.3e-054.1e-05
M32.13255668934242.9728440.71730.4763110.238155
M4-8.562001133786842.991534-2.86210.0060130.003007
M5-8.91253968253972.985597-2.98520.0042810.002141
M61.003588435374142.9808680.33670.737690.368845
M7-21.26361678004542.977356-7.141800
M8-22.07784580498873.112868-7.092400
M9-3.048384353741493.108773-0.98060.3312570.165629
M100.5210770975056793.1058440.16780.86740.4337
M11-2.589461451247163.104085-0.83420.4079070.203953
t0.7505385487528350.06033312.439900


Multiple Linear Regression - Regression Statistics
Multiple R0.974355616693778
R-squared0.949368867782713
Adjusted R-squared0.936949910823755
F-TEST (value)76.4451371335154
F-TEST (DF numerator)13
F-TEST (DF denominator)53
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.90706280371496
Sum Squared Residuals1276.20106405895


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1104.297.3124716553296.88752834467097
2103.298.01247165532885.18752834467121
3112.7113.579138321995-0.879138321995444
4106.4103.6351190476192.76488095238095
5102.6104.035119047619-1.43511904761904
6110.6114.701785714286-4.10178571428572
795.293.1851190476192.01488095238098
88993.1214285714286-4.12142857142856
9112.5112.901428571429-0.401428571428566
10116.8117.221428571429-0.42142857142853
11107.2114.861428571429-7.66142857142855
12113.6118.201428571429-4.60142857142857
13101.8106.318934240363-4.51893424036275
14102.6107.018934240363-4.41893424036281
15122.7122.5856009070290.114399092970537
16110.3112.641581632653-2.34158163265306
17110.5113.041581632653-2.54158163265305
18121.6123.708248299320-2.10824829931972
19100.3102.191581632653-1.89158163265306
20100.7102.127891156463-1.42789115646258
21123.4121.9078911564631.49210884353742
22127.1126.2278911564630.872108843537406
23124.1123.8678911564630.232108843537413
24131.2127.2078911564633.9921088435374
25111.6115.325396825397-3.72539682539679
26114.2116.025396825397-1.82539682539682
27130.1131.592063492063-1.49206349206350
28125.9121.6480442176874.25195578231293
29119122.048044217687-3.04804421768708
30133.8132.7147108843541.08528911564627
31107.5111.198044217687-3.69804421768708
32113.5111.1343537414972.36564625850339
33134.4130.9143537414973.48564625850340
34126.8135.234353741497-8.43435374149661
35135.6132.8743537414972.72564625850339
36139.9136.2143537414973.68564625850340
37129.8124.3318594104315.46814058956921
38131125.0318594104315.96814058956915
39153.1140.59852607709812.5014739229025
40134.1136.418622448980-2.31862244897959
41144.1136.8186224489807.28137755102042
42155.9147.4852891156468.41471088435376
43123.3125.968622448980-2.66862244897959
44128.1125.9049319727892.19506802721088
45144.3145.684931972789-1.38493197278910
46153150.0049319727892.99506802721088
47149.9147.6449319727892.25506802721089
48150.9150.984931972789-0.0849319727891088
49141139.1024376417231.89756235827669
50138.9139.802437641723-0.90243764172335
51157.4155.369104308392.03089569160999
52142.9145.425085034014-2.5250850340136
53151.7145.8250850340145.87491496598639
54161156.4917517006804.50824829931973
55138.5134.9750850340143.52491496598639
56135.9134.9113945578230.988605442176873
57151.5154.691394557823-3.19139455782314
58164159.0113945578234.98860544217685
59159.1156.6513945578232.44860544217686
60157159.991394557823-2.99139455782314
61142.1148.108900226757-6.00890022675734
62144.8148.808900226757-4.00890022675737
63152.1164.375566893424-12.2755668934240
64154.6154.4315476190480.168452380952364
65148.7154.831547619048-6.13154761904764
66157.7165.498214285714-7.79821428571431
67146.7143.9815476190482.71845238095236
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/1ap591227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/1ap591227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/2khqo1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/2khqo1227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/3ko3s1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/3ko3s1227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/4vrnx1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/4vrnx1227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/565jm1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/565jm1227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/626t81227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/626t81227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/7gquw1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/7gquw1227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/8tqoc1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/8tqoc1227560693.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/9i84k1227560693.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227560776h2v6rqutd6z4djg/9i84k1227560693.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
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')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by