Home » date » 2009 » Dec » 31 »

multiple regression: olieprijs en dowjones (seizoenaliteit)

*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 04:22:21 -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/t12622585994bmqtl775ic03am.htm/, Retrieved Thu, 31 Dec 2009 12:23:30 +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/t12622585994bmqtl775ic03am.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 31,54 10433,56 32,43 10665,78 26,54 10666,71 25,85 10682,74 27,6 10777,22 25,71 10052,6 25,38 10213,97 28,57 10546,82 27,64 10767,2 25,36 10444,5 25,9 10314,68 26,29 9042,56 21,74 9220,75 19,2 9721,84 19,32 9978,53 19,82 9923,81 20,36 9892,56 24,31 10500,98 25,97 10179,35 25,61 10080,48 24,67 9492,44 25,59 8616,49 26,09 8685,4 28,37 8160,67 27,34 8048,1 24,46 8641,21 27,46 8526,63 30,23 8474,21 32,33 7916,13 29,87 7977,64 24,87 8334,59 25,48 8623,36 27,28 9098,03 28,24 9154,34 29,58 9284,73 26,95 9492,49 29,08 9682,35 28,76 9762,12 29,59 10124,63 30,7 10540,05 30,52 10601,61 32,67 10323,73 33,19 10418,4 37,13 10092,96 35,54 10364,91 37,75 10152,09 41,84 10032,8 42,94 10204,59 49,14 10001,6 44,61 10411,75 40,22 10673,38 44,23 10539,51 45,85 10723,78 53,38 10682,06 53,26 10283,19 51,8 10377,18 55,3 10486,64 57,81 10545,38 63,96 10554,27 63,77 10532,54 59,15 10324,31 56,12 10695,25 57,42 10827,81 63,52 10872,48 61,71 10971,19 63,01 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] = -49.8426019672413 + 0.0102961593115195dowjones[t] -4.34264379276595M1[t] -4.93955133821554M2[t] -8.32557403208548M3[t] -14.8814206512382M4[t] -13.0319796676429M5[t] -11.1749570581006M6[t] -6.8268154910034M7[t] -6.74810182753702M8[t] -5.14376833671593M9[t] -2.31247147870193M10[t] + 1.16049694980275M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-49.842601967241316.578231-3.00650.0033570.001678
dowjones0.01029615931151950.0014177.265100
M1-4.3426437927659510.172416-0.42690.6703860.335193
M2-4.9395513382155410.17666-0.48540.628490.314245
M3-8.3255740320854810.172531-0.81840.4150930.207547
M4-14.881420651238210.437386-1.42580.1571090.078555
M5-13.031979667642910.436467-1.24870.2147510.107375
M6-11.174957058100610.436919-1.07070.2869280.143464
M7-6.826815491003410.440676-0.65390.5147290.257364
M8-6.7481018275370210.436467-0.64660.519410.259705
M9-5.1437683367159310.438741-0.49280.6232860.311643
M10-2.3124714787019310.437758-0.22150.8251260.412563
M111.1604969498027510.4369170.11120.9116920.455846


Multiple Linear Regression - Regression Statistics
Multiple R0.608724910362937
R-squared0.370546016496366
Adjusted R-squared0.293470018516329
F-TEST (value)4.80754094928929
F-TEST (DF numerator)12
F-TEST (DF denominator)98
p-value3.72218862221274e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation22.1389830396430
Sum Squared Residuals48033.1878629007


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.6858.7416910680282-26.0616910680282
231.5452.6434426408408-21.1034426408408
332.4351.648394062292-19.218394062292
426.5445.1021228712989-18.5621228712989
525.8547.1166112886579-21.2666112886579
627.649.9464150299526-22.3464150299526
725.7146.8337536367365-21.1237536367365
825.3848.5739585283028-23.1939585283028
928.5753.6053686459632-25.0353686459632
1027.6458.7057330930499-31.0657330930499
1125.3658.8561309117271-33.4961309117271
1225.956.3589865601029-30.4589865601029
1326.2938.9183925839667-12.6283925839668
1421.7440.1561576662368-18.4161576662368
1519.241.9294374417762-22.7294374417762
1619.3238.0165119562974-18.6965119562974
1719.8239.3025471023664-19.4825471023664
1820.3640.8378147334238-20.4778147334238
1924.3151.4503455488356-27.1403455488356
2025.9748.217505492938-22.247505492938
2125.6148.8038577126291-23.1938577126291
2224.6745.5806010490972-20.9106010490972
2325.5940.0346487286764-14.4446487286764
2426.0939.5836601170304-13.4936601170304
2528.3729.8383126487308-1.46831264873081
2627.3428.0823664495835-0.742366449583471
2724.4630.8030988049689-6.34309880496888
2827.4623.06751825190224.39248174809779
2930.2324.37723456438775.85276543561234
3032.3320.488176585357211.8418234146428
3129.8725.46963491170604.40036508829404
3224.8729.2235626414192-4.35356264141923
3325.4833.8011180566278-8.32111805662783
3427.2841.5196928550408-14.2396928550408
3528.2445.5724380143771-17.3324380143771
3629.5845.7544572772034-16.1744572772034
3726.9543.5509435429987-16.6009435429987
3829.0844.9088648044343-15.8288648044343
3928.7642.3441667388443-13.5841667388442
4029.5939.5207808317104-9.93078083171041
4130.745.6474523164972-14.9474523164972
4230.5248.1383064932567-17.6183064932567
4332.6749.6253513108688-16.9553513108688
4433.1950.6788023763567-17.4888023763567
4537.1348.9323537808369-11.8023537808369
4635.5454.5636911636186-19.0236911636186
4737.7555.8454309674457-18.0954309674457
4841.8453.4567051733718-11.6167051733718
4942.9450.8828385887318-7.94283858873181
5049.1448.19591366463690.944086335363133
5144.6149.0328607123867-4.42286071238667
5240.2245.1707982539068-4.95079825390676
5344.2345.641892390469-1.41189239046896
5445.8549.396188276345-3.54618827634502
5553.3853.31477407696560.0652259230344052
5653.2649.28665867584623.97334132415381
5751.851.858728180357-0.0587281803570034
5855.355.8170426366099-0.517042636609913
5957.8159.8948074630732-2.08480746307324
6063.9658.82584336954995.13415663045009
6163.7754.25946403494469.51053596505536
6259.1551.51858723605737.63141276394267
6356.1251.95182187720254.16817812279754
6457.4246.760834136384710.6591658636153
6563.5249.070204556425614.4497954435744
6661.7151.94356105160819.76643894839193
6763.0158.08797057219294.92202942780706
6868.1859.08335129916399.09664870083611
6972.0361.709063793687710.3209362063123
7069.7561.08177777736928.66822222263082
7174.4164.95547272627829.45452727372178
7274.3366.0648670582938.26513294170693
7364.2464.5664343137413-0.326434313741267
7460.0368.3920360773687-8.36203607736866
7559.4467.2920696354354-7.8520696354354
7662.562.7179247989708-0.217924798970818
7755.0465.9601272526353-10.9201272526353
7858.3469.0381713949308-10.6981713949308
7961.9269.649321939912-7.729321939912
8067.6574.734748991791-7.08474899179095
8167.6883.0619597050687-15.3819597050687
8270.386.6393162667954-16.3393162667954
8375.2692.1001641735752-16.8401641735752
8471.4486.4755614310769-15.0355614310769
8576.3685.406890376188-9.04689037618794
8681.7188.3476402085833-6.63764020858335
8792.677.747098685131714.8529013148683
8890.673.316276386283417.2837236137166
8992.2366.21989935206526.010100647935
9094.0966.856312275226727.2336877247733
91102.7968.88071364730733.9092863526930
92109.6573.723975032179135.9260249678209
93124.0576.932964951700547.1170350482995
94132.6971.98232164047560.7076783595251
95135.8167.894923248123967.9150767518761
96116.0768.879837014062547.1901629859375
97101.4260.247092520965741.1729074790343
9875.7339.754401529901435.9755984700986
9955.4830.528603197723824.9513968022762
10043.823.777232513245320.0227674867547
10145.2923.574031176496021.7159688235040
10244.0118.165054159899125.8449458401009
10347.4817.828134355475529.6518656445245
10451.0725.697436962003125.3725630379969
10557.8431.48458517312926.3554148268710
10669.0436.319823517944132.7201764820559
10765.6140.685983766723124.9240162332769
10872.8746.68008199930926.189918000691
10968.4145.017940321704123.3920596782959
11073.2546.71058972235726.5394102776429
11177.4347.252448844238730.1775511557613


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.0091465805807840.0182931611615680.990853419419216
170.001470907163147270.002941814326294530.998529092836853
180.0002237790135076750.0004475580270153510.999776220986492
195.17522555199527e-050.0001035045110399050.99994824774448
207.4878383174848e-061.49756766349696e-050.999992512161683
211.02718357881265e-062.05436715762530e-060.999998972816421
222.86881719374637e-075.73763438749275e-070.99999971311828
233.76766971186365e-077.5353394237273e-070.999999623233029
241.49135874604782e-072.98271749209564e-070.999999850864125
254.37063875370267e-088.74127750740534e-080.999999956293612
261.46102698918223e-082.92205397836447e-080.99999998538973
272.75392036014266e-095.50784072028532e-090.99999999724608
281.99928677593953e-093.99857355187906e-090.999999998000713
292.29534387482782e-094.59068774965564e-090.999999997704656
302.06488434914065e-094.1297686982813e-090.999999997935116
315.86145432788705e-101.17229086557741e-090.999999999413855
321.22215994126409e-102.44431988252818e-100.999999999877784
332.72584230868039e-115.45168461736079e-110.999999999972742
346.37914363254206e-121.27582872650841e-110.999999999993621
351.7915220680742e-123.5830441361484e-120.999999999998209
365.51489660238175e-131.10297932047635e-120.999999999999448
371.48981144024938e-132.97962288049876e-130.999999999999851
383.98664929197189e-147.97329858394377e-140.99999999999996
391.23246742230505e-142.46493484461009e-140.999999999999988
405.00169032166593e-151.00033806433319e-140.999999999999995
412.36975764844997e-154.73951529689994e-150.999999999999998
428.24736793413432e-161.64947358682686e-151
435.15921121359214e-161.03184224271843e-151
445.84082464650501e-161.16816492930100e-151
451.68245874868614e-153.36491749737227e-150.999999999999998
463.35104844684771e-156.70209689369542e-150.999999999999997
471.32826217200103e-142.65652434400207e-140.999999999999987
481.08996296221433e-132.17992592442866e-130.99999999999989
494.9713656953593e-139.9427313907186e-130.999999999999503
501.65285712705091e-113.30571425410183e-110.999999999983471
518.43136769751747e-111.68627353950349e-100.999999999915686
521.25287910204287e-102.50575820408574e-100.999999999874712
533.16050169364343e-106.32100338728686e-100.99999999968395
546.6654936618818e-101.33309873237636e-090.99999999933345
554.52645690657123e-099.05291381314245e-090.999999995473543
563.01320976029855e-086.0264195205971e-080.999999969867902
579.26249992141092e-081.85249998428218e-070.999999907375
584.74441544599144e-079.48883089198287e-070.999999525558455
592.03825563042264e-064.07651126084528e-060.99999796174437
608.30752845583898e-061.66150569116780e-050.999991692471544
612.15488555583156e-054.30977111166312e-050.999978451144442
623.06074466501355e-056.1214893300271e-050.99996939255335
633.90277850860826e-057.80555701721652e-050.999960972214914
645.10374101524801e-050.0001020748203049600.999948962589847
658.43531007311745e-050.0001687062014623490.999915646899269
669.54476588364232e-050.0001908953176728460.999904552341164
679.40644078988214e-050.0001881288157976430.999905935592101
680.0001112843061373040.0002225686122746080.999888715693863
690.0001397142965518110.0002794285931036210.999860285703448
700.0002027811996627150.0004055623993254290.999797218800337
710.0002726671799959010.0005453343599918020.999727332820004
720.0002510031149692310.0005020062299384620.999748996885031
730.0001798642494371910.0003597284988743830.999820135750563
740.0001326292377010120.0002652584754020240.999867370762299
750.0001030867175185900.0002061734350371810.999896913282481
765.98522847328151e-050.0001197045694656300.999940147715267
774.78440068045732e-059.56880136091463e-050.999952155993195
783.8634060779582e-057.7268121559164e-050.99996136593922
793.49334207327396e-056.98668414654791e-050.999965066579267
803.15437531152028e-056.30875062304056e-050.999968456246885
816.97011940333018e-050.0001394023880666040.999930298805967
820.000476799368992490.000953598737984980.999523200631008
830.005618803929078510.01123760785815700.994381196070921
840.03831033601707970.07662067203415940.96168966398292
850.1388887895239460.2777775790478920.861111210476054
860.5228647991369310.9542704017261390.477135200863069
870.6484099222787320.7031801554425370.351590077721268
880.6737933888947530.6524132222104930.326206611105247
890.6603324860222940.6793350279554120.339667513977706
900.7094717473432820.5810565053134350.290528252656718
910.8067229590241570.3865540819516870.193277040975843
920.878257359049260.2434852819014820.121742640950741
930.9140324733247770.1719350533504450.0859675266752226
940.890983713886740.2180325722265200.109016286113260
950.926642245394790.1467155092104210.0733577546052104


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level660.825NOK
5% type I error level680.85NOK
10% type I error level690.8625NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/31/t12622585994bmqtl775ic03am/10l2mt1262258533.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t12622585994bmqtl775ic03am/10l2mt1262258533.ps (open in new window)


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


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


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


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


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


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


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


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


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


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No 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