Home » date » 2007 » Nov » 15 » attachments

Q3_WS8_Werkloosheid<25_outsourcing&>25

R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 15 Nov 2007 04:28:14 -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/15/t11951259101xrn65u80yhjogu.htm/, Retrieved Thu, 15 Nov 2007 12:25:20 +0100
 
User-defined keywords:
Q3, workshop 8, Rik, werkloosheid
 
Dataseries X:
» Textbox « » Textfile « » CSV «
140 0 0 132 1 0 117 1 0 114 0 0 113 0 0 110 0 0 107 1 0 103 1 0 98 1 0 98 0 0 137 0 0 148 1 0 147 1 1 139 0 1 130 1 1 128 0 1 127 0 1 123 0 1 118 1 1 114 0 1 108 1 1 111 0 1 151 0 1 159 0 1 158 1 1 148 1 1 138 1 1 137 0 1 136 0 1 133 0 1 126 0 1 120 1 1 114 1 1 116 0 1 153 0 1 162 0 1 161 0 1 149 0 1 139 1 1 135 0 1 130 0 1 127 0 1 122 1 1 117 1 1 112 1 1 113 0 1 149 0 1 157 0 1 157 1 1 147 1 1 137 1 1 132 0 1 125 0 1 123 1 1 117 1 1 114 1 1 111 0 1 112 1 1 144 0 1 150 0 1 149 1 1 134 1 1 123 1 1 116 1 1 117 0 1 111 1 1 105 1 1 102 1 1 95 1 1 93 1 1 124 0 1 130 0 1 124 1 1
 
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 time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
<25[t] = + 145.357865871655 -1.33837687591762`ST/DL`[t] + 21.6262589242684Outc[t] -4.22921472041965M1[t] -11.7252604896346M2[t] -21.8230233049027M3[t] -26.3155591420747M4[t] -28.5825103953017M5[t] -31.3469398772365M6[t] -35.7216398798517M7[t] -39.5988616537590M8[t] -44.6427500943329M9[t] -44.1891603061991M10[t] -8.51250770541228M11[t] -0.289444892759341t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)145.3578658716553.34566343.446700
`ST/DL`-1.338376875917622.351273-0.56920.5714090.285704
Outc21.62625892426842.909187.433800
M1-4.229214720419654.032372-1.04880.2986140.149307
M2-11.72526048963464.174553-2.80870.0067670.003383
M3-21.82302330490274.478975-4.87239e-064e-06
M4-26.31555914207473.934067-6.689100
M5-28.58251039530173.934324-7.264900
M6-31.34693987723653.95506-7.925800
M7-35.72163987985174.258035-8.389200
M8-39.59886165375904.247708-9.322400
M9-44.64275009433294.238038-10.533800
M10-44.18916030619913.935521-11.228300
M11-8.512507705412283.928519-2.16680.0343670.017183
t-0.2894448927593410.053707-5.38941e-061e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.93838584467497
R-squared0.880567993486356
Adjusted R-squared0.851739578120994
F-TEST (value)30.5451403528884
F-TEST (DF numerator)14
F-TEST (DF denominator)58
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.77324447055734
Sum Squared Residuals2660.85675816027


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1140140.839206258476-0.839206258476054
2132131.7153387205840.284661279416025
3117121.328131012557-4.32813101255654
4114117.884527158543-3.88452715854283
5113115.328131012557-2.32813101255654
6110112.274256637862-2.27425663786241
7107106.2717348665700.728265133429657
8103102.1050681999040.894931800096396
99896.77173486657031.22826513342974
109898.2742566378624-0.274256637862373
11137133.6614643458903.33853565411012
12148140.5461502826257.45384971737482
13147157.653749593715-10.6537495937146
14139151.206635807658-12.2066358076580
15130139.481051223713-9.48105122371286
16128136.037447369699-8.03744736969914
17127133.481051223713-6.48105122371287
18123130.427176849019-7.42717684901875
19118124.424655077727-6.42465507772658
20114121.596365286978-7.59636528697757
21108114.924655077727-6.9246550777266
22111116.427176849019-5.42717684901876
23151151.814384557046-0.814384557046205
24159160.037447369699-1.03744736969914
25158154.1804108806033.81958911939748
26148146.3949202186281.60507978137176
27138136.0077125106011.99228748939922
28137132.5641086565874.43589134341295
29136130.0077125106015.99228748939922
30133126.9538381359076.04616186409334
31126122.2896932405323.71030675946787
32120116.7846496979483.21535030205216
33114111.4513163646152.54868363538549
34116112.9538381359073.04616186409333
35153148.3410458439344.65895415606589
36162156.5641086565875.43589134341294
37161152.0454490434088.95455095659194
38149144.2599583814344.74004161856621
39139132.5343737974896.46562620251131
40135129.0907699434755.90923005652504
41130126.5343737974893.46562620251131
42127123.4804994227953.51950057720543
43122117.4779776515024.52202234849759
44117113.3113109848363.68868901516425
45112107.9779776515024.02202234849757
46113109.4804994227953.51950057720542
47149144.8677071308224.13229286917798
48157153.0907699434753.90923005652504
49157147.2337334543789.76626654562166
50147139.4482427924047.55175720759594
51137129.0610350843777.9389649156234
52132125.6174312303636.38256876963713
53125123.0610350843771.9389649156234
54123118.6687838337654.33121616623516
55117114.0046389383902.99536106160969
56114109.8379722717244.16202772827634
57111105.8430158143085.15698418569204
58112104.6687838337657.33121616623515
59144141.394368417712.60563158229006
60150149.6174312303630.382568769637127
61149143.7603947412665.23960525873376
62134135.974904079292-1.97490407929197
63123125.587696371265-2.58769637126451
64116120.805715641333-4.80571564133316
65117119.587696371265-2.58769637126451
66111115.195445120653-4.19544512065275
67105110.531300225278-5.53130022527822
68102106.364633558612-4.36463355861158
6995101.031300225278-6.03130022527824
7093101.195445120653-8.19544512065276
71124137.921029704598-13.9210297045978
72130146.144092517251-16.1440925172508
73124140.287056028154-16.2870560281542
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/1rlpb1195126089.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/1rlpb1195126089.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/23ppd1195126089.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/23ppd1195126089.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/3ii831195126089.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/3ii831195126089.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/4dq471195126089.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/4dq471195126089.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/5po241195126090.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/5po241195126090.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/6do7o1195126090.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/6do7o1195126090.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/7dw5p1195126090.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/7dw5p1195126090.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/8aevi1195126090.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/8aevi1195126090.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/9bjbz1195126090.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/15/t11951259101xrn65u80yhjogu/9bjbz1195126090.ps (open in new window)


 
Parameters:
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:

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