Home » date » 2008 » Jan » 03 » attachments

Aanslagen Nigeria Brent-olie

R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 03 Jan 2008 08:18: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/2008/Jan/03/t1199373582vuj5mducnxkym69.htm/, Retrieved Thu, 03 Jan 2008 16:19:43 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
25.62 0 27.5 0 24.5 0 25.66 0 28.31 0 27.85 1 24.61 0 25.68 0 25.62 1 20.54 1 18.8 0 18.71 0 19.46 0 20.12 0 23.54 0 25.6 0 25.39 0 24.09 0 25.69 0 26.56 0 28.33 0 27.5 0 24.23 0 28.23 1 31.29 0 32.72 0 30.46 0 24.89 0 25.68 0 27.52 0 28.4 0 29.71 0 26.85 0 29.62 0 28.69 0 29.76 0 31.3 0 30.86 0 33.46 0 33.15 0 37.99 0 35.24 0 38.24 0 43.16 0 43.33 0 49.67 0 43.17 0 39.56 1 44.36 0 45.22 0 53.1 0 52.1 0 48.52 0 54.84 0 57.57 0 64.14 0 62.85 0 58.75 0 55.33 0 57.03 0 63.18 0 60.19 0 62.12 0 70.12 1 69.75 1 68.56 1 73.77 1 73.23 1 61.96 0 57.81 0 58.76 0 62.47 1 53.68 1 57.56 1 62.05 1 67.49 1 67.21 1 71.05 1 76.93 1 70.76 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 time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
Prijs_Brentolie[t] = + 9.3461699708377 + 4.29011878962999Aanslagen_Nigeria[t] + 3.96148337340126M1[t] + 4.05381423131363M2[t] + 5.54328794636885M3[t] + 5.66560183433408M4[t] + 5.55221840653215M5[t] + 5.17738943735452M6[t] + 7.42259440807117M7[t] + 7.90778240884068M8[t] + 5.61257083233004M9[t] + 4.10894930929002M10[t] + 1.67701425118834M11[t] + 0.661954856373349t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.34616997083772.9785613.13780.0025440.001272
Aanslagen_Nigeria4.290118789629991.9914862.15420.0348770.017439
M13.961483373401263.6649311.08090.2836680.141834
M24.053814231313633.6664291.10570.2728890.136444
M35.543287946368853.6682621.51110.1355240.067762
M45.665601834334083.6284941.56140.1232070.061604
M55.552218406532153.629811.52960.1308910.065445
M65.177389437354523.6091071.43450.1561410.078071
M77.422594408071173.6334582.04280.0450650.022532
M87.907782408840683.635792.1750.0332190.01661
M95.612570832330043.7941771.47930.1438280.071914
M104.108949309290023.796081.08240.2830050.141503
M111.677014251188343.8688060.43350.6660860.333043
t0.6619548563733490.0351218.848100


Multiple Linear Regression - Regression Statistics
Multiple R0.94081361649493
R-squared0.885130260982268
Adjusted R-squared0.862504403296957
F-TEST (value)39.1202964896624
F-TEST (DF numerator)13
F-TEST (DF denominator)66
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.48209176855291
Sum Squared Residuals2773.15590393214


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
125.6213.969608200612311.6503917993877
227.514.72389391489812.776106085102
324.516.87532248632667.62467751367342
425.6617.65959123066528.00040876933485
528.3118.208162659236610.1018373407634
627.8522.78540733606235.06459266393771
724.6121.40244837352233.2075516264777
825.6822.54959123066523.13040876933484
925.6225.20645330015790.413546699842143
1020.5424.3647866334912-3.82478663349118
1118.818.30468764213290.495312357867139
1218.7117.28962824731791.42037175268212
1319.4621.9130664770925-2.45306647709248
1420.1222.6673521913782-2.54735219137819
1523.5424.8187807628068-1.27878076280677
1625.625.6030495071453-0.00304950714534466
1725.3926.1516209357168-0.761620935716772
1824.0926.4387468229125-2.34874682291249
1925.6929.3459066500025-3.65590665000248
2026.5630.4930495071453-3.93304950714535
2128.3328.8597927870081-0.529792787008056
2227.528.0181261203414-0.518126120341386
2324.2326.2481459186131-2.01814591861305
2428.2329.5232053134280-1.29320531342805
2531.2929.85652475357271.43347524642733
2632.7230.61081046785842.10918953214161
2730.4632.7622390392870-2.30223903928695
2824.8933.5465077836255-8.65650778362553
2925.6834.0950792121969-8.41507921219695
3027.5234.3822050993927-6.86220509939267
3128.437.2893649264827-8.88936492648267
3229.7138.4365077836255-8.72650778362553
3326.8536.8032510634882-9.95325106348824
3429.6235.9615843968216-6.34158439682157
3528.6934.1916041950932-5.50160419509324
3629.7633.1765448002783-3.41654480027825
3731.337.7999830300529-6.49998303005286
3830.8638.5542687443386-7.69426874433857
3933.4640.7056973157671-7.24569731576714
4033.1541.4899660601057-8.33996606010571
4137.9942.0385374886772-4.04853748867715
4235.2442.3256633758729-7.08566337587286
4338.2445.2328232029629-6.99282320296286
4443.1646.3799660601057-3.21996606010572
4543.3344.7467093399684-1.41670933996843
4649.6743.90504267330185.76495732669824
4743.1742.13506247157341.03493752842658
4839.5645.4101218663884-5.85012186638842
4944.3645.7434413065331-1.38344130653305
5045.2246.4977270208188-1.27772702081876
5153.148.64915559224734.45084440775267
5252.149.43342433658592.66657566341409
5348.5249.9819957651573-1.46199576515733
5454.8450.26912165235314.57087834764695
5557.5753.1762814794434.39371852055695
5664.1454.32342433658599.8165756634141
5762.8552.690167616448610.1598323835514
5858.7551.8485009497826.90149905021805
5955.3350.07852074805365.25147925194638
6057.0349.06346135323867.96653864676138
6163.1853.68689958301329.49310041698677
6260.1954.4411852972995.74881470270104
6362.1256.59261386872755.52738613127247
6470.1261.66700140269618.45299859730392
6569.7562.21557283126757.53442716873249
6668.5662.50269871846326.05730128153678
6773.7765.40985854555328.36014145444677
6873.2366.55700140269616.67299859730392
6961.9660.63362589292881.32637410707120
7057.8159.7919592262621-1.98195922626214
7158.7658.02197902453380.738020975466195
7262.4761.29703841934881.17296158065120
7353.6865.9204766491234-12.2404766491234
7457.5666.6747623634091-9.11476236340912
7562.0568.8261909348377-6.7761909348377
7667.4969.6104596791763-2.12045967917627
7767.2170.1590311077477-2.9490311077477
7871.0570.44615699494340.603843005056587
7976.9373.35331682203343.5766831779666
8070.7674.5004596791763-3.74045967917626
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/1coz81199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/1coz81199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/2nlcp1199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/2nlcp1199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/37jta1199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/37jta1199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/4esz91199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/4esz91199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/59sxn1199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/59sxn1199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/6bvnf1199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/6bvnf1199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/7vzby1199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/7vzby1199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/8qe421199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/8qe421199373526.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/9777e1199373526.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/03/t1199373582vuj5mducnxkym69/9777e1199373526.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