Home » date » 2009 » Dec » 31 »

multiple regression: olieprijs en dowjones en dummy

*Unverified author*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 31 Dec 2009 05:41: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/2009/Dec/31/t1262263345vcd0akdw0fd0ctt.htm/, Retrieved Thu, 31 Dec 2009 13:42:36 +0100
 
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/2009/Dec/31/t1262263345vcd0akdw0fd0ctt.htm/},
    year = {2009},
}
@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 = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
32,68 10967,87 0 31,54 10433,56 0 32,43 10665,78 0 26,54 10666,71 0 25,85 10682,74 0 27,6 10777,22 0 25,71 10052,6 0 25,38 10213,97 0 28,57 10546,82 0 27,64 10767,2 0 25,36 10444,5 0 25,9 10314,68 0 26,29 9042,56 0 21,74 9220,75 0 19,2 9721,84 0 19,32 9978,53 0 19,82 9923,81 0 20,36 9892,56 0 24,31 10500,98 0 25,97 10179,35 0 25,61 10080,48 0 24,67 9492,44 0 25,59 8616,49 0 26,09 8685,4 0 28,37 8160,67 0 27,34 8048,1 0 24,46 8641,21 0 27,46 8526,63 0 30,23 8474,21 0 32,33 7916,13 0 29,87 7977,64 0 24,87 8334,59 0 25,48 8623,36 0 27,28 9098,03 0 28,24 9154,34 0 29,58 9284,73 0 26,95 9492,49 0 29,08 9682,35 0 28,76 9762,12 0 29,59 10124,63 0 30,7 10540,05 0 30,52 10601,61 0 32,67 10323,73 0 33,19 10418,4 0 37,13 10092,96 0 35,54 10364,91 0 37,75 10152,09 0 41,84 10032,8 0 42,94 10204,59 0 49,14 10001,6 0 44,61 10411,75 0 40,22 10673,38 0 44,23 10539,51 0 45,85 10723,78 0 53,38 10682,06 0 53,26 10283,19 0 51,8 10377,18 0 55,3 10486,64 0 57,81 10545,38 0 etc...
 
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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Olieprijs[t] = -48.065021886369 + 0.00736400267991173DowJones[t] + 13.8791019949137`Dummy(kredietcrisis)`[t] -2.00316998373972M1[t] -3.48228255312318M2[t] -6.82693077863326M3[t] -9.80357951011225M4[t] -8.58665770725735M5[t] -7.41367552842454M6[t] -3.87582979864214M7[t] -3.65260729263648M8[t] -1.93036287787659M9[t] + 0.386228852855002M10[t] + 1.35415373158679M11[t] + 0.40516952938097t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-48.0650218863699.090277-5.28751e-060
DowJones0.007364002679911730.0008159.038600
`Dummy(kredietcrisis)`13.87910199491374.109133.37760.0010570.000529
M1-2.003169983739725.579747-0.3590.7203780.360189
M2-3.482282553123185.579709-0.62410.5340440.267022
M3-6.826930778633265.577363-1.2240.2239320.111966
M4-9.803579510112255.731482-1.71050.0904070.045204
M5-8.586657707257355.729249-1.49870.1372220.068611
M6-7.413675528424545.728684-1.29410.1987240.099362
M7-3.875829798642145.730997-0.67630.5004810.250241
M8-3.652607292636485.729956-0.63750.5253440.262672
M9-1.930362877876595.732571-0.33670.7370510.368525
M100.3862288528550025.7338240.06740.9464350.473218
M111.354153731586795.7215680.23670.8134130.406706
t0.405169529380970.0579246.994900


Multiple Linear Regression - Regression Statistics
Multiple R0.902608410865166
R-squared0.81470194336454
Adjusted R-squared0.787679310105203
F-TEST (value)30.1488731888486
F-TEST (DF numerator)14
F-TEST (DF denominator)96
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation12.1363621682502
Sum Squared Residuals14139.9635211778


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.6831.10440173219561.57559826780441
231.5426.09579842028955.44420157971046
332.4324.86638842648967.56361157351043
426.5422.30175774688394.23824225311613
525.8524.04189404207871.80810595792127
627.626.31579672349061.28420327650942
725.7124.92270836073630.7872916392637
825.3826.7394295085803-1.35942950858028
928.5731.3179517447298-2.74795174472977
1027.6435.6625919154413-8.02259191544131
1125.3634.6593226587465-9.29932265874653
1225.932.7543436286346-6.85434362863457
1326.2921.78844808510654.50155191489349
1421.7422.0266966826375-0.286696682637501
1519.222.7772460893853-3.57724608938532
1619.3222.0960327351939-2.77603273519387
1719.8223.3151658407850-3.49516584078496
1820.3624.6631924652515-4.3031924652515
1924.3133.0866142349268-8.77661423492676
2025.9731.3465220883734-5.3765220883734
2125.6132.7458570875514-7.13585708755137
2224.6731.1372902117686-6.46729021176864
2325.5926.0598864724127-0.469886472412717
2426.0925.61835569487960.471644305120389
2528.3720.15624211429088.21375788570922
2627.3418.25333329261069.08666670738936
2724.4619.68151822596404.77848177403605
2827.4616.266271596801711.1937284031983
2930.2317.502341908556512.7276580914435
3032.3314.970791001165217.3592089988348
3129.8719.366766065169910.5032339348301
3224.8722.62373885715112.24626114284894
3325.4826.8776558551700-1.39765585517003
3427.2833.0948882673563-5.8148882673563
3528.2434.8826496663749-6.64264966637488
3629.5834.8938577736027-5.31385777360275
3726.9534.8258025160225-7.87580251602247
3829.0835.149989024828-6.06998902482803
3928.7632.7979368224755-4.03793682247547
4029.5932.8959822318722-3.30598223187225
4130.737.5772275573970-6.87722755739705
4230.5239.6087072705862-9.0887072705862
4332.6741.5054134650557-8.83541346505568
4433.1942.8309556341496-9.64095563414957
4537.1342.5618285461399-5.43182854613994
4635.5447.2862303350545-11.7462303350545
4737.7547.0921176928285-9.34211769282845
4841.8445.2646816109360-3.42468161093595
4942.9444.9317431769593-1.99174317695926
5049.1442.36298123296156.77701876703852
5144.6142.44384823599822.16615176400184
5240.2241.7990130550454-1.57901305504545
5344.2342.43528534852151.79471465147846
5445.8545.37040183056270.479598169437341
5553.3849.00619089792014.3738091020799
5653.2646.69730318437036.56269681562965
5751.849.51685974039612.28314025960389
5855.353.04468473385182.2553152661482
5957.8154.85034065938262.95965934061743
6063.9653.96682244100129.99317755899883
6163.7752.20880220840811.5611977915921
6259.1549.60145289036749.54854710963257
6356.1249.39357734832486.72642265167522
6457.4247.79827034147599.62172965852414
6563.5249.749311673423413.7706883265766
6661.7152.05436408617139.65563591382874
6763.0157.2821032528725.72789674712798
6868.1858.56611244685129.6138875531488
6972.0361.424035456839310.6059645431607
7069.7561.67215457674278.07784542325729
7174.4163.331855969157611.0781440308424
7274.3364.006339797765210.3236602022348
7364.2464.4425714437052-0.202571443705235
7460.0366.5316884748052-6.50168847480523
7559.4465.2272392936969-5.78723929369691
7662.564.0731096874015-1.57310968740151
7755.0466.691329662149-11.6513296621490
7858.3469.1427784481735-10.8027784481735
7961.9270.413028934663-8.49302893466295
8067.6574.6223145532103-6.97231455321025
8167.6881.5580540471995-13.8780540471995
8270.384.8134109414984-14.5134109414985
8375.26101.487375341935-26.2273753419355
8471.4497.3455804978003-25.9055804978003
8576.3698.0891856156-21.7291856155999
8681.7199.5454402563883-17.8354402563883
8792.691.4460048824451.15399511755497
8890.690.3943821934540.205617806545992
8992.2385.61825979724866.61174020275144
9094.0986.32340898775887.7665910122412
91102.7988.604442482092914.1855575179071
92109.6592.640526757608717.0094732423913
93124.0595.915620519413828.1343794805862
94132.6993.071594914022339.6184050859777
95135.8189.037375794302646.7726242056974
96116.0789.6228288305126.4471711694900
97101.4284.956469379512416.4635306204876
9875.7369.65269576098256.07730423901748
9955.4862.536502024861-7.05650202486107
10043.859.8251804118715-16.0251804118715
10145.2959.9791841698402-14.6891841698402
10244.0156.3605591868403-12.3505591868403
10347.4856.9527323065634-9.4727323065634
10451.0763.1530969697052-12.0830969697052
10557.8468.2721370025602-10.4321370025602
10669.0472.427154104264-3.38715410426402
10765.6174.4390757448591-8.82907574485912
10872.8778.6071897248704-5.73718972487035
10968.4178.9263337281998-10.5163337281998
11073.2579.4899239641293-6.23992396412933
11177.4379.3597386503597-1.92973865035973


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
180.00892928577997150.0178585715599430.991070714220029
190.003049702463368400.006099404926736790.996950297536632
200.001210478934399220.002420957868798440.9987895210656
210.0002650807122895850.000530161424579170.99973491928771
220.0001073380174437660.0002146760348875320.999892661982556
230.0001211417026872010.0002422834053744030.999878858297313
245.85644218498711e-050.0001171288436997420.99994143557815
253.12109074298041e-056.24218148596083e-050.99996878909257
261.88815187929852e-053.77630375859705e-050.999981118481207
275.98614926523927e-061.19722985304785e-050.999994013850735
287.0467352895457e-061.40934705790914e-050.99999295326471
291.19633399265786e-052.39266798531572e-050.999988036660073
301.29866254156402e-052.59732508312803e-050.999987013374584
315.56529028532856e-061.11305805706571e-050.999994434709715
321.73052282468474e-063.46104564936948e-060.999998269477175
335.17104257624557e-071.03420851524911e-060.999999482895742
341.87370558489981e-073.74741116979963e-070.999999812629441
359.45482283772267e-081.89096456754453e-070.999999905451772
364.26122856362063e-088.52245712724127e-080.999999957387714
371.22088889440564e-082.44177778881128e-080.99999998779111
384.25082423144342e-098.50164846288685e-090.999999995749176
391.46108180457159e-092.92216360914319e-090.999999998538918
405.67806227570994e-101.13561245514199e-090.999999999432194
411.96785414615179e-103.93570829230358e-100.999999999803215
425.52711938328375e-111.10542387665675e-100.999999999944729
431.97517558534990e-113.95035117069979e-110.999999999980248
449.36512987035085e-121.87302597407017e-110.999999999990635
458.35756007045417e-121.67151201409083e-110.999999999991642
465.95070500939431e-121.19014100187886e-110.99999999999405
475.46016315808192e-121.09203263161638e-110.99999999999454
489.31237055766658e-121.86247411153332e-110.999999999990688
496.5031511772535e-121.3006302354507e-110.999999999993497
503.85629514230069e-117.71259028460139e-110.999999999961437
513.68286676871447e-117.36573353742895e-110.999999999963171
521.42732511269439e-112.85465022538879e-110.999999999985727
538.98315462060916e-121.79663092412183e-110.999999999991017
544.86262833871509e-129.72525667743019e-120.999999999995137
551.27819819187019e-112.55639638374037e-110.999999999987218
564.18779569824077e-118.37559139648155e-110.999999999958122
574.51134016959788e-119.02268033919577e-110.999999999954887
581.23343867762668e-102.46687735525337e-100.999999999876656
592.40075316809323e-104.80150633618647e-100.999999999759925
608.02400298799177e-101.60480059759835e-090.9999999991976
619.41239854073834e-101.88247970814767e-090.99999999905876
625.09833019781512e-101.01966603956302e-090.999999999490167
632.24449658746475e-104.4889931749295e-100.99999999977555
641.38669244190789e-102.77338488381578e-100.99999999986133
651.92785980373221e-103.85571960746442e-100.999999999807214
661.24069391204693e-102.48138782409387e-100.99999999987593
675.42249872131889e-111.08449974426378e-100.999999999945775
684.40236905780247e-118.80473811560495e-110.999999999955976
694.69239881400671e-119.38479762801341e-110.999999999953076
703.6422040868204e-117.2844081736408e-110.999999999963578
714.70369852615475e-119.4073970523095e-110.999999999952963
725.56743226945559e-111.11348645389112e-100.999999999944326
735.10246624400561e-111.02049324880112e-100.999999999948975
747.74919495364524e-111.54983899072905e-100.999999999922508
757.21765906144348e-111.44353181228870e-100.999999999927823
768.79820890507566e-111.75964178101513e-100.999999999912018
771.29950100750796e-102.59900201501593e-100.99999999987005
781.10513614118723e-102.21027228237446e-100.999999999889486
796.12815310524155e-111.22563062104831e-100.999999999938718
803.79126419666595e-117.58252839333189e-110.999999999962087
811.86097054790063e-113.72194109580126e-110.99999999998139
826.26878316441579e-121.25375663288316e-110.999999999993731
835.05768323440502e-101.01153664688100e-090.999999999494232
842.21293587080508e-084.42587174161016e-080.99999997787064
851.24748046718671e-062.49496093437341e-060.999998752519533
860.001031972321211320.002063944642422640.998968027678789
870.02076385906075890.04152771812151780.97923614093924
880.0339625144310070.0679250288620140.966037485568993
890.03678594052629610.07357188105259210.963214059473704
900.06287195540037690.1257439108007540.937128044599623
910.154148529090210.308297058180420.84585147090979
920.3444637120891480.6889274241782960.655536287910852
930.5590308368512190.8819383262975620.440969163148781


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level680.894736842105263NOK
5% type I error level700.921052631578947NOK
10% type I error level720.947368421052632NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/10vwln1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/10vwln1262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/1nwrg1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/1nwrg1262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/2uxy91262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/2uxy91262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/3z56g1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/3z56g1262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/457371262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/457371262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/5ig3y1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/5ig3y1262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/6pfqn1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/6pfqn1262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/7w3af1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/7w3af1262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/8myd91262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/8myd91262263265.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/9jixf1262263265.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262263345vcd0akdw0fd0ctt/9jixf1262263265.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)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
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))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
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')
qqline(mysum$resid)
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()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
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')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.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