Home » date » 2010 » Nov » 24 »

ws 7 1

*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 12:56:28 +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/t1290603356ktlv39ri6882aj2.htm/, Retrieved Wed, 24 Nov 2010 13:55:56 +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/t1290603356ktlv39ri6882aj2.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 «
26 24 14 11 12 24 23 25 11 7 8 25 25 17 6 17 8 30 23 18 12 10 8 19 19 18 8 12 9 22 29 16 10 12 7 22 25 20 10 11 4 25 21 16 11 11 11 23 22 18 16 12 7 17 25 17 11 13 7 21 24 23 13 14 12 19 18 30 12 16 10 19 22 23 8 11 10 15 15 18 12 10 8 16 22 15 11 11 8 23 28 12 4 15 4 27 20 21 9 9 9 22 12 15 8 11 8 14 24 20 8 17 7 22 20 31 14 17 11 23 21 27 15 11 9 23 20 34 16 18 11 21 21 21 9 14 13 19 23 31 14 10 8 18 28 19 11 11 8 20 24 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 23 22 9 16 9 24 23 17 9 13 6 22 29 24 10 9 6 25 24 25 16 18 16 26 18 26 11 18 5 29 25 25 8 12 7 32 21 17 9 17 9 25 26 32 16 9 6 29 22 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 23 25 12 12 7 29 30 29 14 18 10 26 23 22 9 14 9 25 17 18 10 15 8 14 23 17 9 16 5 25 23 20 10 10 8 26 25 15 12 11 8 20 24 20 14 14 10 18 24 33 14 9 6 32 23 29 10 12 8 25 21 23 14 17 7 25 24 26 16 5 4 23 24 18 9 12 8 21 28 20 10 12 8 20 16 11 6 6 4 15 20 28 8 24 20 30 29 26 13 12 8 24 27 22 10 12 8 26 22 17 8 14 6 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 16.1634772168084 -0.0705105327835315CM[t] + 0.215960321376021D[t] -0.149741441133531PE[t] -0.254410995984344PC[t] + 0.422488248372724PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.16347721680842.001698.074900
CM-0.07051053278353150.063068-1.1180.2653160.132658
D0.2159603213760210.1129961.91120.0578460.028923
PE-0.1497414411335310.10427-1.43610.1530170.076509
PC-0.2544109959843440.130432-1.95050.052940.02647
PS0.4224882483727240.0756595.584100


Multiple Linear Regression - Regression Statistics
Multiple R0.471036638254722
R-squared0.221875514578309
Adjusted R-squared0.196446609825966
F-TEST (value)8.7253272108728
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value2.66656804082110e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.50047733459247
Sum Squared Residuals1874.76126020933


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12622.93429908593233.06570091406767
22324.2550055858650-1.25500558586496
32524.35431507178140.645684928218581
42321.98038582308881.01961417691123
51921.8301154044514-2.83011540445145
62922.91187910473926.08812089526076
72524.81027614780990.189723852190148
82122.6824251316841-1.68242513168414
92221.95417872556470.0458212744353119
102522.48509920382552.51490079617452
112420.22718373207563.77281626792437
121819.7269887909165-1.72698879091652
132218.41547544707393.58452455292609
141520.7129210779706-5.7129210779706
152223.5161686524207-1.51616865242071
162824.32460921403333.6753907859667
172022.2837684508775-2.28376845087747
181219.0658934529381-7.06589345293813
192421.44920912518542.55079087481458
202021.3741994572580-1.37419945725805
212123.2794725485381-2.27947254853807
222020.5998705637805-0.599870563780518
232119.24995251615431.75004748384574
242321.07318129128221.92681870871782
252821.96666177616846.03333822383159
262421.94440039499062.05559960500936
272423.4865280699310.51347193006898
282420.41733794122523.58266205877483
292322.01004432690470.989955673095331
302322.73007780543050.269922194569496
312924.31889490697414.6811050930259
322422.07485162077421.9251483792258
331824.9905251820565-6.99052518205652
342526.0702461506627-1.07024615066266
352122.6353437980615-1.63534379806152
362626.7405255664529-0.74052556645287
372225.1677251784165-3.16772517841651
382222.8155533814510-0.815553381451035
392222.5800570864682-0.580057086468219
402325.6666226910486-2.66662269104857
413022.88735482279417.1126451772059
422322.73201545754450.267984542455546
431718.6873167328055-1.68731673280545
442323.8027292231324-0.802729223132429
452324.3648618533787-1.36486185337873
462522.46466422867862.53533577132144
472420.74100939539823.25899060460179
482427.5055591360355-3.50555913603547
492323.0082959276872-0.00829592768716035
502123.8009042002091-2.80090420020913
512425.7364470294205-1.73644702942053
522421.87799847343912.12200152656091
532821.53044948087536.46955051912468
541621.1048543792980-5.10485437929796
552019.90949781416780.0905021858322328
562923.44522024179315.5547797582069
572723.92435790554463.07564209445539
582223.2093525396664-1.2093525396664
592824.0579804653663.94201953463401
601620.3486433530867-4.34864335308675
612522.96156275535652.03843724464355
622423.50897249241780.491027507582153
632823.67776176361914.32223823638092
642424.3538592726111-0.353859272611125
652322.72604098942450.27395901057552
663026.97164305065313.02835694934685
672421.31763091538342.68236908461659
682124.1926759897584-3.19267598975837
692523.33976293148531.66023706851474
702524.00859248524850.991407514751505
712220.78885557183941.21114442816063
722322.51112326004050.488876739959505
732622.86316625088813.13683374911188
742321.58143940306761.41856059693240
752523.06346487322981.93653512677017
762121.3189178825247-0.31891788252473
772523.6694332950721.33056670492799
782422.18294220933791.81705779066212
792923.59982828379615.40017171620387
802223.6538473326819-1.65384733268187
812723.63663697679023.36336302320978
822619.68990595695376.31009404304634
832221.31962990133760.680370098662419
842422.10318232348411.89681767651591
852723.12246967214323.87753032785675
862421.33134450091802.66865549908196
872424.9078428674147-0.9078428674147
882924.46353249881584.53646750118417
892222.230271859528-0.230271859527993
902120.58790626452500.412093735474971
912420.4042799422933.59572005770701
922421.84105270996062.15894729003938
932321.97344449962091.02655550037907
942022.2940025806218-2.29400258062181
952721.44840738982045.5515926101796
962623.459375646592.54062435340999
972521.91918991863393.08081008136608
982120.05013126758580.949868732414233
992120.79443419152170.205565808478268
1001920.3947104774293-1.39471047742928
1012121.6283363122736-0.628336312273621
1022121.3214549242609-0.321454924260883
1031619.7574770795959-3.7574770795959
1042220.70399183669381.29600816330621
1052921.82367861719377.17632138280634
1061521.6872477864301-6.68724778643014
1071720.7369356868457-3.73693568684571
1081519.9513953468902-4.95139534689023
1092121.6742572878536-0.674257287853575
1102121.0022031148351-0.00220311483507387
1111919.311584073356-0.311584073356004
1122418.07285833063815.92714166936192
1132022.4039626342782-2.40396263427820
1141725.2056579436662-8.20565794366624
1152325.0803510679257-2.08035106792569
1162422.41655076444961.58344923555036
1171422.1008527643507-8.10085276435074
1181922.9159877159712-3.91598771597122
1192422.18307927982231.81692072017774
1201320.4056018121138-7.40560181211378
1212225.4130956870409-3.41309568704094
1221621.1564192498187-5.15641924981871
1231923.3029950724559-4.30299507245587
1242522.85835214081082.14164785918919
1252524.19145173956480.808548260435188
1262321.42019084495641.57980915504358
1272423.61318486499080.386815135009174
1282623.58610423687582.41389576312423
1292621.54006491656374.45993508343629
1302524.16232477156340.837675228436626
1311822.3823673010886-4.38236730108861
1322119.90657829714251.09342170285747
1332623.70645993205462.29354006794537
1342322.00246277984990.99753722015007
1352319.76998595460093.2300140453991
1362222.5834432175016-0.583443217501609
1372022.4056852541664-2.40568525416642
1381322.1217270004493-9.12172700044928
1392421.47813768886232.52186231113774
1401521.6102308962601-6.61023089626005
1411423.1514635110785-9.15146351107852
1422224.1016127157773-2.10161271577729
1431017.6849076382035-7.68490763820351
1442424.4741689969653-0.47416899696531
1452221.86334446371730.136655536282658
1462425.8075977857910-1.80759778579096
1471921.8641566604681-2.8641566604681
1482022.1411298449899-2.14112984498990
1491317.1172378109218-4.11723781092184
1502020.1492028983205-0.149202898320468
1512223.3128284521328-1.31282845213279
1522423.35311437582000.646885624180027
1532923.18635247328495.81364752671514
1541220.9603189552611-8.96031895526115
1552020.9663762867523-0.966376286752273
1562121.4626130603123-0.462613060312332
1572423.66990093873560.330099061264416
1582221.92423956081250.0757604391875075
1592017.69965274758502.30034725241504


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.7250546197274160.5498907605451680.274945380272584
100.5983211515274140.8033576969451710.401678848472586
110.4889758515914540.9779517031829090.511024148408546
120.4444781506100610.8889563012201220.555521849389939
130.4525075653294310.9050151306588630.547492434670569
140.6929444559919450.6141110880161110.307055544008055
150.6243615457210410.7512769085579170.375638454278959
160.572340256746810.8553194865063790.427659743253190
170.5063135003205010.9873729993589980.493686499679499
180.6364415497010620.7271169005978770.363558450298938
190.5613816721662460.8772366556675080.438618327833754
200.5664626046276290.8670747907447430.433537395372371
210.5185950532263360.9628098935473280.481404946773664
220.4494415367472040.8988830734944080.550558463252796
230.3904200513336300.7808401026672590.60957994866637
240.3910517958698860.7821035917397730.608948204130114
250.5347752055257790.9304495889484420.465224794474221
260.4721501751875170.9443003503750350.527849824812483
270.4085982285293190.8171964570586370.591401771470681
280.4018470309174990.8036940618349990.5981529690825
290.3409597097342070.6819194194684140.659040290265793
300.2843071286873560.5686142573747120.715692871312644
310.3084428496475930.6168856992951860.691557150352407
320.2599404531522620.5198809063045250.740059546847738
330.4840137868471290.9680275736942580.515986213152871
340.4376276599054060.8752553198108130.562372340094594
350.4028581380417940.8057162760835880.597141861958206
360.3472142427217310.6944284854434620.652785757278269
370.32458617553920.64917235107840.6754138244608
380.2753145167336950.550629033467390.724685483266305
390.2305687692343320.4611375384686630.769431230765668
400.2072899234436250.414579846887250.792710076556375
410.3586287338126520.7172574676253040.641371266187348
420.3085677126975640.6171354253951280.691432287302436
430.2768518642837890.5537037285675780.723148135716211
440.2350417544422390.4700835088844770.764958245557761
450.202514049220810.405028098441620.79748595077919
460.1816911056237280.3633822112474560.818308894376272
470.1694559119710350.3389118239420690.830544088028965
480.1564961590686870.3129923181373740.843503840931313
490.1275166971444600.2550333942889200.87248330285554
500.1180337131141590.2360674262283190.88196628688584
510.09726872471367640.1945374494273530.902731275286324
520.08229374251997950.1645874850399590.91770625748002
530.1379848383213380.2759696766426760.862015161678662
540.1694904958964170.3389809917928350.830509504103582
550.1617231475347250.3234462950694500.838276852465275
560.2169496055916710.4338992111833410.78305039440833
570.2078838301295890.4157676602591780.792116169870411
580.1782230506204150.356446101240830.821776949379585
590.188570917868360.377141835736720.81142908213164
600.2166605370097460.4333210740194920.783339462990254
610.1906814734097460.3813629468194930.809318526590254
620.1599505767664540.3199011535329070.840049423233546
630.174689230201690.349378460403380.82531076979831
640.1471646672551420.2943293345102850.852835332744858
650.1212970653164340.2425941306328680.878702934683566
660.1175769645471540.2351539290943090.882423035452846
670.1074040809100050.2148081618200100.892595919089995
680.1076369596621990.2152739193243970.892363040337801
690.09135832499629820.1827166499925960.908641675003702
700.07449324816409630.1489864963281930.925506751835904
710.06053489779151520.1210697955830300.939465102208485
720.04779966987502250.0955993397500450.952200330124978
730.04491372640886560.08982745281773120.955086273591134
740.0360261806482690.0720523612965380.963973819351731
750.03000495366528540.06000990733057090.969995046334715
760.02304144198044310.04608288396088630.976958558019557
770.01809139801209790.03618279602419580.981908601987902
780.01448559866104630.02897119732209260.985514401338954
790.02173187891360610.04346375782721210.978268121086394
800.01733867505701440.03467735011402870.982661324942986
810.01697906419104220.03395812838208440.983020935808958
820.03048884921974680.06097769843949360.969511150780253
830.02353342492941420.04706684985882840.976466575070586
840.01966223598637070.03932447197274140.98033776401363
850.02164065783472160.04328131566944310.978359342165278
860.01925300538690490.03850601077380990.980746994613095
870.01466625086028320.02933250172056640.985333749139717
880.01923395113793660.03846790227587310.980766048862063
890.01516962433969340.03033924867938680.984830375660307
900.01137322160903050.0227464432180610.98862677839097
910.01150218550291340.02300437100582690.988497814497087
920.01006405361517080.02012810723034170.98993594638483
930.007739522137911820.01547904427582360.992260477862088
940.006416189151653930.01283237830330790.993583810848346
950.01180441131206260.02360882262412520.988195588687937
960.01074517249690530.02149034499381050.989254827503095
970.01028277181843010.02056554363686020.98971722818157
980.007902054658079490.01580410931615900.99209794534192
990.00585169557089050.0117033911417810.99414830442911
1000.004498389756186160.008996779512372310.995501610243814
1010.00333883590406870.00667767180813740.996661164095931
1020.002385971957730790.004771943915461590.99761402804227
1030.002564315834368900.005128631668737790.997435684165631
1040.002018107722473750.004036215444947500.997981892277526
1050.0086162702140180.0172325404280360.991383729785982
1060.01931697035677450.0386339407135490.980683029643226
1070.01926721998229720.03853443996459440.980732780017703
1080.02439562348408140.04879124696816270.975604376515919
1090.01893882080128140.03787764160256290.981061179198719
1100.01392423734887950.02784847469775910.98607576265112
1110.01014594022793620.02029188045587240.989854059772064
1120.02483239929358410.04966479858716830.975167600706416
1130.02264637835850920.04529275671701830.97735362164149
1140.06267163840880680.1253432768176140.937328361591193
1150.05368992347668680.1073798469533740.946310076523313
1160.04382517165112120.08765034330224240.956174828348879
1170.1277122543417880.2554245086835760.872287745658212
1180.1231836196862420.2463672393724830.876816380313758
1190.1101636027578690.2203272055157390.88983639724213
1200.1901734664656130.3803469329312250.809826533534387
1210.1823944832674250.3647889665348500.817605516732575
1220.2167799140759190.4335598281518390.78322008592408
1230.2103592564071960.4207185128143920.789640743592804
1240.2093044638920270.4186089277840540.790695536107973
1250.1932618506961990.3865237013923970.806738149303801
1260.1593942791558690.3187885583117370.840605720844131
1270.1264017615489480.2528035230978950.873598238451052
1280.1309108249394660.2618216498789330.869089175060534
1290.1857870540186680.3715741080373370.814212945981332
1300.1619916746549770.3239833493099550.838008325345023
1310.1435731709570200.2871463419140390.85642682904298
1320.1257698701755060.2515397403510120.874230129824494
1330.1165069419603480.2330138839206950.883493058039653
1340.09649256813999640.1929851362799930.903507431860004
1350.1303460545228170.2606921090456340.869653945477183
1360.09873581569794370.1974716313958870.901264184302056
1370.07372838655426850.1474567731085370.926271613445732
1380.1802871766915900.3605743533831810.81971282330841
1390.2503219985123610.5006439970247220.749678001487639
1400.2316913300487480.4633826600974970.768308669951252
1410.4706241312241840.9412482624483680.529375868775816
1420.4224008468781560.8448016937563120.577599153121844
1430.7285334582525040.5429330834949920.271466541747496
1440.6792494928620610.6415010142758780.320750507137939
1450.5793430239226050.841313952154790.420656976077395
1460.5083023925863520.9833952148272950.491697607413648
1470.5584068184567280.8831863630865440.441593181543272
1480.4311105109723150.862221021944630.568889489027685
1490.3382061481767930.6764122963535860.661793851823207
1500.2420958923218360.4841917846436730.757904107678164


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0352112676056338NOK
5% type I error level370.26056338028169NOK
10% type I error level430.302816901408451NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290603356ktlv39ri6882aj2/104ark1290603375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290603356ktlv39ri6882aj2/104ark1290603375.ps (open in new window)


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


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


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290603356ktlv39ri6882aj2/94ark1290603375.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290603356ktlv39ri6882aj2/94ark1290603375.ps (open in new window)


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