Home » date » 2009 » Dec » 31 »

multiple regression: olieprijs en dowjones (seizoenaliteit + lineaire trend)

*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:47:19 -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/t1262260109g1bwp2060hkqu9y.htm/, Retrieved Thu, 31 Dec 2009 12:48:41 +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/t1262260109g1bwp2060hkqu9y.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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
olieprijs[t] = -48.6979731359204 + 0.0070117197906449dowjones[t] -1.73792160184585M1[t] -3.42350501392251M2[t] -6.8636609608159M3[t] -10.1170751860686M4[t] -9.07662581132669M5[t] -8.08630606239669M6[t] -4.7462916723035M7[t] -4.60618584590421M8[t] -2.97025370798178M9[t] -0.815979678872401M10[t] + 1.47789919681228M11[t] + 0.55432711653647t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-48.69797313592049.563524-5.09212e-061e-06
dowjones0.00701171979064490.000858.246500
M1-1.737921601845855.870899-0.2960.7678450.383923
M2-3.423505013922515.871413-0.58310.5611920.280596
M3-6.86366096081595.868961-1.16950.2450740.122537
M4-10.11707518606866.030358-1.67770.0966270.048314
M5-9.076625811326696.026867-1.5060.135310.067655
M6-8.086306062396696.024562-1.34220.1826570.091328
M7-4.74629167230356.024539-0.78780.4327190.21636
M8-4.606185845904216.022221-0.76490.4462090.223104
M9-2.970253707981786.023589-0.49310.6230540.311527
M10-0.8159796788724016.021978-0.13550.8924970.446249
M111.477899196812286.0205940.24550.8066080.403304
t0.554327116536470.03944314.053800


Multiple Linear Regression - Regression Statistics
Multiple R0.890326724573104
R-squared0.792681676489072
Adjusted R-squared0.764896746534
F-TEST (value)28.5291947026971
F-TEST (DF numerator)13
F-TEST (DF denominator)97
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation12.7709054395382
Sum Squared Residuals15820.3144973258


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.6827.02206351899055.65793648100946
231.5422.14437522211099.3956247778891
332.4320.886807961537611.5431920384624
426.5418.19424175222678.34575824777331
525.8519.90141611174915.9485838882509
627.622.10853026303575.49146973696429
725.7120.92203937496834.78796062503172
825.3822.74795354052042.63204645947958
928.5727.27206372729541.29793627270456
1027.6431.5259076804036-3.88590768040363
1125.3632.1114316961837-6.75143169618366
1225.930.2775981526863-4.37759815268633
1326.2920.17425468730176.11574531269826
1421.7420.29241674125661.44758325874341
1519.220.9200905807939-1.72009058079394
1619.3220.0208418251383-0.700841825138296
1719.8221.2319370094726-1.41193700947263
1820.3622.5574676314814-2.19746763148144
1924.3130.7178796931353-6.40787969313527
2025.9729.1571331998059-3.18713319980592
2125.6130.6541437185638-5.04414371856375
2224.6729.2395731585188-4.56957315851878
2325.5925.9458632001245-0.355863200124529
2426.0925.50546873062200.584531269377953
2528.3720.64261451956767.72738548043242
2627.3418.72204892719458.61795107280552
2724.4619.99494122186704.46505877813303
2827.4616.492451259538610.9675487404614
2930.2317.719673399391412.5103266006086
3032.3315.351219684094816.9787803159052
3129.8719.67685207504710.1931479249530
3224.8722.87411839725351.99588160274654
3325.4827.0891519756569-1.60915197565690
3427.2833.1260061543282-5.84600615432817
3528.2436.3690420879605-8.12904208796053
3629.5836.3597281511869-6.7797281511869
3726.9536.6328885695819-9.6828885695819
3829.0836.8328773934935-7.75287739349355
3928.7634.5063734508364-5.7463734508364
4029.5934.3491048834268-4.75910488342678
4130.738.8566900101349-8.15669001013491
4230.5240.8329783459135-10.3129783459135
4332.6742.7789031571187-10.1089031571187
4433.1944.1371356126349-10.9471356126349
4537.1344.0455007784263-6.91550077842627
4635.5448.660939121138-13.1209391211380
4737.7550.0169109075141-12.2669109075141
4841.8448.2569107734123-6.41691077341226
4942.9448.2778596309378-5.33785963093778
5049.1445.72329433509463.41670566490543
5144.6145.7133223768707-1.10332237687068
5240.2244.8487115169808-4.62871151698081
5344.2345.5048290798856-1.27482907988561
5445.8548.3415255511742-2.49152555117422
5553.3851.94333810813821.43666189186183
5653.2649.84100637817943.41899362182060
5751.852.690297175761-0.89029717576102
5855.356.1664011696909-0.86640116969086
5957.8159.4264755824145-1.61647558241448
6063.9658.56523769107755.39476230892249
6163.7757.22927853471746.54072146528258
6259.1554.63797182717124.51202817282878
6356.1254.35307033595611.76692966404385
6457.4252.58345680268774.83654319731226
6563.5254.49144681701439.02855318298573
6661.7156.72822054301534.98177945698469
6763.0161.84582668432091.16417331567912
6868.1863.16451304021775.01548695978226
6972.0366.05033489790865.97966510209137
7069.7566.4036292486793.34637075132105
7174.4169.5247313751524.885268624848
7274.3370.14696303992184.18303696007824
7364.2470.9002860295801-6.66028602958013
7460.0372.7807737357156-12.7507737357156
7559.4471.4517570504756-12.0117570504756
7662.570.1022156498648-7.60221564986477
7755.0472.6454674772237-17.6054674772237
7858.3475.0216341926628-16.6816341926628
7961.9276.3710720012779-14.4510720012779
8067.6580.4750939268105-12.8250939268105
8167.6887.243655618571-19.563655618571
8270.390.460325980247-20.1603259802470
8375.2694.662284712448-19.4022847124480
8471.4490.6986412825422-19.2586412825422
8576.3691.7446334562621-15.3846334562621
8681.7193.0225339635896-11.3125339635896
8792.685.22359307592787.37640692407218
8890.683.97165481480276.62834518519726
8992.2379.474298565979312.7557014340207
9094.0980.187706050264813.9022939497352
91102.7982.499572517343920.2904274826562
92109.6586.438678793400523.2113212065995
93124.0589.721714577231534.3282854227685
94132.6987.1307877879145.55921221209
95135.8184.830358055058550.9796419449415
96116.0785.367818027559430.7021819724406
97101.4281.26265025708220.1573497429180
9875.7366.58229722408919.1477027759109
9955.4859.7195611628742-4.23956116287422
10043.856.8873214953336-13.0873214953336
10145.2957.084241529149-11.7942415291490
10244.0153.6807177383574-9.67071773835743
10347.4854.3845163886499-6.90451638864992
10451.0760.3843671111771-9.31436711117714
10557.8465.4231375305855-7.58313753058552
10669.0469.4964296990846-0.456429699084604
10765.6172.9529023831442-7.34290238314422
10872.8776.9016341509917-4.03163415099168
10968.4177.5434707959788-9.13347079597883
11073.2577.9714106302843-4.72141063028433
11177.4377.7604827828605-0.330482782860549


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.007480271147771570.01496054229554310.992519728852228
180.001172863623008050.002345727246016100.998827136376992
190.0004227642803583120.0008455285607166250.999577235719642
200.0001748836771741510.0003497673543483020.999825116322826
213.44347882798642e-056.88695765597284e-050.99996556521172
221.37833369746501e-052.75666739493002e-050.999986216663025
231.7705925185213e-053.5411850370426e-050.999982294074815
248.4900684745096e-061.69801369490192e-050.999991509931526
254.60809323565757e-069.21618647131514e-060.999995391906764
262.87900832969180e-065.75801665938359e-060.99999712099167
278.77472223482334e-071.75494444696467e-060.999999122527776
281.14399247489017e-062.28798494978034e-060.999998856007525
292.22392175306121e-064.44784350612242e-060.999997776078247
302.68677828932563e-065.37355657865125e-060.99999731322171
311.17773898249539e-062.35547796499079e-060.999998822261017
323.58172832224542e-077.16345664449084e-070.999999641827168
331.03027761958555e-072.06055523917111e-070.999999896972238
343.5115035498484e-087.0230070996968e-080.999999964884964
351.69922453518528e-083.39844907037057e-080.999999983007755
367.3325498653776e-091.46650997307552e-080.99999999266745
371.95668424511597e-093.91336849023194e-090.999999998043316
386.47345202154582e-101.29469040430916e-090.999999999352655
392.13199764205663e-104.26399528411327e-100.9999999997868
408.0940413291743e-111.61880826583486e-100.99999999991906
412.61490466442464e-115.22980932884928e-110.99999999997385
426.5888666333416e-121.31777332666832e-110.999999999993411
432.05462938480733e-124.10925876961467e-120.999999999997945
448.1063920801105e-131.6212784160221e-120.99999999999919
456.33514549189135e-131.26702909837827e-120.999999999999367
463.04477836346505e-136.0895567269301e-130.999999999999696
472.15258131735338e-134.30516263470677e-130.999999999999785
483.16777760324955e-136.3355552064991e-130.999999999999683
491.93750167211857e-133.87500334423714e-130.999999999999806
501.33109026240231e-122.66218052480461e-120.999999999998669
511.2171285881172e-122.4342571762344e-120.999999999998783
524.12507100121560e-138.25014200243119e-130.999999999999587
532.43374841701112e-134.86749683402224e-130.999999999999757
541.18815604551350e-132.37631209102701e-130.999999999999881
553.17623350286591e-136.35246700573181e-130.999999999999682
561.08984283062346e-122.17968566124691e-120.99999999999891
579.6049646407843e-131.92099292815686e-120.99999999999904
581.86282926813895e-123.72565853627789e-120.999999999998137
593.10299089673166e-126.20598179346332e-120.999999999996897
601.13246084396079e-112.26492168792159e-110.999999999988675
611.53375767526321e-113.06751535052642e-110.999999999984662
629.50255529793055e-121.90051105958611e-110.999999999990497
634.37277533661982e-128.74555067323964e-120.999999999995627
643.06596046164466e-126.13192092328932e-120.999999999996934
655.43046032634346e-121.08609206526869e-110.99999999999457
664.07954425146939e-128.15908850293877e-120.99999999999592
671.86171900402458e-123.72343800804915e-120.999999999998138
681.83466651513025e-123.6693330302605e-120.999999999998165
692.61853916250356e-125.23707832500713e-120.999999999997381
702.45967080070759e-124.91934160141519e-120.99999999999754
713.36784700134852e-126.73569400269705e-120.999999999996632
724.19054072309947e-128.38108144619894e-120.99999999999581
733.97358753717037e-127.94717507434075e-120.999999999996026
745.75682874275299e-121.15136574855060e-110.999999999994243
754.58141141670885e-129.1628228334177e-120.999999999995419
762.62868663773777e-125.25737327547554e-120.999999999997371
773.15864417049744e-126.31728834099489e-120.999999999996841
782.42015839886178e-124.84031679772355e-120.99999999999758
791.24885595339557e-122.49771190679114e-120.999999999998751
804.67668385176018e-139.35336770352037e-130.999999999999532
816.77820197227502e-131.35564039445500e-120.999999999999322
827.79957618070229e-121.55991523614046e-110.9999999999922
836.97666569229903e-101.39533313845981e-090.999999999302333
843.68472948182127e-087.36945896364253e-080.999999963152705
852.16892253999585e-064.3378450799917e-060.99999783107746
860.001614249981330870.003228499962661730.99838575001867
870.03014693415780510.06029386831561010.969853065842195
880.05343730349413950.1068746069882790.94656269650586
890.0683114281824640.1366228563649280.931688571817536
900.1292418010305990.2584836020611980.8707581989694
910.3092525995967360.6185051991934720.690747400403264
920.5869192711673880.8261614576652250.413080728832612
930.8070506679645220.3858986640709550.192949332035478
940.8306738354944710.3386523290110580.169326164505529


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level690.884615384615385NOK
5% type I error level700.897435897435897NOK
10% type I error level710.91025641025641NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262260109g1bwp2060hkqu9y/103pnn1262260031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262260109g1bwp2060hkqu9y/103pnn1262260031.ps (open in new window)


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


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


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2009/Dec/31/t1262260109g1bwp2060hkqu9y/9ghdt1262260031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t1262260109g1bwp2060hkqu9y/9ghdt1262260031.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