Home » date » 2010 » Nov » 24 »

ws 7 3

*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: Wed, 24 Nov 2010 13:24:17 +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/Nov/24/t12906049958hlkqgp8s96msv5.htm/, Retrieved Wed, 24 Nov 2010 14:23:18 +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/Nov/24/t12906049958hlkqgp8s96msv5.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 «
9 26 24 14 11 12 24 9 23 25 11 7 8 25 9 25 17 6 17 8 30 9 23 18 12 10 8 19 9 19 18 8 12 9 22 9 29 16 10 12 7 22 10 25 20 10 11 4 25 10 21 16 11 11 11 23 10 22 18 16 12 7 17 10 25 17 11 13 7 21 10 24 23 13 14 12 19 10 18 30 12 16 10 19 10 22 23 8 11 10 15 10 15 18 12 10 8 16 10 22 15 11 11 7.9 23 10 28 12 4 15 4 27 10 20 21 9 9 9 22 10 12 15 8 11 8 14 10 24 20 8 17 7 22 10 20 31 14 17 11 23 10 21 27 15 11 9 23 10 20 34 16 18 11 21 10 21 21 9 14 13 19 10 23 31 14 10 8 18 10 28 19 11 11 8 20 10 24 16 8 15 9 23 10 24 20 9 15 6 25 10 24 21 9 13 9 19 10 23 22 9 16 9 24 10 23 17 9 13 6 22 10 29 24 10 9 6 25 10 24 25 16 18 16 26 10 18 26 11 18 5 29 10 25 25 8 12 7 32 10 21 17 9 17 9 25 10 26 32 16 9 6 29 10 22 33 11 9 6 28 10 22 13 16 12 5 17 10 22 32 12 18 12 28 10 23 25 12 12 7 29 10 30 29 14 18 10 26 10 23 22 9 14 9 25 10 17 18 10 15 8 14 10 23 17 9 16 5 25 10 23 20 10 10 8 26 10 25 15 12 11 8 20 10 24 20 14 14 10 18 10 24 33 14 9 6 32 10 23 29 10 12 8 25 10 21 23 1 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 28.2113145628772 -1.21076082808973M[t] -0.0662441512071262CM[t] + 0.219982378476393D[t] -0.138042493202292PE[t] -0.267683206546857PC[t] + 0.415179865256042PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)28.211314562877214.9457561.88760.0609880.030494
M-1.210760828089731.484819-0.81540.4161040.208052
CM-0.06624415120712620.063225-1.04780.2964150.148207
D0.2199823784763930.1127691.95070.0529270.026464
PE-0.1380424932022920.105255-1.31150.1916670.095833
PC-0.2676832065468570.1315-2.03560.0435260.021763
PS0.4151798652560420.0762655.443900


Multiple Linear Regression - Regression Statistics
Multiple R0.475107146524304
R-squared0.225726800678466
Adjusted R-squared0.195163384915774
F-TEST (value)7.38552269259134
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value6.01600129157553e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.50327124217684
Sum Squared Residuals1865.48222823202


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12624.03801164212561.96198835787441
22325.3499030197419-2.34990301974193
32525.4754187312743-0.475418731274265
42323.1283877855251-0.12838778552508
51922.9502296744362-3.95022967443619
62924.05804914689694.94195085310305
72524.76894342258970.231056577410299
82122.5497602295545-1.54976022955451
92221.95879496097110.0412050390288902
102522.44780418761812.55219581238185
112420.18348578087953.81651421912049
121819.7590757706424-1.75907577064237
132218.3723483201743.62765167982603
141520.6720873616672-5.67208736166723
152223.4458223210569-1.4458223210569
162824.25719211909133.74280788090873
172022.1748462508084-2.17484625080835
181219.0224880776687-7.02248807766866
192421.45213449101452.54786550898554
202021.387790137663-1.38779013766304
212123.2363704932754-2.23637049327541
222020.6606202172801-0.660620217280076
232119.16836136284131.83163863715866
242321.08123788343951.91876211656055
252821.90853779980566.09146220019442
262421.87300953440992.12699046559012
272423.46142465821040.538575341789576
282420.37713668223113.62286331776894
292321.97266437769731.02733562230273
302322.69070250246830.309297497531739
312924.24468539107214.75531460892794
322421.99430087169012.00569912830987
331825.0181996958846-7.0181996958846
342525.9629248535507-0.962924853550713
352122.5810225057866-1.58102250578665
362626.6953459132976-0.695345913297579
372225.1140100044524-3.11401000445245
382222.8253821301005-0.825382130100455
392222.5517548560342-0.551754856034193
402325.5973147716882-2.59731477168816
413022.895458749197.10454125081001
422322.66392922935790.336070770642108
431718.7115504081909-1.71155040819089
442323.7897978251764-0.789797825176368
452324.2514329548606-1.2514329548606
462522.39349678311052.60650321688952
472420.7223871608153.27761283918504
482427.4346766009058-3.43467660090579
492322.96397074233580.0360292576641573
502123.8188359040196-2.81883590401957
512425.689268014907-1.68926801490697
522421.81195456611372.18804543388633
532821.48426877691986.51573122308023
541621.0236250829993-5.02362508299931
552019.79744106588060.202558934119401
562923.40747046613045.59252953386964
572723.84285966604183.15714033395823
582223.1630373613017-1.16303736130166
592823.94557987385864.05442012614143
601620.3525238918059-4.35252389180595
612522.85605510654212.14394489345794
622423.47606800662820.523931993371767
632823.64279536624614.35720463375388
642424.2219104420497-0.221910442049678
652322.67262253657790.327377463422147
663026.89220941159593.10779058840406
672421.2840205804032.71597941959703
682124.0987471132405-3.0987471132405
692523.26917310986961.73082689013041
702523.91819297487871.08180702512134
712220.78203401685681.21796598314317
722322.42752110106030.572478898939722
732622.82629325701073.17370674298933
742321.60221832535141.3977816746486
752523.06395975096771.93604024903233
762121.2855363232984-0.28553632329839
772523.64041113442271.35958886557731
782422.14458092022611.85541907977393
792923.51210226725245.48789773274761
802223.6475211919108-1.64752119191078
812723.56795625718823.43204374281184
822619.62933046286266.37066953713738
832221.30476702420710.695232975792906
842422.03266696034431.96733303965569
852723.10550556439773.89449443560234
862421.35352023792672.64647976207328
872424.8501959300918-0.850195930091758
882924.3550861222364.64491387776403
892222.1422701689175-0.142270168917526
902120.57265653890560.427343461094374
912420.44510880140993.55489119859013
922421.71915491725592.28084508274409
932321.9408652637041.05913473629601
942022.3033791385044-2.30337913850444
952721.34838649501515.65161350498488
962623.42462623170582.57537376829418
972521.94688905680433.05311094319566
982120.06421063133970.935789368660329
992120.76785402568530.232145974314724
1001920.3833782507911-1.38337825079114
1012121.5815820263659-0.581582026365925
1022121.2757289453639-0.275728945363894
1031619.7626225329336-3.76262253293362
1042220.64247829493671.35752170506331
1052921.76814191731257.23185808268746
1061521.7285300518644-6.72853005186445
1071720.6914683311992-3.69146833119922
1081519.9107210220628-4.91072102206282
1092121.6461601660543-0.646160166054345
1102121.0223978312602-0.0223978312602242
1111919.2846170934275-0.284617093427472
1122418.06108828080135.93891171919871
1132022.2498571897503-2.24985718975033
1141725.0894942854413-8.08949428544126
1152324.8187640667656-1.81876406676556
1162422.38946761648981.61053238351019
1171422.0562702744901-8.05627027449007
1181922.8524775017181-3.85247750171813
1192422.18152657914811.81847342085194
1201320.4208948976005-7.42089489760047
1212225.3600782782672-3.36007827826717
1221621.1238596734176-5.12385967341765
1231923.2284747086461-4.22847470864614
1242522.73914614831012.26085385168992
1252524.15501002699080.844989973009194
1262321.42921855464071.57078144535926
1272423.55270231910670.447297680893288
1282623.50301310962262.49698689037738
1292621.48816875163864.51183124836138
1302524.13214600987120.867853990128757
1311822.2913902011632-4.29139020116321
1322119.86854354224771.13145645775229
1332623.64965056067572.35034943932426
1342321.96378120007771.03621879992229
1352319.75730516468853.24269483531153
1362222.5981238379304-0.59812383793039
1372022.3968907626009-2.39689076260087
1381322.0661760017937-9.0661760017937
1392421.39053313229752.60946686770245
1401521.5036713077125-6.50367130771249
1411423.0937406475822-9.09374064758223
1422224.0489169164051-2.04891691640508
1431017.6456931542631-7.64569315426308
1442424.4263784690027-0.426378469002681
1452221.83024927125790.169750728742086
1462425.7876336500023-1.78763365000229
1471921.6536043888869-2.65360438888688
1482022.0851919634486-2.08519196344857
1491317.1097811441646-4.10978114416461
1502020.1003643180544-0.100364318054432
1512223.1857601196823-1.18576011968228
1522423.38275932633610.617240673663885
1532923.27377598869855.72622401130151
1541220.9758996574622-8.97589965746221
1552020.9222146380677-0.922214638067705
1562121.4451629067001-0.445162906700136
1572423.63300703539480.36699296460521
1582221.89259344774620.107406552253813
1592017.72217468394072.27782531605929


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5270113394415090.9459773211169830.472988660558491
110.5620507582690630.8758984834618730.437949241730937
120.4887970480408740.9775940960817480.511202951959126
130.5403126089106890.9193747821786220.459687391089311
140.7416063012671050.5167873974657910.258393698732895
150.6549753164256380.6900493671487250.345024683574362
160.624349814096280.7513003718074390.37565018590372
170.5386871065367860.9226257869264270.461312893463214
180.6765238499578490.6469523000843020.323476150042151
190.6017877142567010.7964245714865980.398212285743299
200.589009299802560.821981400394880.41099070019744
210.5250276261210650.949944747757870.474972373878935
220.4556446102758760.9112892205517520.544355389724124
230.4048025144985250.8096050289970490.595197485501475
240.4092926959496130.8185853918992260.590707304050387
250.5718371575252930.8563256849494140.428162842474707
260.5105762121293710.9788475757412590.489423787870629
270.4435195626866020.8870391253732040.556480437313398
280.4379320352942180.8758640705884370.562067964705782
290.3737718316251960.7475436632503910.626228168374804
300.3133360257589170.6266720515178330.686663974241083
310.3472632973775550.6945265947551110.652736702622445
320.2961631536981890.5923263073963770.703836846301811
330.5219273653580150.956145269283970.478072634641985
340.4708129217879090.9416258435758180.529187078212091
350.4328628993345440.8657257986690890.567137100665456
360.3755462363391710.7510924726783430.624453763660829
370.3489102873234240.6978205746468480.651089712676576
380.2972724968701430.5945449937402860.702727503129857
390.2499040285422910.4998080570845820.750095971457709
400.2225608253369390.4451216506738780.777439174663061
410.3752039313679040.7504078627358090.624796068632096
420.3234194853661950.646838970732390.676580514633805
430.2913721848914370.5827443697828750.708627815108563
440.2477868890165750.495573778033150.752213110983425
450.2113939048447750.4227878096895510.788606095155225
460.1919870179778910.3839740359557820.80801298202211
470.1795478822850880.3590957645701760.820452117714912
480.1644598925383510.3289197850767020.83554010746165
490.1343692400060660.2687384800121320.865630759993934
500.124728456293020.249456912586040.87527154370698
510.1029544401586430.2059088803172870.897045559841357
520.08783297010282040.1756659402056410.91216702989718
530.1473927475819370.2947854951638740.852607252418063
540.1767598662292670.3535197324585350.823240133770733
550.1653140667463530.3306281334927060.834685933253647
560.2227463280511840.4454926561023690.777253671948816
570.2151843248901590.4303686497803180.78481567510984
580.1841954106317130.3683908212634250.815804589368287
590.1973960359864410.3947920719728810.80260396401356
600.2251276343909590.4502552687819180.774872365609041
610.1989056339765730.3978112679531460.801094366023427
620.1671440635645960.3342881271291930.832855936435404
630.182384014069960.3647680281399210.81761598593004
640.1532974835765050.3065949671530110.846702516423495
650.1264764446759090.2529528893518190.87352355532409
660.1229283101839720.2458566203679440.877071689816028
670.1122909241959020.2245818483918030.887709075804098
680.1113897087490070.2227794174980140.888610291250993
690.09479785054730570.1895957010946110.905202149452694
700.0773954034562740.1547908069125480.922604596543726
710.06289922008769060.1257984401753810.93710077991231
720.04968201329844750.0993640265968950.950317986701553
730.04664004627491780.09328009254983570.953359953725082
740.03736217520759840.07472435041519680.962637824792402
750.03105173302005080.06210346604010160.96894826697995
760.02381720173285790.04763440346571590.976182798267142
770.01870023051216350.0374004610243270.981299769487836
780.01496894036217080.02993788072434160.98503105963783
790.02249240070487030.04498480140974060.97750759929513
800.0179314270308470.03586285406169390.982068572969153
810.01753389421050280.03506778842100560.982466105789497
820.03136148030692810.06272296061385620.968638519693072
830.02418621221566320.04837242443132640.975813787784337
840.02017989864544880.04035979729089760.97982010135455
850.02210208039269870.04420416078539750.977897919607301
860.01958969636059260.03917939272118510.980410303639407
870.01489208240969650.02978416481939310.985107917590303
880.01944328733149350.0388865746629870.980556712668507
890.01529083099031760.03058166198063530.984709169009682
900.01144189070491450.02288378140982890.988558109295086
910.01150151838410460.02300303676820920.988498481615895
920.01005566057448920.02011132114897830.98994433942551
930.007711865229676070.01542373045935210.992288134770324
940.006374596726677290.01274919345335460.993625403273323
950.01167998736334030.02335997472668060.98832001263666
960.01057812008116420.02115624016232830.989421879918836
970.01006125627655040.02012251255310080.98993874372345
980.00769911304184280.01539822608368560.992300886958157
990.005680824815820920.01136164963164180.99431917518418
1000.004348978568172290.008697957136344580.995651021431828
1010.003213483084356860.006426966168713720.996786516915643
1020.002286472255777910.004572944511555820.997713527744222
1030.002444720233493730.004889440466987460.997555279766506
1040.001915245177990580.003830490355981170.99808475482201
1050.008114481359318260.01622896271863650.991885518640682
1060.01816187192056140.03632374384112280.981838128079439
1070.01802450373780910.03604900747561830.98197549626219
1080.02271794819215920.04543589638431840.97728205180784
1090.01752772183889990.03505544367779980.9824722781611
1100.01280204888416140.02560409776832280.987197951115839
1110.009268614016901180.01853722803380240.9907313859831
1120.02272837335947690.04545674671895380.977271626640523
1130.02059718112020970.04119436224041940.97940281887979
1140.0572002938414690.1144005876829380.942799706158531
1150.04846270489123670.09692540978247340.951537295108763
1160.03927643678381870.07855287356763730.960723563216181
1170.1157314667644120.2314629335288250.884268533235588
1180.1108871133418230.2217742266836460.889112886658177
1190.0983127910559470.1966255821118940.901687208944053
1200.1718339306144410.3436678612288810.82816606938556
1210.1637124934368240.3274249868736480.836287506563176
1220.1950669671064050.390133934212810.804933032893595
1230.1880540532034090.3761081064068180.811945946796591
1240.1872354249148740.3744708498297480.812764575085126
1250.1700024472393310.3400048944786610.82999755276067
1260.1383413988774320.2766827977548630.861658601122568
1270.108178568043680.216357136087360.89182143195632
1280.1116304649352950.223260929870590.888369535064705
1290.1601335009212970.3202670018425950.839866499078703
1300.1379518520969660.2759037041939320.862048147903034
1310.1204231043296330.2408462086592670.879576895670367
1320.1042990079808010.2085980159616020.8957009920192
1330.09567417585490740.1913483517098150.904325824145093
1340.07810059259818740.1562011851963750.921899407401813
1350.106580435245780.213160870491560.89341956475422
1360.07902873211884720.1580574642376940.920971267881153
1370.05763579825094780.1152715965018960.942364201749052
1380.1468708337537460.2937416675074920.853129166246254
1390.208134149949640.4162682998992810.79186585005036
1400.1885344897264470.3770689794528940.811465510273553
1410.4060558457058970.8121116914117950.593944154294103
1420.3564043402773850.7128086805547690.643595659722615
1430.6660369756336890.6679260487326220.333963024366311
1440.6048309234602910.7903381530794170.395169076539709
1450.4942065231289870.9884130462579730.505793476871013
1460.4233169578654720.8466339157309450.576683042134528
1470.4336110339575330.8672220679150660.566388966042467
1480.303307218142270.606614436284540.69669278185773
1490.2114213023067070.4228426046134140.788578697693293


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0357142857142857NOK
5% type I error level370.264285714285714NOK
10% type I error level440.314285714285714NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/106da61290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/106da61290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/1icdc1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/1icdc1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/2sldx1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/2sldx1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/3sldx1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/3sldx1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/4sldx1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/4sldx1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/5luci1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/5luci1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/6luci1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/6luci1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/7e3tl1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/7e3tl1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/8e3tl1290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/8e3tl1290605044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/96da61290605044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906049958hlkqgp8s96msv5/96da61290605044.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by