Home » date » 2008 » Nov » 27 »

multiple regression Q3

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 27 Nov 2008 07:10:07 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov.htm/, Retrieved Thu, 27 Nov 2008 14:14:02 +0000
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov.htm/},
    year = {2008},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:
2008-11-27 13:41:43 [a2386b643d711541400692649981f2dc] [reply
test

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
540 0 522 0 526 0 527 0 516 0 503 0 489 0 479 0 475 0 524 0 552 0 532 0 511 0 492 0 492 0 493 0 481 0 462 0 457 0 442 0 439 0 488 0 521 0 501 0 485 0 464 0 460 0 467 0 460 0 448 0 443 0 436 0 431 0 484 0 510 0 513 0 503 0 471 0 471 0 476 0 475 0 470 0 461 0 455 0 456 1 517 1 525 1 523 1 519 1 509 1 512 1 519 1 517 1 510 1 509 1 501 1 507 1 569 1 580 1 578 1 565 1 547 1 555 1 562 1 561 1 555 1 544 1 537 1 543 1 594 1 611 1 613 1 611 1 594 1 595 1 591 1 589 1 584 1 573 1 567 1 569 1 621 1 629 1 628 1 612 1 595 1 597 1 593 1 590 1 580 1 574 1 573 1 573 1 620 1 626 1 620 1 588 1 566 1 557 1 561 1 549 1 532 1 526 1 511 1 499 1 555 1 565 1 542 1 527 1 510 1 514 1 517 1 508 1 493 1 490 1 469 1 478 1 528 1 534 1 518 1 506 1
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
X[t] = + 517.321472019465 + 84.0926022477117Y[t] -10.4627657352109M1[t] -24.3280569862687M2[t] -23.1343252651647M3[t] -20.1405935440607M4[t] -25.8468618229567M5[t] -36.4531301018527M6[t] -43.2593983807487M7[t] -52.5656666596448M8[t] -60.6811951633119M9[t] -7.38746344220796M10[t] + 8.20626827889602M11[t] -0.293731721103984t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)517.32147201946512.09016142.788600
Y84.092602247711711.5083827.307100
M1-10.462765735210914.651775-0.71410.4767230.238362
M2-24.328056986268715.016191-1.62010.108150.054075
M3-23.134325265164715.010436-1.54120.1262160.063108
M4-20.140593544060715.00635-1.34210.1823920.091196
M5-25.846861822956715.003935-1.72270.0878370.043918
M6-36.453130101852715.003191-2.42970.0167760.008388
M7-43.259398380748715.004119-2.88320.004760.00238
M8-52.565666659644815.006718-3.50280.0006730.000337
M9-60.681195163311914.997216-4.04629.9e-054.9e-05
M10-7.3874634422079614.993034-0.49270.6232160.311608
M118.2062682788960214.9905250.54740.5852230.292612
t-0.2937317211039840.158366-1.85480.0663830.033191


Multiple Linear Regression - Regression Statistics
Multiple R0.775370732714189
R-squared0.601199773149738
Adjusted R-squared0.552747409139894
F-TEST (value)12.4080586249121
F-TEST (DF numerator)13
F-TEST (DF denominator)107
p-value4.44089209850063e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation33.5179620946964
Sum Squared Residuals120209.554779021


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1540506.56497456314933.4350254368507
2522492.40595159098829.594048409012
3526493.30595159098832.6940484090119
4527496.00595159098830.9940484090119
5516490.00595159098825.9940484090119
6503479.10595159098823.8940484090119
7489472.00595159098816.9940484090119
8479462.40595159098816.5940484090119
9475453.99669136621721.0033086337831
10524506.99669136621717.0033086337831
11552522.29669136621729.7033086337831
12532513.79669136621718.2033086337831
13511503.0401939099027.95980609009801
14492488.881170937743.11882906225970
15492489.781170937742.21882906225971
16493492.481170937740.518829062259712
17481486.48117093774-5.48117093774029
18462475.58117093774-13.5811709377403
19457468.48117093774-11.4811709377403
20442458.88117093774-16.8811709377403
21439450.471910712969-11.4719107129691
22488503.471910712969-15.4719107129691
23521518.7719107129692.22808928703088
24501510.271910712969-9.2719107129691
25485499.515413256654-14.5154132566542
26464485.356390284492-21.3563902844925
27460486.256390284492-26.2563902844925
28467488.956390284492-21.9563902844925
29460482.956390284492-22.9563902844925
30448472.056390284492-24.0563902844925
31443464.956390284492-21.9563902844925
32436455.356390284492-19.3563902844925
33431446.947130059721-15.9471300597213
34484499.947130059721-15.9471300597213
35510515.247130059721-5.2471300597213
36513506.7471300597216.2528699402787
37503495.9906326034067.00936739659362
38471481.831609631245-10.8316096312447
39471482.731609631245-11.7316096312447
40476485.431609631245-9.43160963124468
41475479.431609631245-4.43160963124468
42470468.5316096312451.46839036875533
43461461.431609631245-0.431609631244671
44455451.8316096312453.16839036875533
45456527.514951654185-71.5149516541852
46517580.514951654185-63.5149516541852
47525595.814951654185-70.8149516541852
48523587.314951654185-64.3149516541852
49519576.55845419787-57.5584541978703
50509562.399431225709-53.3994312257086
51512563.299431225709-51.2994312257086
52519565.999431225709-46.9994312257086
53517559.999431225709-42.9994312257086
54510549.099431225709-39.0994312257086
55509541.999431225709-32.9994312257086
56501532.399431225709-31.3994312257086
57507523.990171000937-16.9901710009374
58569576.990171000937-7.99017100093741
59580592.290171000937-12.2901710009374
60578583.790171000937-5.79017100093741
61565573.033673544623-8.03367354462249
62547558.874650572461-11.8746505724608
63555559.774650572461-4.77465057246079
64562562.474650572461-0.474650572460784
65561556.4746505724614.52534942753921
66555545.5746505724619.42534942753921
67544538.4746505724615.52534942753922
68537528.8746505724618.12534942753922
69543520.4653903476922.5346096523104
70594573.4653903476920.5346096523104
71611588.7653903476922.2346096523104
72613580.2653903476932.7346096523104
73611569.50889289137541.4911071086253
74594555.34986991921338.650130080787
75595556.24986991921338.750130080787
76591558.94986991921332.050130080787
77589552.94986991921336.050130080787
78584542.04986991921341.950130080787
79573534.94986991921338.050130080787
80567525.34986991921341.650130080787
81569516.94060969444252.0593903055582
82621569.94060969444251.0593903055582
83629585.24060969444243.7593903055582
84628576.74060969444251.2593903055582
85612565.98411223812746.0158877618731
86595551.82508926596543.1749107340348
87597552.72508926596544.2749107340348
88593555.42508926596537.5749107340348
89590549.42508926596540.5749107340348
90580538.52508926596541.4749107340348
91574531.42508926596542.5749107340348
92573521.82508926596551.1749107340348
93573513.41582904119459.584170958806
94620566.41582904119453.584170958806
95626581.71582904119444.284170958806
96620573.21582904119446.784170958806
97588562.45933158487925.5406684151209
98566548.30030861271717.6996913872826
99557549.2003086127177.79969138728264
100561551.9003086127179.09969138728264
101549545.9003086127173.09969138728263
102532535.000308612717-3.00030861271737
103526527.900308612717-1.90030861271737
104511518.300308612717-7.30030861271736
105499509.891048387946-10.8910483879462
106555562.891048387946-7.89104838794618
107565578.191048387946-13.1910483879462
108542569.691048387946-27.6910483879462
109527558.934550931631-31.9345509316313
110510544.77552795947-34.7755279594696
111514545.67552795947-31.6755279594696
112517548.37552795947-31.3755279594696
113508542.37552795947-34.3755279594696
114493531.47552795947-38.4755279594696
115490524.37552795947-34.3755279594696
116469514.77552795947-45.7755279594696
117478506.366267734698-28.3662677346984
118528559.366267734698-31.3662677346984
119534574.666267734698-40.6662677346984
120518566.166267734698-48.1662677346984
121506555.409770278383-49.4097702783835


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.0003621256288653810.0007242512577307620.999637874371135
180.0001790691961399660.0003581383922799330.99982093080386
191.58348655857727e-053.16697311715453e-050.999984165134414
201.64488225837173e-063.28976451674345e-060.999998355117742
211.37243133551571e-072.74486267103142e-070.999999862756866
221.07413174293717e-082.14826348587435e-080.999999989258683
231.09756886957076e-092.19513773914153e-090.999999998902431
241.03566174008632e-102.07132348017264e-100.999999999896434
252.04316051288401e-104.08632102576801e-100.999999999795684
264.00234116636033e-118.00468233272066e-110.999999999959977
273.68742714822614e-127.37485429645228e-120.999999999996313
286.10756866347773e-131.22151373269555e-120.99999999999939
293.66700729465308e-137.33401458930615e-130.999999999999633
305.58905476382539e-131.11781095276508e-120.999999999999441
311.71685112903875e-123.4337022580775e-120.999999999998283
329.67044724244734e-121.93408944848947e-110.99999999999033
331.13945833940308e-112.27891667880617e-110.999999999988605
341.95667499747975e-113.91334999495951e-110.999999999980433
359.45861643856238e-121.89172328771248e-110.999999999990541
363.8900565826193e-107.7801131652386e-100.999999999610994
379.29994796044794e-091.85998959208959e-080.999999990700052
388.52183052814694e-091.70436610562939e-080.99999999147817
396.1287324437934e-091.22574648875868e-080.999999993871268
404.37532362971595e-098.7506472594319e-090.999999995624676
415.98753017467225e-091.19750603493445e-080.99999999401247
421.61675681100824e-083.23351362201649e-080.999999983832432
432.48664157750151e-084.97328315500303e-080.999999975133584
444.28390697418086e-088.56781394836173e-080.99999995716093
452.94691051908847e-085.89382103817694e-080.999999970530895
462.13634511755699e-084.27269023511399e-080.999999978636549
472.10349618990819e-084.20699237981639e-080.999999978965038
481.68827838282463e-083.37655676564925e-080.999999983117216
491.36679930358601e-082.73359860717202e-080.999999986332007
501.87809184552427e-083.75618369104854e-080.999999981219082
512.82259697213373e-085.64519394426746e-080.99999997177403
524.44672776843931e-088.89345553687862e-080.999999955532722
538.91025978805904e-081.78205195761181e-070.999999910897402
542.19875427748617e-074.39750855497234e-070.999999780124572
556.95007911561947e-071.39001582312389e-060.999999304992088
562.12097359419692e-064.24194718839384e-060.999997879026406
572.72148895824295e-055.44297791648589e-050.999972785110418
580.0002884088914209290.0005768177828418580.99971159110858
590.000916267407888820.001832534815777640.999083732592111
600.003088360059966800.006176720119933610.996911639940033
610.007575489563248460.01515097912649690.992424510436752
620.02117123973114110.04234247946228220.978828760268859
630.05379960659709590.1075992131941920.946200393402904
640.1117584506006370.2235169012012740.888241549399363
650.2086299359162830.4172598718325660.791370064083717
660.3422951028567350.684590205713470.657704897143265
670.5168774965292080.9662450069415840.483122503470792
680.6987157094007730.6025685811984540.301284290599227
690.8757933367441820.2484133265116350.124206663255817
700.9662361887520980.06752762249580410.0337638112479021
710.991604099528210.01679180094358150.00839590047179075
720.9977568519113370.004486296177326190.00224314808866310
730.998941759307890.002116481384221850.00105824069211092
740.9995073206955140.0009853586089718090.000492679304485904
750.999748096375480.0005038072490382760.000251903624519138
760.9999037972244780.0001924055510442109.62027755221051e-05
770.999956776161788.64476764419477e-054.32238382209738e-05
780.9999707504112225.84991775560064e-052.92495887780032e-05
790.9999888662131852.22675736293195e-051.11337868146597e-05
800.9999945118635381.09762729248939e-055.48813646244694e-06
810.9999976019799294.79604014238004e-062.39802007119002e-06
820.9999991271113971.74577720611923e-068.72888603059614e-07
830.9999997752945274.49410946308817e-072.24705473154409e-07
840.999999783738584.32522839085024e-072.16261419542512e-07
850.9999997240933695.5181326285432e-072.7590663142716e-07
860.9999994028682011.19426359731335e-065.97131798656675e-07
870.9999984667546933.06649061425913e-061.53324530712956e-06
880.9999973718268665.25634626819522e-062.62817313409761e-06
890.9999934704845751.30590308499956e-056.52951542499778e-06
900.999981797569043.64048619214146e-051.82024309607073e-05
910.9999519132254989.61735490037936e-054.80867745018968e-05
920.9999197630113730.0001604739772543488.0236988627174e-05
930.999896252562670.0002074948746604390.000103747437330220
940.9998141238911120.0003717522177756520.000185876108887826
950.9996565868131970.0006868263736056630.000343413186802831
960.9999383442471240.0001233115057527636.16557528763813e-05
970.9999340601609770.0001318796780466146.5939839023307e-05
980.999964226656617.15466867820589e-053.57733433910294e-05
990.9999083703295650.0001832593408693849.16296704346921e-05
1000.9998147346474470.0003705307051057950.000185265352552897
1010.999538287577630.0009234248447416090.000461712422370804
1020.9987330510105040.002533897978992500.00126694898949625
1030.995629114488420.008741771023158740.00437088551157937
1040.9976350259393340.004729948121332820.00236497406066641


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level770.875NOK
5% type I error level800.909090909090909NOK
10% type I error level810.920454545454545NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/10p3em1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/10p3em1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/1rqhy1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/1rqhy1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/2fhes1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/2fhes1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/3utzc1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/3utzc1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/4j4951227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/4j4951227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/5czz91227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/5czz91227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/66mmv1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/66mmv1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/74v2t1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/74v2t1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/8d6xr1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/8d6xr1227794992.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/9ufih1227794992.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277952426hqwhs8qxfyorov/9ufih1227794992.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