Home » date » 2007 » Nov » 21 » attachments

Ouput 2: Zonder trend en met seizoensinvloeden

R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 21 Nov 2007 02:37:54 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85.htm/, Retrieved Wed, 21 Nov 2007 10:30:59 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,2286 1 1,1702 1 1,1692 1 1,1222 1 1,1139 1 1,1372 1 1,1663 1 1,1582 1 1,0848 1 1,0807 1 1,0773 1 1,0622 1 1,0183 1 1,0014 1 0,9811 1 0,9808 1 0,9778 1 0,9922 1 0,9554 1 0,9170 1 0,8858 1 0,8758 1 0,8700 1 0,8833 1 0,8924 1 0,8883 1 0,9059 1 0,9111 1 0,9005 0 0,8607 0 0,8532 0 0,8742 0 0,8920 0 0,9095 0 0,9217 0 0,9383 0 0,8973 0 0,8564 0 0,8552 0 0,8721 0 0,9041 0 0,9397 0 0,9492 0 0,9060 0 0,9470 0 0,9643 0 0,9834 0 1,0137 0 1,0110 0 1,0338 0 1,0706 0 1,0501 0 1,0604 0 1,0353 0 1,0378 0 1,0628 0 1,0704 0 1,0883 0 1,1208 0 1,1608 0
 
Text written by user:
 
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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
dollarkoers[t] = + 0.992076666666667 + 0.0489583333333333dummy[t] -0.011931666666667M1[t] -0.0314316666666667M2[t] -0.0250516666666668M3[t] -0.0341916666666667M4[t] -0.0203200000000001M5[t] -0.0186400000000001M6[t] -0.0192800000000001M7[t] -0.0280200000000001M8[t] -0.0356600000000001M9[t] -0.0279400000000001M10[t] -0.0170200000000001M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.9920766666666670.05039819.684800
dummy0.04895833333333330.0289051.69370.0969320.048466
M1-0.0119316666666670.069613-0.17140.8646460.432323
M2-0.03143166666666670.069613-0.45150.6536930.326846
M3-0.02505166666666680.069613-0.35990.7205570.360279
M4-0.03419166666666670.069613-0.49120.6255950.312798
M5-0.02032000000000010.069373-0.29290.770880.38544
M6-0.01864000000000010.069373-0.26870.7893420.394671
M7-0.01928000000000010.069373-0.27790.7822940.391147
M8-0.02802000000000010.069373-0.40390.6881150.344057
M9-0.03566000000000010.069373-0.5140.6096370.304818
M10-0.02794000000000010.069373-0.40280.6889570.344479
M11-0.01702000000000010.069373-0.24530.8072610.40363


Multiple Linear Regression - Regression Statistics
Multiple R0.257668500891859
R-squared0.0663930563518578
Adjusted R-squared-0.171974673941285
F-TEST (value)0.278532065855593
F-TEST (DF numerator)12
F-TEST (DF denominator)47
p-value0.99009948052604
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.109688079512926
Sum Squared Residuals0.565479315


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11.22861.029103333333330.199496666666666
21.17021.009603333333330.160596666666667
31.16921.015983333333330.153216666666667
41.12221.006843333333330.115356666666667
51.11391.0207150.093185
61.13721.0223950.114805
71.16631.0217550.144545
81.15821.0130150.145185
91.08481.0053750.079425
101.08071.0130950.067605
111.07731.0240150.053285
121.06221.0410350.0211650000000000
131.01831.02910333333333-0.0108033333333331
141.00141.00960333333333-0.00820333333333332
150.98111.01598333333333-0.0348833333333333
160.98081.00684333333333-0.0260433333333334
170.97781.020715-0.042915
180.99221.022395-0.0301950000000001
190.95541.021755-0.0663549999999999
200.9171.013015-0.096015
210.88581.005375-0.119575
220.87581.013095-0.137295
230.871.024015-0.154015
240.88331.041035-0.157735
250.89241.02910333333333-0.136703333333333
260.88831.00960333333333-0.121303333333333
270.90591.01598333333333-0.110083333333333
280.91111.00684333333333-0.0957433333333334
290.90050.971756666666667-0.0712566666666667
300.86070.973436666666667-0.112736666666667
310.85320.972796666666667-0.119596666666667
320.87420.964056666666667-0.0898566666666667
330.8920.956416666666667-0.0644166666666666
340.90950.964136666666667-0.0546366666666667
350.92170.975056666666667-0.0533566666666667
360.93830.992076666666667-0.0537766666666667
370.89730.980145-0.0828449999999997
380.85640.960645-0.104245
390.85520.967025-0.111825
400.87210.957885-0.085785
410.90410.971756666666667-0.0676566666666666
420.93970.973436666666667-0.0337366666666667
430.94920.972796666666667-0.0235966666666666
440.9060.964056666666667-0.0580566666666666
450.9470.956416666666667-0.00941666666666668
460.96430.9641366666666670.000163333333333397
470.98340.9750566666666670.00834333333333342
481.01370.9920766666666670.0216233333333333
491.0110.9801450.0308550000000001
501.03380.9606450.073155
511.07060.9670250.103575
521.05010.9578850.092215
531.06040.9717566666666670.0886433333333334
541.03530.9734366666666670.0618633333333334
551.03780.9727966666666670.0650033333333334
561.06280.9640566666666670.0987433333333333
571.07040.9564166666666670.113983333333333
581.08830.9641366666666670.124163333333333
591.12080.9750566666666670.145743333333333
601.16080.9920766666666670.168723333333333
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/18qfl1195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/18qfl1195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/2j7se1195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/2j7se1195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/3pey61195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/3pey61195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/4pgbt1195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/4pgbt1195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/5up121195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/5up121195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/65t031195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/65t031195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/7oo3d1195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/7oo3d1195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/8cd1v1195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/8cd1v1195637868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/9mjhc1195637868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/21/t1195637449e8u3wblxp85bu85/9mjhc1195637868.ps (open in new window)


 
Parameters:
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No 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:

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