Home » date » 2008 » Dec » 07 »

dummy2

*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: Sun, 07 Dec 2008 05:43: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/Dec/07/t1228653901fji8tbjjyfwzqky.htm/, Retrieved Sun, 07 Dec 2008 12:45:10 +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/Dec/07/t1228653901fji8tbjjyfwzqky.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:
2008-11-27 13:41:43 [a2386b643d711541400692649981f2dc] [reply
test

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
493 0 481 0 462 0 457 0 442 0 439 0 488 0 521 0 501 0 485 0 464 0 460 0 467 0 460 0 448 0 443 0 436 0 431 0 484 0 510 0 513 0 503 0 471 0 471 0 476 0 475 0 470 0 461 0 455 0 456 0 517 0 525 0 523 0 519 0 509 0 512 0 519 0 517 0 510 0 509 0 501 0 507 0 569 0 580 0 578 0 565 0 547 0 555 0 562 0 561 0 555 0 544 0 537 0 543 0 594 0 611 0 613 0 611 0 594 0 595 0 591 0 589 0 584 0 573 0 567 0 569 0 621 0 629 0 628 0 612 0 595 0 597 0 593 0 590 0 580 0 574 0 573 0 573 0 620 0 626 0 620 0 588 0 566 0 557 0 561 0 549 0 532 0 526 0 511 0 499 0 555 1 565 1 542 1 527 1 510 1 514 1 517 1 508 1 493 1 490 1 469 1 478 1 528 1 534 1 518 1 506 1 502 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 time3 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Werkloosheid[t] = + 457.194308186739 -115.178788903924`Wel(1)_geen(0)_financiële_crisis`[t] + 5.09270574913525M1[t] -2.01522092542481M2[t] -14.3453698222073M3[t] -22.3421853856563M4[t] -33.5612231713276M5[t] -34.780260956999M6[t] + 29.7983444688769M7[t] + 42.0237511276500M8[t] + 33.1380466753120M9[t] + 18.1412311118628M10[t] -1.07780667380851M11[t] + 1.66348223011577t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)457.19430818673910.40720443.930600
`Wel(1)_geen(0)_financiële_crisis`-115.1787889039248.886232-12.961500
M15.0927057491352512.5389330.40620.6855640.342782
M2-2.0152209254248112.535661-0.16080.8726320.436316
M3-14.345369822207312.53326-1.14460.2553190.127659
M4-22.342185385656312.531729-1.78280.0778740.038937
M5-33.561223171327612.531071-2.67820.0087510.004375
M6-34.78026095699912.531284-2.77550.0066640.003332
M729.798344468876912.5563232.37320.0196940.009847
M842.023751127650012.5530923.34770.0011780.000589
M933.138046675312012.550732.64030.0097140.004857
M1018.141231111862812.5492381.44560.151650.075825
M11-1.0778066738085112.548617-0.08590.9317380.465869
t1.663482230115770.10452415.914800


Multiple Linear Regression - Regression Statistics
Multiple R0.88711550745224
R-squared0.786973923562245
Adjusted R-squared0.757196084920408
F-TEST (value)26.4281747586803
F-TEST (DF numerator)13
F-TEST (DF denominator)93
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation25.7879197163756
Sum Squared Residuals61846.5627067357


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1493463.95049616599229.0495038340082
2481458.50605172154622.4939482784543
3462447.83938505487914.160614945121
4457441.50605172154615.4939482784545
5442431.9504961659910.0495038340102
6439432.3949406104356.60505938956552
7488498.637028266426-10.6370282664261
8521512.5259171553158.47408284468521
9501505.303694933093-4.30369493309283
10485491.970361599759-6.9703615997594
11464474.414806044204-10.4148060442039
12460477.156094948128-17.1560949481280
13467483.912282927379-16.9122829273792
14460478.467838482935-18.4678384829347
15448467.801171816268-19.8011718162682
16443461.467838482935-18.4678384829349
17436451.912282927379-15.9122829273793
18431452.356727371824-21.3567273718237
19484518.598815027815-34.5988150278153
20510532.487703916704-22.4877039167042
21513525.265481694482-12.2654816944820
22503511.932148361149-8.93214836114865
23471494.376592805593-23.3765928055931
24471497.117881709517-26.1178817095174
25476503.874069688768-27.8740696887683
26475498.429625244324-23.4296252443241
27470487.762958577657-17.7629585776575
28461481.429625244324-20.4296252443241
29455471.874069688769-16.8740696887686
30456472.318514133213-16.318514133213
31517538.560601789205-21.5606017892046
32525552.449490678094-27.4494906780935
33523545.227268455871-22.2272684558713
34519531.893935122538-12.8939351225379
35509514.338379566982-5.33837956698239
36512517.079668470907-5.07966847090663
37519523.835856450158-4.83585645015764
38517518.391412005713-1.39141200571341
39510507.7247453390472.27525466095327
40509501.3914120057137.60858799428657
41501491.8358564501589.16414354984212
42507492.28030089460214.7196991053977
43569558.52238855059410.4776114494061
44580572.4112774394837.5887225605172
45578565.18905521726112.8109447827394
46565551.85572188392713.1442781160728
47547534.30016632837212.6998336716283
48555537.04145523229617.9585447677041
49562543.79764321154718.2023567884531
50561538.35319876710322.6468012328973
51555527.68653210043627.313467899564
52544521.35319876710322.6468012328973
53537511.79764321154725.2023567884528
54543512.24208765599230.7579123440084
55594578.48417531198315.5158246880168
56611592.37306420087218.6269357991279
57613585.1508419786527.8491580213502
58611571.81750864531639.1824913546835
59594554.26195308976139.7380469102390
60595557.00324199368537.9967580063148
61591563.75942997293627.2405700270638
62589558.31498552849230.6850144715080
63584547.64831886182536.3516811381747
64573541.31498552849231.685014471508
65567531.75942997293635.2405700270635
66569532.20387441738136.7961255826191
67621598.44596207337222.5540379266276
68629612.33485096226116.6651490377387
69628605.11262874003922.8873712599609
70612591.77929540670620.2207045932942
71595574.2237398511520.7762601488498
72597576.96502875507420.0349712449255
73593583.7212167343259.27878326567454
74590578.27677228988111.7232277101187
75580567.61010562321512.3898943767854
76574561.27677228988112.7232277101187
77573551.72121673432621.2787832656742
78573552.1656611787720.8343388212299
79620618.4077488347621.59225116523827
80626632.296637723651-6.29663772365065
81620625.074415501428-5.07441550142837
82588611.741082168095-23.7410821680951
83566594.18552661254-28.1855266125395
84557596.926815516464-39.9268155164638
85561603.683003495715-42.6830034957148
86549598.23855905127-49.2385590512705
87532587.571892384604-55.5718923846039
88526581.238559051271-55.2385590512706
89511571.683003495715-60.683003495715
90499572.12744794016-73.1274479401594
91555523.19074669222731.8092533077733
92565537.07963558111627.9203644188843
93542529.85741335889312.1425866411066
94527516.5240800255610.4759199744399
95510498.96852447000511.0314755299955
96514501.70981337392912.2901866260712
97517508.466001353188.53399864682025
98508503.0215569087364.97844309126448
99493492.3548902420690.645109757931141
100490486.0215569087363.97844309126445
101469476.46600135318-7.46600135318
102478476.9104457976241.08955420237556
103528543.152533453616-15.1525334536160
104534557.041422342505-23.0414223425049
105518549.819200120283-31.8192001202827
106506536.485866786949-30.4858667869493
107502518.930311231394-16.9303112313938
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/123uh1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/123uh1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/2chhh1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/2chhh1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/39qaa1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/39qaa1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/4d5ui1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/4d5ui1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/52dib1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/52dib1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/6ac3q1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/6ac3q1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/7ud4j1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/7ud4j1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/840ip1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/840ip1228653833.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/9g08r1228653833.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t1228653901fji8tbjjyfwzqky/9g08r1228653833.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