Home » date » 2008 » Nov » 23 »

seatbelt3CG2

*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, 23 Nov 2008 08:00:12 -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/23/t12274524635lxohs4wh0lg1dv.htm/, Retrieved Sun, 23 Nov 2008 15:01:03 +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/23/t12274524635lxohs4wh0lg1dv.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 «
97,8 0 107,4 0 117,5 0 105,6 0 97,4 0 99,5 0 98 0 104,3 0 100,6 0 101,1 0 103,9 0 96,9 0 95,5 0 108,4 0 117 0 103,8 0 100,8 0 110,6 0 104 0 112,6 0 107,3 0 98,9 0 109,8 0 104,9 0 102,2 0 123,9 0 124,9 0 112,7 0 121,9 0 100,6 0 104,3 0 120,4 0 107,5 0 102,9 0 125,6 0 107,5 0 108,8 0 128,4 0 121,1 0 119,5 0 128,7 0 108,7 0 105,5 0 119,8 0 111,3 0 110,6 0 120,1 0 97,5 0 107,7 0 127,3 0 117,2 0 119,8 0 116,2 0 111 0 112,4 0 130,6 0 109,1 0 118,8 0 123,9 0 101,6 0 112,8 0 128 0 129,6 0 125,8 0 119,5 0 115,7 0 113,6 0 129,7 0 112 0 116,8 0 127 0 112,1 1 114,2 1 121,1 1 131,6 1 125 1 120,4 1 117,7 1 117,5 1 120,6 1 127,5 1 112,3 1 124,5 1 115,2 1 105,4 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 time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Consumptiegoederen[t] = + 92.5783032666992 -4.01552901023891`Wel(1)_geen(0)_financiële_crisis`[t] + 1.73044145132453M1[t] + 17.8169165447749M2[t] + 19.5892887615797M3[t] + 12.6330895498131M4[t] + 11.3054617666179M5[t] + 5.14926255485129M6[t] + 3.65020620022753M7[t] + 15.1797212741752M8[t] + 5.93780777669429M9[t] + 3.66732285064196M10[t] + 13.8682664960182M11[t] + 0.284770640338047t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)92.57830326669922.2024942.033500
`Wel(1)_geen(0)_financiële_crisis`-4.015529010238911.934446-2.07580.0415350.020767
M11.730441451324532.5934360.66720.5067820.253391
M217.81691654477492.6865866.631800
M319.58928876157972.6855097.294400
M412.63308954981312.6847494.70551.2e-056e-06
M511.30546176661792.6843084.21177.3e-053.7e-05
M65.149262554851292.6841841.91840.0590850.029543
M73.650206200227532.6843791.35980.1781970.089099
M815.17972127417522.6848915.653800
M95.937807776694292.6857222.21090.0302670.015133
M103.667322850641962.686871.36490.1765930.088296
M1113.86826649601822.6883355.15872e-061e-06
t0.2847706403380470.0292219.745500


Multiple Linear Regression - Regression Statistics
Multiple R0.881771504579187
R-squared0.777520986287843
Adjusted R-squared0.73678539222787
F-TEST (value)19.0870172445048
F-TEST (DF numerator)13
F-TEST (DF denominator)71
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.00612210608242
Sum Squared Residuals1779.34935641150


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
197.894.5935153583623.20648464163802
2107.4110.964761092150-3.56476109215017
3117.5113.0219039492934.47809605070698
4105.6106.350475377864-0.750475377864452
597.4105.307618235007-7.9076182350073
699.599.43618966357870.0638103364212654
79898.221903949293-0.221903949293019
8104.3110.036189663579-5.73618966357873
9100.6101.079046806436-0.479046806435882
10101.199.09333252072162.00666747927841
11103.9109.579046806436-5.67904680643587
1296.995.99555095075570.904449049244283
1395.598.0107630424183-2.51076304241829
14108.4114.382008776207-5.98200877620671
15117116.4391516333500.560848366650421
16103.8109.767723061921-5.96772306192101
17100.8108.724865919064-7.92486591906387
18110.6102.8534373476357.7465626523647
19104101.6391516333502.36084836665042
20112.6113.453437347635-0.8534373476353
21107.3104.4962944904922.80370550950756
2298.9102.510580204778-3.61058020477815
23109.8112.996294490492-3.19629449049244
24104.999.41279863481235.48720136518773
25102.2101.4280107264750.771989273525143
26123.9117.7992564602636.10074353973672
27124.9119.8563993174065.04360068259387
28112.7113.184970745978-0.484970745977566
29121.9112.1421136031209.75788639687958
30100.6106.270685031692-5.67068503169186
31104.3105.056399317406-0.756399317406144
32120.4116.8706850316923.52931496830816
33107.5107.913542174549-0.413542174548996
34102.9105.927827888835-3.02782788883471
35125.6116.4135421745499.186457825451
36107.5102.8300463188694.66995368113116
37108.8104.8452584105313.95474158946858
38128.4121.2165041443207.18349585568016
39121.1123.273647001463-2.17364700146271
40119.5116.6022184300342.89778156996587
41128.7115.55936128717713.140638712823
42108.7109.687932715748-0.987932715748414
43105.5108.473647001463-2.9736470014627
44119.8120.287932715748-0.487932715748415
45111.3111.330789858606-0.0307898586055590
46110.6109.3450755728911.25492442710872
47120.1119.8307898586060.269210141394436
4897.5106.247294002925-8.7472940029254
49107.7108.262506094588-0.562506094587979
50127.3124.6337518283762.66624817162359
51117.2126.690894685519-9.49089468551926
52119.8120.019466114091-0.219466114090695
53116.2118.976608971234-2.77660897123355
54111113.105180399805-2.10518039980498
55112.4111.8908946855190.509105314480739
56130.6123.7051803998056.89481960019502
57109.1114.748037542662-5.64803754266212
58118.8112.7623232569486.03767674305216
59123.9123.2480375426620.651962457337885
60101.6109.664541686982-8.06454168698197
61112.8111.6797537786451.12024622135546
62128128.050999512433-0.0509995124329651
63129.6130.108142369576-0.508142369575828
64125.8123.4367137981472.36328620185275
65119.5122.39385665529-2.89385665529010
66115.7116.522428083862-0.822428083861532
67113.6115.308142369576-1.70814236957582
68129.7127.1224280838622.57757191613846
69112118.165285226719-6.16528522671867
70116.8116.1795709410040.620429058995612
71127126.6652852267190.334714773281321
72112.1109.0662603608003.03373963920038
73114.2111.0814724524623.11852754753782
74121.1127.452718186251-6.35271818625062
75131.6129.5098610433932.09013895660653
76125122.8384324719652.1615675280351
77120.4121.795575329108-1.39557532910775
78117.7115.9241467576791.77585324232082
79117.5114.7098610433932.79013895660653
80120.6126.524146757679-5.92414675767919
81127.5117.5670039005369.93299609946367
82112.3115.581289614822-3.28128961482205
83124.5126.067003900536-1.56700390053633
84115.2112.4835080448562.71649195514383
85105.4114.498720136519-9.09872013651875
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/1p2lv1227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/1p2lv1227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/2l1b61227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/2l1b61227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/3rrfa1227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/3rrfa1227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/4k5xb1227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/4k5xb1227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/56fqe1227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/56fqe1227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/61e351227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/61e351227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/7tto91227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/7tto91227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/8arzc1227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/8arzc1227452402.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/9mjss1227452402.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t12274524635lxohs4wh0lg1dv/9mjss1227452402.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No 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