Home » date » 2008 » Nov » 24 »

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 24 Nov 2008 03:44:44 -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/24/t1227523535u3w3bortlsxmo1i.htm/, Retrieved Mon, 24 Nov 2008 10:45:59 +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/24/t1227523535u3w3bortlsxmo1i.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:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7.977 0 8.241 0 8.444 0 8.49 0 8.388 0 8.099 0 7.984 0 7.786 0 8.086 0 9.315 0 9.113 0 9.023 0 9.026 1 9.787 1 9.536 1 9.49 1 9.736 1 9.694 1 9.647 1 9.753 1 10.07 1 10.137 1 9.984 1 9.732 1 9.103 1 9.155 1 9.308 1 9.394 1 9.948 1 10.177 1 10.002 1 9.728 1 10.002 1 10.063 1 10.018 1 9.96 1 10.236 1 10.893 1 10.756 1 10.94 1 10.997 1 10.827 1 10.166 1 10.186 1 10.457 1 10.368 1 10.244 1 10.511 1 10.812 1 10.738 1 10.171 1 9.721 1 9.897 1 9.828 1 9.924 1 10.371 1 10.846 1 10.413 1 10.709 1 10.662 1 10.57 1 10.297 1 10.635 1 10.872 1 10.296 1 10.383 1 10.431 1 10.574 1 10.653 1 10.805 1 10.872 1 10.625 1 10.407 1 10.463 1 10.556 1 10.646 1 10.702 1 11.353 1 11.346 1 11.451 1 11.964 1 12.574 1 13.031 1 13.812 1 14.544 1 14.931 1 14.886 1 16.005 1 17.064 1 15.168 1 16.05 1 15.839 1 15.137 1 14.954 1 15.648 1 15.305 1 15.579 1 16.348 1 15.928 1 16.171 1 15.937 1 15.713 1 15.594 1 15.683 1 16.438 1 17.032 1 17.696 1 17.745 1 19.394 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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
prijs[t] = + 7.94649741949626 -0.914112177187953dummy[t] + 0.244118104209843M1[t] + 0.0747670489266164M2[t] -0.0755096559660449M3[t] + 0.0122136391412938M4[t] + 0.0696036009152987M5[t] -0.201784215088474M6[t] -0.292616475536691M7[t] -0.347337624873797M8[t] -0.17372544087757M9[t] -0.0305577013257876M10[t] + 0.073276704892662M11[t] + 0.0799433715593283t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.946497419496260.58692313.539200
dummy-0.9141121771879530.495432-1.84510.0681410.034071
M10.2441181042098430.6244450.39090.696720.34836
M20.07476704892661640.6419280.11650.9075240.453762
M3-0.07550965596604490.641565-0.11770.9065570.453279
M40.01221363914129380.6412410.0190.9848440.492422
M50.06960360091529870.6409540.10860.9137540.456877
M6-0.2017842150884740.640705-0.31490.7534970.376749
M7-0.2926164755366910.640495-0.45690.6488150.324407
M8-0.3473376248737970.640322-0.54240.5887840.294392
M9-0.173725440877570.640188-0.27140.7866980.393349
M10-0.03055770132578760.640093-0.04770.9620240.481012
M110.0732767048926620.6400350.11450.9090920.454546
t0.07994337155932830.00495116.146800


Multiple Linear Regression - Regression Statistics
Multiple R0.882360686596556
R-squared0.778560381251146
Adjusted R-squared0.748258117632882
F-TEST (value)25.6931426331425
F-TEST (DF numerator)13
F-TEST (DF denominator)95
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.35767920231558
Sum Squared Residuals175.112817558024


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
17.9778.27055889526541-0.293558895265411
28.2418.181151211541530.0598487884584739
38.4448.11081787820820.333182121791807
48.498.278484544874860.211515455125140
58.3888.4158178782082-0.0278178782081937
68.0998.22437343376375-0.125373433763751
77.9848.21348454487486-0.229484544874863
87.7868.23870676709709-0.452706767097086
98.0868.49226232265264-0.406262322652641
109.3158.715373433763750.599626566236247
119.1138.899151211541530.213848788458471
129.0238.90581787820820.117182121791805
139.0268.315767176789420.710232823210583
149.7878.226359493065521.56064050693448
159.5368.156026159732191.37997384026781
169.498.323692826398851.16630717360115
179.7368.461026159732191.27497384026781
189.6948.269581715287741.42441828471226
199.6478.258692826398851.38830717360115
209.7538.283915048621081.46908495137893
2110.078.537470604176631.53252939582337
2210.1378.760581715287741.37641828471226
239.9848.944359493065521.03964050693448
249.7328.951026159732190.780973840267814
259.1039.27508763550136-0.172087635501357
269.1559.18567995177746-0.0306799517774588
279.3089.115346618444120.192653381555874
289.3949.28301328511080.110986714889208
299.9489.420346618444130.527653381555875
3010.1779.228902173999680.94809782600032
3110.0029.21801328511080.783986714889208
329.7289.243235507333010.484764492666986
3310.0029.496791062888570.50520893711143
3410.0639.719902173999680.343097826000320
3510.0189.903679951777460.114320048222541
369.969.910346618444130.0496533815558748
3710.23610.23440809421330.00159190578670328
3810.89310.14500041048940.747999589510602
3910.75610.07466707715610.681332922843934
4010.9410.24233374382270.697666256177268
4110.99710.37966707715610.617332922843935
4210.82710.18822263271160.638777367288379
4310.16610.1773337438227-0.0113337438227315
4410.18610.2025559660450-0.0165559660449545
4510.45710.45611152160050.0008884783994903
4610.36810.6792226327116-0.311222632711621
4710.24410.8630004104894-0.6190004104894
4810.51110.8696670771561-0.358667077156067
4910.81211.1937285529252-0.381728552925238
5010.73811.1043208692013-0.366320869201339
5110.17111.033987535868-0.862987535868007
529.72111.2016542025347-1.48065420253467
539.89711.338987535868-1.44198753586801
549.82811.1475430914236-1.31954309142356
559.92411.1366542025347-1.21265420253467
5610.37111.1618764247569-0.790876424756894
5710.84611.4154319803124-0.56943198031245
5810.41311.6385430914236-1.22554309142356
5910.70911.8223208692013-1.11332086920134
6010.66211.828987535868-1.16698753586800
6110.5712.1530490116372-1.58304901163718
6210.29712.0636413279133-1.76664132791328
6310.63511.9933079945799-1.35830799457995
6410.87212.1609746612466-1.28897466124661
6510.29612.2983079945799-2.00230799457995
6610.38312.1068635501355-1.72386355013550
6710.43112.0959746612466-1.66497466124661
6810.57412.1211968834688-1.54719688346883
6910.65312.3747524390244-1.72175243902439
7010.80512.5978635501355-1.7928635501355
7110.87212.7816413279133-1.90964132791328
7210.62512.7883079945799-2.16330799457995
7310.40713.1123694703491-2.70536947034912
7410.46313.0229617866252-2.55996178662522
7510.55612.9526284532919-2.39662845329189
7610.64613.1202951199586-2.47429511995855
7710.70213.2576284532919-2.55562845329189
7811.35313.0661840088474-1.71318400884744
7911.34613.0552951199586-1.70929511995855
8011.45113.0805173421808-1.62951734218077
8111.96413.3340728977363-1.37007289773633
8212.57413.5571840088474-0.983184008847442
8313.03113.7409617866252-0.709961786625219
8413.81213.74762845329190.0643715467081137
8514.54414.07168992906110.472310070938944
8614.93113.98228224533720.94871775466284
8714.88613.91194891200380.974051087996174
8816.00514.07961557867051.92538442132951
8917.06414.21694891200382.84705108799617
9015.16814.02550446755941.14249553244062
9116.0514.01461557867052.03538442132951
9215.83914.03983780089271.79916219910729
9315.13714.29339335644830.843606643551731
9414.95414.51650446755940.437495532440620
9515.64814.70028224533720.947717754662842
9615.30514.70694891200380.598051087996175
9715.57915.0310103877730.547989612227004
9816.34814.94160270404911.4063972959509
9915.92814.87126937071581.05673062928424
10016.17115.03893603738241.13206396261757
10115.93715.17626937071580.760730629284232
10215.71314.98482492627130.728175073728679
10315.59414.97393603738240.620063962617566
10415.68314.99915825960470.683841740395345
10516.43815.25271381516021.18528618483979
10617.03215.47582492627131.55617507372868
10717.69615.65960270404912.0363972959509
10817.74515.66626937071582.07873062928424
10919.39415.99033084648493.40366915351506


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.003089757981170120.006179515962340230.99691024201883
180.000836604521513120.001673209043026240.999163395478487
190.0002353142431669760.0004706284863339510.999764685756833
200.0001720490066387690.0003440980132775370.99982795099336
218.57796818985288e-050.0001715593637970580.999914220318102
225.2307754641193e-050.0001046155092823860.999947692245359
232.22984582001511e-054.45969164003022e-050.9999777015418
241.24886583765197e-052.49773167530394e-050.999987511341623
252.70144217558213e-065.40288435116426e-060.999997298557824
268.15622061060953e-071.63124412212191e-060.99999918437794
271.74903501246179e-073.49807002492357e-070.999999825096499
283.59201695817349e-087.18403391634699e-080.99999996407983
291.76068779404360e-083.52137558808721e-080.999999982393122
302.81523416508890e-085.63046833017780e-080.999999971847658
311.79814872314502e-083.59629744629005e-080.999999982018513
325.67654528559024e-091.13530905711805e-080.999999994323455
331.69698658292390e-093.39397316584779e-090.999999998303013
347.34937688442494e-101.46987537688499e-090.999999999265062
352.19997937369748e-104.39995874739497e-100.999999999780002
365.6732583746992e-111.13465167493984e-100.999999999943267
372.68108285783456e-105.36216571566913e-100.999999999731892
381.57475983300836e-093.14951966601671e-090.99999999842524
392.09883752540657e-094.19767505081313e-090.999999997901162
403.3130965626165e-096.626193125233e-090.999999996686903
413.01876642950537e-096.03753285901075e-090.999999996981234
422.61608661969429e-095.23217323938858e-090.999999997383913
431.55740527261766e-093.11481054523532e-090.999999998442595
448.57730491081364e-101.71546098216273e-090.99999999914227
455.48827043262362e-101.09765408652472e-090.999999999451173
467.94859497946443e-101.58971899589289e-090.99999999920514
477.84113603758395e-101.56822720751679e-090.999999999215886
485.2081128911093e-101.04162257822186e-090.999999999479189
495.46378096495265e-101.09275619299053e-090.999999999453622
504.4897443250122e-108.9794886500244e-100.999999999551026
515.85217236058030e-101.17043447211606e-090.999999999414783
522.01933315701579e-094.03866631403159e-090.999999997980667
534.61542159368343e-099.23084318736686e-090.999999995384578
549.12441260236737e-091.82488252047347e-080.999999990875587
557.42963202793837e-091.48592640558767e-080.999999992570368
566.45581696018302e-091.29116339203660e-080.999999993544183
571.06918385428256e-082.13836770856512e-080.999999989308161
581.36672639926693e-082.73345279853385e-080.999999986332736
591.17616953143120e-082.35233906286240e-080.999999988238305
601.07960391758469e-082.15920783516937e-080.99999998920396
616.11267437615926e-091.22253487523185e-080.999999993887326
624.10763313079887e-098.21526626159774e-090.999999995892367
632.79033321320196e-095.58066642640392e-090.999999997209667
641.876363220293e-093.752726440586e-090.999999998123637
651.06882980322635e-092.13765960645270e-090.99999999893117
666.26339901657983e-101.25267980331597e-090.99999999937366
672.84196990182285e-105.68393980364569e-100.999999999715803
681.48298446920032e-102.96596893840064e-100.999999999851702
697.92253944168254e-111.58450788833651e-100.999999999920775
703.8658762269625e-117.731752453925e-110.999999999961341
711.35830959175107e-112.71661918350215e-110.999999999986417
725.07989296129859e-121.01597859225972e-110.99999999999492
733.78354919587199e-127.56709839174398e-120.999999999996216
745.45677662563326e-121.09135532512665e-110.999999999994543
755.07396418709371e-121.01479283741874e-110.999999999994926
761.88283824572766e-113.76567649145533e-110.999999999981172
774.87353461680585e-109.7470692336117e-100.999999999512647
786.9973467301035e-101.3994693460207e-090.999999999300265
793.47907663609378e-096.95815327218756e-090.999999996520923
802.01982315957572e-084.03964631915144e-080.999999979801768
819.0033602812624e-081.80067205625248e-070.999999909966397
826.21296890907446e-071.24259378181489e-060.99999937870311
831.84092920237351e-053.68185840474701e-050.999981590707976
840.0004058322115280320.0008116644230560630.999594167788472
850.01090067596509550.02180135193019110.989099324034904
860.03522645722504510.07045291445009030.964773542774955
870.05610727177935490.1122145435587100.943892728220645
880.1180739668156020.2361479336312050.881926033184398
890.3829291712504350.765858342500870.617070828749565
900.3494528922107710.6989057844215420.650547107789229
910.5200621781088410.959875643782320.47993782189116
920.7527612834398560.4944774331202880.247238716560144


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level680.894736842105263NOK
5% type I error level690.907894736842105NOK
10% type I error level700.921052631578947NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/10taw51227523479.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/10taw51227523479.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/153rg1227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/153rg1227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/2qbks1227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/2qbks1227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/3vqrw1227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/3vqrw1227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/4m7hk1227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/4m7hk1227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/5ec501227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/5ec501227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/6d74l1227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/6d74l1227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/7xoy61227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/7xoy61227523478.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/8wwfw1227523478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227523535u3w3bortlsxmo1i/8wwfw1227523478.ps (open in new window)


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