Home » date » 2010 » Dec » 27 »

Multiple regression - OPJV

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 27 Dec 2010 15:00:15 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz.htm/, Retrieved Mon, 27 Dec 2010 15:59:33 +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/2010/Dec/27/t1293461971aan1k9rkjccauiz.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
20503 22885 26217 26583 27751 28158 27373 28367 26851 26733 26849 26733 27951 29781 32914 33488 35652 36488 35387 35676 34844 32447 31068 29010 29812 30951 32974 32936 34012 32946 31948 30599 27691 25073 23406 22248 22896 25317 26558 26471 27543 26198 24725 25005 23462 20780 19815 19761 21454 23899 24939 23580 24562 24696 23785 23812 21917 19713 19282 18788 21453 24482 27474 27264 27349 30632 29429 30084 26290 24379 23335 21346 21106 24514 28353 30805 31348 34556 33855 34787 32529 29998 29257 28155 30466 35704 39327 39351 42234 43630 43722 43121 37985 37135 34646 33026 35087 38846 42013 43908 42868 44423 44167 43636 44382 42142 43452 36912 42413 45344 44873 47510 49554 47369 45998 48140 48441 44928 40454 38661 37246 36843 36424 37594 38144 38737 34560 36080 33508 35462 33374 32110 35533 35532 37903 36763 40399 44164 44496 43110 43880 43930 44327
 
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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
OPJV[t] = + 23615.8972717423 + 126.744045273975t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)23615.8972717423999.99358123.61600
t126.74404527397512.0489910.519100


Multiple Linear Regression - Regression Statistics
Multiple R0.663098309947825
R-squared0.439699368655662
Adjusted R-squared0.435725605312794
F-TEST (value)110.650617743722
F-TEST (DF numerator)1
F-TEST (DF denominator)141
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5947.76028766207
Sum Squared Residuals4987995193.96808


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12050323742.6413170163-3239.6413170163
22288523869.3853622903-984.385362290291
32621723996.12940756432220.87059243573
42658324122.87345283822460.12654716176
52775124249.61749811223501.38250188778
62815824376.36154338623781.63845661381
72737324503.10558866022869.89441133983
82836724629.84963393413737.15036606586
92685124756.59367920812094.40632079188
102673324883.33772448211849.66227551791
112684925010.08176975611838.91823024393
122673325136.825815031596.17418496996
132795125263.5698603042687.43013969598
142978125390.3139055784390.68609442201
153291425517.0579508527396.94204914803
163348825643.80199612597844.19800387406
173565225770.54604139999881.45395860008
183648825897.290086673910590.7099133261
193538726024.03413194799362.96586805214
203567626150.77817722189525.22182277816
213484426277.52222249588566.47777750419
223244726404.26626776986042.73373223021
233106826531.01031304384536.98968695623
242901026657.75435831772352.24564168226
252981226784.49840359173027.50159640829
263095126911.24244886574039.75755113431
273297427037.98649413975936.01350586034
283293627164.73053941365771.26946058636
293401227291.47458468766720.52541531239
303294627418.21862996165527.78137003841
313194827544.96267523564403.03732476444
323059927671.70672050952927.29327949046
332769127798.4507657835-107.450765783513
342507327925.1948110575-2852.19481105749
352340628051.9388563315-4645.93885633146
362224828178.6829016054-5930.68290160544
372289628305.4269468794-5409.42694687941
382531728432.1709921534-3115.17099215339
392655828558.9150374274-2000.91503742736
402647128685.6590827013-2214.65908270134
412754328812.4031279753-1269.40312797531
422619828939.1471732493-2741.14717324929
432472529065.8912185233-4340.89121852326
442500529192.6352637972-4187.63526379724
452346229319.3793090712-5857.37930907121
462078029446.1233543452-8666.12335434519
471981529572.8673996192-9757.86739961916
481976129699.6114448931-9938.61144489313
492145429826.3554901671-8372.3554901671
502389929953.0995354411-6054.09953544109
512493930079.8435807151-5140.84358071506
522358030206.587625989-6626.58762598903
532456230333.331671263-5771.33167126301
542469630460.075716537-5764.07571653698
552378530586.819761811-6801.81976181096
562381230713.5638070849-6901.56380708494
572191730840.3078523589-8923.3078523589
581971330967.0518976329-11254.0518976329
591928231093.7959429069-11811.7959429069
601878831220.5399881808-12432.5399881808
612145331347.2840334548-9894.2840334548
622448231474.0280787288-6992.02807872878
632747431600.7721240028-4126.77212400276
642726431727.5161692767-4463.51616927673
652734931854.2602145507-4505.26021455071
663063231981.0042598247-1349.00425982468
672942932107.7483050987-2678.74830509866
683008432234.4923503726-2150.49235037263
692629032361.2363956466-6071.23639564661
702437932487.9804409206-8108.98044092058
712333532614.7244861946-9279.72448619455
722134632741.4685314685-11395.4685314685
732110632868.2125767425-11762.2125767425
742451432994.9566220165-8480.95662201648
752835333121.7006672905-4768.70066729046
763080533248.4447125644-2443.44471256443
773134833375.1887578384-2027.18875783841
783455633501.93280311241054.06719688762
793385533628.6768483864226.323151613644
803478733755.42089366031031.57910633967
813252933882.1649389343-1353.16493893431
822999834008.9089842083-4010.90898420828
832925734135.6530294823-4878.65302948226
842815534262.3970747562-6107.39707475623
853046634389.1411200302-3923.1411200302
863570434515.88516530421188.11483469582
873932734642.62921057824684.37078942185
883935134769.37325585214581.62674414787
894223434896.11730112617337.8826988739
904363035022.86134640018607.13865359992
914372235149.6053916748572.39460832595
924312135276.3494369487844.65056305197
933798535403.0934822222581.906517778
943713535529.8375274961605.16247250402
953464635656.58157277-1010.58157276995
963302635783.3256180439-2757.32561804393
973508735910.0696633179-823.069663317903
983884636036.81370859192809.18629140812
994201336163.55775386595849.44224613415
1004390836290.30179913987617.69820086017
1014286836417.04584441386450.9541555862
1024442336543.78988968787879.21011031222
1034416736670.53393496177496.46606503825
1044363636797.27798023576838.72201976427
1054438236924.02202550977457.9779744903
1064214237050.76607078375091.23392921632
1074345237177.51011605776274.48988394235
1083691237304.2541613316-392.254161331627
1094241337430.99820660564982.0017933944
1104534437557.74225187967786.25774812042
1114487337684.48629715357188.51370284645
1124751037811.23034242759698.76965757247
1134955437937.974387701511616.0256122985
1144736938064.71843297559304.28156702452
1154599838191.46247824957806.53752175055
1164814038318.20652352349821.79347647658
1174844138444.95056879749996.0494312026
1184492838571.69461407146356.30538592863
1194045438698.43865934541755.56134065465
1203866138825.1827046193-164.182704619325
1213724638951.9267498933-1705.9267498933
1223684339078.6707951673-2235.67079516727
1233642439205.4148404412-2781.41484044125
1243759439332.1588857152-1738.15888571522
1253814439458.9029309892-1314.9029309892
1263873739585.6469762632-848.646976263175
1273456039712.3910215372-5152.39102153715
1283608039839.1350668111-3759.13506681112
1293350839965.8791120851-6457.8791120851
1303546240092.6231573591-4630.62315735907
1313337440219.367202633-6845.36720263305
1323211040346.111247907-8236.11124790702
1333553340472.855293181-4939.855293181
1343553240599.599338455-5067.59933845497
1353790340726.3433837289-2823.34338372895
1363676340853.0874290029-4090.08742900292
1374039940979.8314742769-580.831474276896
1384416441106.57551955093057.42448044913
1394449641233.31956482483262.68043517515
1404311041360.06361009881749.93638990118
1414388041486.80765537282393.1923446272
1424393041613.55170064682316.44829935323
1434432741740.29574592072586.70425407926


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.005936203337618530.01187240667523710.994063796662381
60.002262666238458640.004525332476917280.997737333761541
70.002312440305643550.00462488061128710.997687559694356
80.0008352344446280070.001670468889256010.999164765555372
90.0009231536079407090.001846307215881420.99907684639206
100.0006414565520526680.001282913104105340.999358543447947
110.0003273192125092550.000654638425018510.99967268078749
120.000154780206974830.000309560413949660.999845219793025
134.74929537634695e-059.4985907526939e-050.999952507046237
141.46489675953808e-052.92979351907616e-050.999985351032405
151.52236012432148e-053.04472024864296e-050.999984776398757
161.01354138499734e-052.02708276999467e-050.99998986458615
171.311633363052e-052.62326672610399e-050.99998688366637
181.24311917603434e-052.48623835206869e-050.99998756880824
195.46692534108743e-061.09338506821749e-050.99999453307466
202.38325609227969e-064.76651218455937e-060.999997616743908
211.2076659677044e-062.4153319354088e-060.999998792334032
222.29815262165781e-064.59630524331561e-060.999997701847378
238.73389424742873e-061.74677884948575e-050.999991266105753
246.79360924955904e-050.0001358721849911810.999932063907504
250.0001441050600463710.0002882101200927420.999855894939954
260.000158946540969190.0003178930819383790.99984105345903
270.0001162596591019180.0002325193182038360.999883740340898
288.96723337983079e-050.0001793446675966160.999910327666202
296.79694660911525e-050.0001359389321823050.999932030533909
306.01596885542458e-050.0001203193771084920.999939840311446
316.65917356236504e-050.0001331834712473010.999933408264376
320.0001031920159214770.0002063840318429550.999896807984079
330.0003863338987581980.0007726677975163960.999613666101242
340.002287253208033820.004574506416067630.997712746791966
350.01035238092508320.02070476185016640.989647619074917
360.03125652481344950.0625130496268990.96874347518655
370.05156795413235650.1031359082647130.948432045867644
380.05212024683851090.1042404936770220.947879753161489
390.04597468065298640.09194936130597280.954025319347014
400.03970247876679660.07940495753359310.960297521233203
410.03241184448774130.06482368897548270.967588155512259
420.02724180949656510.05448361899313020.972758190503435
430.02454309062779590.04908618125559180.975456909372204
440.0208065023402760.0416130046805520.979193497659724
450.0194253548354710.03885070967094210.980574645164529
460.02428239184980020.04856478369960040.9757176081502
470.0315731911766760.0631463823533520.968426808823324
480.03731170719751540.07462341439503080.962688292802485
490.03399801301951980.06799602603903960.96600198698048
500.02585148197050410.05170296394100820.974148518029496
510.0189503220512440.03790064410248790.981049677948756
520.01415634361449270.02831268722898550.985843656385507
530.01015107237202940.02030214474405880.98984892762797
540.007181864342864820.01436372868572960.992818135657135
550.005140382545628170.01028076509125630.994859617454372
560.003647885532586480.007295771065172970.996352114467414
570.002936634379443060.005873268758886130.997063365620557
580.003188470547529730.006376941095059450.99681152945247
590.003752331726253960.007504663452507920.996247668273746
600.004925621927067230.009851243854134450.995074378072933
610.004586691635069420.009173383270138850.99541330836493
620.00377205917603090.007544118352061790.99622794082397
630.00355016202250840.00710032404501680.996449837977492
640.003244340401627180.006488680803254360.996755659598373
650.002961530043802280.005923060087604560.997038469956198
660.003819048058276630.007638096116553260.996180951941723
670.003935890627900120.007871781255800240.9960641093721
680.004194844526188320.008389689052376640.995805155473812
690.003613784883912270.007227569767824540.996386215116088
700.003506715115424870.007013430230849740.996493284884575
710.004046934349892570.008093868699785140.995953065650107
720.007040105569915160.01408021113983030.992959894430085
730.01483067491740650.02966134983481290.985169325082594
740.02180539731205510.04361079462411020.978194602687945
750.02820291746621880.05640583493243750.971797082533781
760.03833853499045870.07667706998091730.961661465009541
770.051566244632440.103132489264880.94843375536756
780.07956318415347070.1591263683069410.92043681584653
790.10503516032840.2100703206568010.8949648396716
800.1361023002246010.2722046004492030.863897699775399
810.1571316887356490.3142633774712980.842868311264351
820.1912280591606170.3824561183212350.808771940839383
830.2516186935044640.5032373870089280.748381306495536
840.3721577277777320.7443154555554640.627842272222268
850.4904271082550460.9808542165100910.509572891744954
860.5703846852011170.8592306295977660.429615314798883
870.6598089801955650.680382039608870.340191019804435
880.7239356128240940.5521287743518130.276064387175906
890.7988708586134660.4022582827730670.201129141386534
900.8620587274220870.2758825451558260.137941272577913
910.9005328626094160.1989342747811670.0994671373905835
920.9195513817466130.1608972365067730.0804486182533867
930.9175892804179130.1648214391641750.0824107195820874
940.9171179074791150.165764185041770.0828820925208848
950.9307007071932650.1385985856134710.0692992928067354
960.958391179650940.0832176406981210.0416088203490605
970.972416862435990.0551662751280180.027583137564009
980.9750525305127960.04989493897440870.0249474694872044
990.9748597222203160.05028055555936890.0251402777796844
1000.9749491113252040.05010177734959140.0250508886747957
1010.9729695734709640.05406085305807110.0270304265290356
1020.9715642580545560.05687148389088820.0284357419454441
1030.9686258575498870.06274828490022630.0313741424501132
1040.9636711481158760.07265770376824730.0363288518841236
1050.9585107908464360.08297841830712790.0414892091535639
1060.9489306088448380.1021387823103240.0510693911551622
1070.9380761671819270.1238476656361470.0619238328180735
1080.9424743782663050.1150512434673910.0575256217336953
1090.9285662071432170.1428675857135660.071433792856783
1100.9175725564949760.1648548870100480.0824274435050242
1110.9026153198090440.1947693603819110.0973846801909556
1120.9070865187660880.1858269624678230.0929134812339117
1130.9387724352410150.122455129517970.061227564758985
1140.9513083674070630.09738326518587380.0486916325929369
1150.958138600461190.08372279907762040.0418613995388102
1160.982849854410150.03430029117970140.0171501455898507
1170.9977275608051820.004544878389635790.00227243919481789
1180.9996426990845960.0007146018308085790.000357300915404289
1190.9997845157107220.0004309685785558130.000215484289277907
1200.9998030134650730.0003939730698533780.000196986534926689
1210.99974913279320.0005017344136004060.000250867206800203
1220.9996630084442480.000673983111502940.00033699155575147
1230.9995135535358080.000972892928384870.000486446464192435
1240.9995504189265830.0008991621468334660.000449581073416733
1250.9997661014109020.0004677971781950070.000233898589097504
1260.9999742162193765.15675612481918e-052.57837806240959e-05
1270.9999641400344677.17199310650398e-053.58599655325199e-05
1280.999985652047742.86959045173857e-051.43479522586929e-05
1290.9999652540857146.94918285729527e-053.47459142864764e-05
1300.99996824008896.35198222014498e-053.17599111007249e-05
1310.999893002850090.0002139942998218960.000106997149910948
1320.9998249664977920.0003500670044170250.000175033502208512
1330.99938594200730.00122811598540160.000614057992700802
1340.998571836921970.00285632615606060.0014281630780303
1350.9955077336732880.008984532653423830.00449226632671191
1360.9988518717814670.002296256437066630.00114812821853332
1370.9998674089764010.0002651820471984470.000132591023599223
1380.998555749309570.002888501380861320.00144425069043066


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level670.5NOK
5% type I error level830.619402985074627NOK
10% type I error level1050.783582089552239NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/10tgbl1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/10tgbl1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/1mfe91293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/1mfe91293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/2xodu1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/2xodu1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/3xodu1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/3xodu1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/4xodu1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/4xodu1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/5pfuf1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/5pfuf1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/6pfuf1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/6pfuf1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/7na0o1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/7na0o1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/8tgbl1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/8tgbl1293462005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/9tgbl1293462005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461971aan1k9rkjccauiz/9tgbl1293462005.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal 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