Home » date » 2010 » Nov » 23 »

W7 p1

*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: Tue, 23 Nov 2010 19:06:32 +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/23/t1290539131vb7v5v2t1cyw285.htm/, Retrieved Tue, 23 Nov 2010 20:05:34 +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/23/t1290539131vb7v5v2t1cyw285.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 «
3,50 2,20 3,00 3,43 4,33 2,67 2,75 1,40 2,00 3,57 3,83 2,78 1,50 3,40 2,00 4,29 4,17 1,89 3,00 2,00 2,00 2,71 3,83 2,00 2,00 2,40 2,25 3,14 3,17 2,00 2,50 2,40 1,75 3,14 4,83 1,78 2,50 2,20 1,00 3,57 4,17 2,22 2,75 2,20 2,75 3,29 3,50 1,78 4,00 2,40 1,75 2,43 3,67 2,00 2,75 2,60 1,75 3,00 4,17 1,89 3,25 2,80 3,00 2,71 4,00 2,56 3,00 3,20 2,50 2,71 3,00 3,33 2,00 2,20 2,50 2,14 3,67 2,56 3,00 2,00 2,00 2,29 2,50 2,00 2,75 2,20 2,00 3,29 3,67 1,67 1,00 3,00 1,00 3,86 4,67 1,33 2,25 1,80 2,25 3,14 3,33 2,33 2,00 2,20 2,00 2,00 2,00 1,67 2,00 3,40 1,75 3,14 4,00 2,22 3,50 3,40 2,75 3,29 3,33 3,44 3,75 2,20 2,25 3,29 3,50 3,00 4,00 3,60 2,75 3,00 3,33 3,78 2,25 2,80 3,25 2,71 3,50 2,33 3,50 2,00 2,00 2,57 3,83 3,44 2,75 2,20 2,00 2,86 4,67 2,11 2,00 3,00 2,25 3,29 4,00 1,78 2,25 3,00 1,50 3,57 4,00 2,22 2,25 2,60 2,25 2,71 4,00 2,33 2,25 3,20 2,25 3,43 3,83 2,44 2,25 2,60 1,50 3,14 3,83 1,89 2,50 1,80 1,50 3,57 4,83 2,67 4,00 3,60 4,00 3,71 4,00 2,78 2,75 3,60 1,25 4,14 3,00 2,89 2 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Y[t] = -0.216966647663763 + 0.360374452098849X1[t] + 0.139026563992538X2[t] + 0.0835584328678894X3[t] + 0.440407549873858X4[t] -0.0776309220351274X5[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.2169666476637630.339069-0.63990.5232020.261601
X10.3603744520988490.0578896.225200
X20.1390265639925380.0737021.88630.0611450.030572
X30.08355843286788940.0747411.1180.2653330.132666
X40.4404075498738580.0744855.912700
X5-0.07763092203512740.068675-1.13040.2600740.130037


Multiple Linear Regression - Regression Statistics
Multiple R0.638298402197689
R-squared0.407424850248123
Adjusted R-squared0.388059649275839
F-TEST (value)21.0390199839005
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value5.55111512312578e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.497192288158996
Sum Squared Residuals37.8216262249311


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12.672.77533367772469-0.105333677724692
22.782.410745672588540.36925432741146
31.892.52902965786729-0.639029657867289
422.20550473111726-0.205504731117258
522.16224216782134-0.16224216782134
61.782.17178284685851-0.391782846858507
72.222.32192036439803-0.101920364398025
81.782.4869398387404-0.7069398387404
922.48970703415709-0.48970703415709
101.892.27926112424257-0.389261124242571
112.562.477180771457920.0828192285420817
123.332.47854948963140.851450510368596
132.561.676103452348380.883896547651618
1422.12378268647696-0.123782686476957
151.672.41107375734351-0.741073757343511
161.331.98148266588964-0.651482665889637
172.332.156498894924910.173501105075092
181.671.70231081873076-0.03231081873076
192.222.195055850090780.0249441499092237
203.442.937249811351550.502750188648446
2132.80553507440530.194464925594695
223.783.017524160736070.762475839263932
232.332.17651138859360.153488611406395
243.442.324034900184341.11596509981566
252.112.14406758886262-0.0340675888626247
261.782.24728557340878-0.467285573408785
272.222.39802447574726-0.17802447574726
282.332.026332181909640.303667818090356
292.442.44003881296032-3.88129603165992e-05
301.892.16623586045046-0.276235860450458
312.672.256852546691770.413147453308229
322.783.38264884446783-0.602648844467834
332.892.96940125743846-0.0794012574384616
342.782.672614825671880.107385174328116
351.892.55511938701276-0.665119387012756
363.563.087261989285710.472738010714292
373.672.626373275722991.04362672427701
381.442.44792781772315-1.00792781772315
393.563.092052353236110.467947646763895
402.782.87000854481692-0.0900085448169176
413.222.999493047081450.220506952918553
422.442.44608524434564-0.00608524434564125
4321.929285630685060.0707143693149406
441.892.41813743707477-0.528137437074767
452.222.46572505494169-0.245725054941691
461.672.2729766629049-0.6029766629049
472.222.46383811106635-0.243838111066346
483.673.122068213953630.547931786046366
493.222.459678623556370.760321376443634
502.562.96380823570237-0.403808235702373
512.892.585533308536550.304466691463455
5222.10535545035758-0.105355450357583
532.222.081779288636420.13822071136358
541.221.30918293503971-0.0891829350397122
553.113.21973934661944-0.109739346619443
562.892.590671483613040.299328516386964
572.442.46932296277517-0.0293229627751708
581.892.24408669721329-0.354086697213292
591.331.71222756666654-0.382227566666535
601.562.33656401773723-0.776564017737226
611.892.30242304827434-0.412423048274343
622.332.37085040619262-0.0408504061926172
632.112.54771983549399-0.437719835493987
6422.56477350592513-0.564773505925133
651.111.99045399321542-0.880453993215423
663.222.691609787645060.528390212354943
673.442.04911358151671.3908864184833
682.112.55072671706517-0.440726717065172
6912.22742461421608-1.22742461421608
702.222.49557241029063-0.275572410290627
713.111.958333376405151.15166662359485
722.112.014247160491060.0957528395089405
733.332.562793285590.767206714409996
743.223.016333276157210.20366672384279
752.892.384827219001290.505172780998712
762.562.172607467417520.387392532582481
771.442.52865235509974-1.08865235509974
782.332.51379358022805-0.183793580228048
792.112.38331018800897-0.273310188008968
803.112.548219280471260.561780719528738
812.562.83762488712413-0.277624887124132
8221.530618790785250.469381209214753
832.332.30134161703840.0286583829615991
842.222.41929460838894-0.199294608388945
852.562.215399789155210.344600210844785
862.332.314217262401730.0157827375982743
872.332.41766428634331-0.0876642863433097
881.672.53569210125988-0.865692101259885
893.113.016563887090690.093436112909305
902.111.962342612754790.147657387245212
912.892.360401837650060.529598162349939
921.111.46426234116734-0.354262341167339
931.781.90162286667844-0.12162286667844
942.442.350755560089750.0892444399102509
952.112.080513892975460.0294861070245435
963.443.195076960467120.244923039532881
973.442.799313718598590.640686281401414
983.222.754935673132930.465064326867069
992.111.933906056712420.176093943287585
1002.442.09831279502420.3416872049758
1012.562.487177868692750.0728221313072546
1021.671.79448627942836-0.124486279428358
1032.222.38336392570546-0.16336392570546
10422.16607519643393-0.16607519643393
1052.562.443706696845090.116293303154914
1062.782.330763457656310.449236542343687
1072.331.840214535854220.489785464145777
1082.672.163668173179310.506331826820692
1092.782.80238079652749-0.022380796527489
1101.892.17410926717325-0.284109267173246
1111.441.6183983445312-0.178398344531196
1123.112.020666274949031.08933372505097
1132.332.235902687797560.094097312202441
1142.783.12631220427894-0.346312204278936
11512.3017840483425-1.3017840483425
1161.781.98039832548046-0.200398325480461
1172.112.35477711850275-0.244777118502746
1181.892.16312412988436-0.273124129884356
1192.782.721786119075980.0582138809240194
1202.221.730762972813170.489237027186827
1213.222.401265244228610.818734755771389
1221.562.11686989106866-0.556869891068656
1232.442.98956893444633-0.549568934446332
1241.671.73179643037957-0.0617964303795683
1252.112.82335888800903-0.713358888009026
1262.222.43776649714552-0.217766497145517
1271.671.93774983585031-0.267749835850306
1282.222.42149440578267-0.201494405782667
12922.24633109292469-0.246331092924691
1303.672.82751030634710.842489693652895
1312.442.64302298233732-0.203022982337319
1321.781.83148155096471-0.0514815509647076
1331.892.11698129809999-0.226981298099985
1341.781.672109476369670.107890523630329
1352.331.895956959717830.434043040282172
1362.893.06825918596047-0.178259185960469
13722.3482452143226-0.348245214322604
13822.56639579777148-0.566395797771483
1391.892.03615144554984-0.146151445549843
1402.442.74828138357633-0.308281383576326
1413.332.750659014564680.579340985435324
1423.333.028514255388980.301485744611022
1432.673.32104261600875-0.651042616008752
1442.332.4442217398624-0.114221739862402
1452.332.8207616848349-0.490761684834899
1463.223.045176705189640.174823294810365
1473.442.580737591284350.859262408715652
1482.222.108673247105640.111326752894362
1491.781.576869792596880.203130207403119
1502.442.103007340145030.336992659854974
1512.222.25656008440865-0.0365600844086538
1523.113.036607239170360.0733927608296406
1534.222.952531824943651.26746817505635
1542.442.146730514127490.29326948587251
1552.222.85382118408923-0.633821184089225
1561.892.00247881827629-0.112478818276291
1573.112.71739344912840.392606550871604
1582.442.67820031853983-0.238200318539832
1593.442.898745211191340.541254788808662


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.2139145335043650.427829067008730.786085466495635
100.1036743392292570.2073486784585150.896325660770743
110.230408437800710.460816875601420.76959156219929
120.6524067601158060.6951864797683880.347593239884194
130.6668130095868930.6663739808262140.333186990413107
140.6417071441097550.7165857117804890.358292855890244
150.6459328711978080.7081342576043850.354067128802192
160.5810133472778220.8379733054443570.418986652722178
170.4959523543459270.9919047086918540.504047645654073
180.46511198919090.93022397838180.5348880108091
190.4011697783279270.8023395566558540.598830221672073
200.4350092611138670.8700185222277330.564990738886133
210.3948136979980860.7896273959961730.605186302001914
220.4000090692036890.8000181384073780.599990930796311
230.3386599432275180.6773198864550360.661340056772482
240.6001138459289220.7997723081421560.399886154071078
250.5302119890858080.9395760218283840.469788010914192
260.4999586932147140.9999173864294270.500041306785286
270.4382063846532510.8764127693065020.561793615346749
280.3912367572172970.7824735144345950.608763242782703
290.3310863240999120.6621726481998250.668913675900088
300.2791698728966380.5583397457932750.720830127103362
310.3406353985137160.6812707970274320.659364601486284
320.4007343645236010.8014687290472030.599265635476399
330.3574668525914060.7149337051828120.642533147408594
340.3688889556619060.7377779113238120.631111044338094
350.3831668283675790.7663336567351580.616833171632421
360.3749604869949010.7499209739898020.625039513005099
370.5558462728618470.8883074542763060.444153727138153
380.7612257694457850.477548461108430.238774230554215
390.758167104155810.483665791688380.24183289584419
400.716459933422390.5670801331552210.28354006657761
410.6916744081273640.6166511837452720.308325591872636
420.6424496882175420.7151006235649170.357550311782458
430.594006505071890.811986989856220.40599349492811
440.5804115553370720.8391768893258560.419588444662928
450.5462171641374370.9075656717251260.453782835862563
460.5678013867907910.8643972264184190.432198613209209
470.5270047219777110.9459905560445770.472995278022289
480.5180980662504460.963803867499110.481901933749554
490.5822876853748290.8354246292503420.417712314625171
500.5606588523571210.8786822952857580.439341147642879
510.5252440885792450.949511822841510.474755911420755
520.4759275937562660.9518551875125320.524072406243734
530.4375251391555150.875050278311030.562474860844485
540.3906885185793170.7813770371586350.609311481420683
550.3479797867122390.6959595734244780.652020213287761
560.3208090867909880.6416181735819760.679190913209012
570.2777014808643410.5554029617286820.722298519135659
580.2538538140708540.5077076281417090.746146185929146
590.2342464423771290.4684928847542570.765753557622871
600.2923915878012940.5847831756025880.707608412198706
610.2805815787596640.5611631575193270.719418421240337
620.2431573320065690.4863146640131380.756842667993431
630.2306702076019770.4613404152039530.769329792398023
640.2650751745206260.5301503490412530.734924825479374
650.34169735193650.6833947038730010.6583026480635
660.3440157142285780.6880314284571570.655984285771422
670.6760600569715440.6478798860569120.323939943028456
680.6692845505469070.6614308989061860.330715449453093
690.8451534768966790.3096930462066430.154846523103321
700.825586885103560.348826229792880.17441311489644
710.9309381680186340.1381236639627320.0690618319813658
720.9147005182284730.1705989635430530.0852994817715266
730.9374713723010130.1250572553979740.062528627698987
740.9255046078496630.1489907843006740.074495392150337
750.9274751374025380.1450497251949240.072524862597462
760.921359797147130.157280405705740.07864020285287
770.9706182195399360.05876356092012770.0293817804600638
780.963390980743840.073218038512320.03660901925616
790.956154910237770.08769017952446050.0438450897622303
800.9588097798578240.08238044028435220.0411902201421761
810.9511044656683240.0977910686633530.0488955343316765
820.950797589334120.09840482133176130.0492024106658806
830.9381351751808620.1237296496382760.0618648248191382
840.925547089416610.148905821166780.07445291058339
850.917502269402110.164995461195780.0824977305978902
860.9024384093409730.1951231813180530.0975615906590265
870.88179374735650.2364125052870010.118206252643501
880.9251324011609530.1497351976780940.0748675988390469
890.909419444068850.1811611118622990.0905805559311496
900.8903452376142640.2193095247714720.109654762385736
910.8922521836066770.2154956327866460.107747816393323
920.8817276295692690.2365447408614630.118272370430731
930.8606806197780830.2786387604438340.139319380221917
940.8342446504921110.3315106990157780.165755349507889
950.802606898697660.394786202604680.19739310130234
960.7741384511390770.4517230977218470.225861548860923
970.7925421467286340.4149157065427310.207457853271366
980.7872543183547970.4254913632904060.212745681645203
990.7534725590309360.4930548819381280.246527440969064
1000.7296962313615590.5406075372768820.270303768638441
1010.688553203860680.6228935922786410.31144679613932
1020.6505828256909190.6988343486181620.349417174309081
1030.6129122062884030.7741755874231950.387087793711597
1040.5711419825736870.8577160348526260.428858017426313
1050.5258418177759810.9483163644480370.474158182224019
1060.5064553717668220.9870892564663570.493544628233179
1070.5028453042741430.9943093914517150.497154695725857
1080.5157227137332460.9685545725335090.484277286266754
1090.4656124270719620.9312248541439240.534387572928038
1100.442151441177730.884302882355460.55784855882227
1110.4028620590655490.8057241181310980.597137940934451
1120.6270164168351660.7459671663296690.372983583164835
1130.6187050795290670.7625898409418660.381294920470933
1140.590199767328620.8196004653427610.40980023267138
1150.7908563943659810.4182872112680370.209143605634019
1160.7688629424127380.4622741151745230.231137057587262
1170.7581785383920750.4836429232158490.241821461607924
1180.731647392705790.5367052145884190.26835260729421
1190.684243214364670.6315135712706610.31575678563533
1200.692626136192880.6147477276142410.307373863807121
1210.7440604391031570.5118791217936870.255939560896843
1220.7484840826974250.503031834605150.251515917302575
1230.7548003979204940.4903992041590120.245199602079506
1240.7056464121971170.5887071756057650.294353587802883
1250.7486948913273120.5026102173453770.251305108672688
1260.7221837547247370.5556324905505260.277816245275263
1270.7113732173554950.577253565289010.288626782644505
1280.6779551711776940.6440896576446120.322044828822306
1290.6526460373194320.6947079253611360.347353962680568
1300.7250387458982420.5499225082035170.274961254101758
1310.6721753812388350.6556492375223290.327824618761165
1320.6116059603846880.7767880792306240.388394039615312
1330.6112742154610970.7774515690778060.388725784538903
1340.5520560160632160.8958879678735680.447943983936784
1350.5109578697536590.9780842604926810.489042130246341
1360.4828055714946610.9656111429893220.517194428505339
1370.4881656189591380.9763312379182770.511834381040862
1380.5317948752359590.9364102495280820.468205124764041
1390.464212791066080.928425582132160.53578720893392
1400.39008034808410.78016069616820.6099196519159
1410.5015022008919130.9969955982161750.498497799108087
1420.4488329314058560.8976658628117130.551167068594144
1430.378358130760960.756716261521920.62164186923904
1440.2985800282534680.5971600565069370.701419971746532
1450.3569862353710260.7139724707420530.643013764628974
1460.2643825845755630.5287651691511260.735617415424437
1470.3415868928939460.6831737857878930.658413107106054
1480.2357393109400210.4714786218800430.764260689059979
1490.1467654360858820.2935308721717640.853234563914118
1500.09219834241016970.1843966848203390.90780165758983


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level60.0422535211267606OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/10qvc51290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/10qvc51290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/1juft1290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/1juft1290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/2u3ww1290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/2u3ww1290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/3u3ww1290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/3u3ww1290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/4u3ww1290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/4u3ww1290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/54ceh1290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/54ceh1290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/64ceh1290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/64ceh1290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/7f3d21290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/7f3d21290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/8f3d21290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/8f3d21290539179.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/9qvc51290539179.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290539131vb7v5v2t1cyw285/9qvc51290539179.ps (open in new window)


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