Home » date » 2010 » Nov » 24 »

Workshop 7 - blog 4

*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:20:43 +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/t12906048190vsc4rq5xo5m815.htm/, Retrieved Wed, 24 Nov 2010 14:20:22 +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/t12906048190vsc4rq5xo5m815.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 24 14 11 12 24 26 9 25 11 7 8 25 23 9 17 6 17 8 30 25 9 18 12 10 8 19 23 9 18 8 12 9 22 19 9 16 10 12 7 22 29 10 20 10 11 4 25 25 10 16 11 11 11 23 21 10 18 16 12 7 17 22 10 17 11 13 7 21 25 10 23 13 14 12 19 24 10 30 12 16 10 19 18 10 23 8 11 10 15 22 10 18 12 10 8 16 15 10 15 11 11 8 23 22 10 12 4 15 4 27 28 10 21 9 9 9 22 20 10 15 8 11 8 14 12 10 20 8 17 7 22 24 10 31 14 17 11 23 20 10 27 15 11 9 23 21 10 34 16 18 11 21 20 10 21 9 14 13 19 21 10 31 14 10 8 18 23 10 19 11 11 8 20 28 10 16 8 15 9 23 24 10 20 9 15 6 25 24 10 21 9 13 9 19 24 10 22 9 16 9 24 23 10 17 9 13 6 22 23 10 24 10 9 6 25 29 10 25 16 18 16 26 24 10 26 11 18 5 29 18 10 25 8 12 7 32 25 10 17 9 17 9 25 21 10 32 16 9 6 29 26 10 33 11 9 6 28 22 10 13 16 12 5 17 22 10 32 12 18 12 28 22 10 25 12 12 7 29 23 10 29 14 18 10 26 30 10 22 9 14 9 25 23 10 18 10 15 8 14 17 10 17 9 16 5 25 23 10 20 10 10 8 26 23 10 15 12 11 8 20 25 10 20 14 14 10 18 24 10 33 14 9 6 32 24 10 29 10 12 8 25 23 10 23 14 17 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
Expectations[t] = -10.7203715104562 + 1.67214624631751Month[t] + 0.0839950133200945Concern[t] -0.12716234602162Doubts[t] + 0.675005667880218Criticisim[t] + 0.122931469316262Standards[t] -0.0806109913942159Organization[t] + 0.000183508410492625t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-10.720371510456211.994434-0.89380.3728630.186431
Month1.672146246317511.195751.39840.1640410.08202
Concern0.08399501332009450.0483331.73790.0842760.042138
Doubts-0.127162346021620.087187-1.45850.1467810.073391
Criticisim0.6750056678802180.086517.802600
Standards0.1229314693162620.0633411.94080.0541470.027074
Organization-0.08061099139421590.063121-1.27710.2035340.101767
t0.0001835084104926250.0050640.03620.9711420.485571


Multiple Linear Regression - Regression Statistics
Multiple R0.644910701893747
R-squared0.415909813417085
Adjusted R-squared0.388832784899996
F-TEST (value)15.3602457948662
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value4.32986979603811e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.69358099715557
Sum Squared Residuals1095.56216682387


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11113.5192731920947-2.51927319209472
2711.6496805238682-4.6496805238682
31712.06715101961894.93284898038108
41010.1973312855293-0.197331285529335
51212.0724082194322-0.0724082194321785
6129.494155759456642.50584424054336
71110.168686937350.831313062649986
81114.5073487485644-3.50734874856437
91210.52148807469431.4785119253057
101311.32338120297521.6766187970248
111414.7829864914258-0.782986491425795
121614.63195205170341.36804794829657
131113.7386500081178-2.73865000811783
141012.1474061391567-2.14740613915671
151112.3190102990829-1.31901029908286
161510.26538244706334.73461755293671
17913.79096826922-4.79096826922004
181112.400774552475-1.400774552475
191712.16204731740534.83795268259475
201715.46860000262111.53139999737894
211113.5750187845749-2.5750187845749
221815.22076442872662.77923557127344
231416.0426865918609-2.04268659186087
241012.5878267118584-2.58782671185842
251111.8043650801541-0.804365080154082
261513.3002946280751.69970537192498
271511.73014177873613.26985822126386
281313.1017484882098-0.10174848820981
291613.88119534791592.11880465208408
301311.19052384745281.80947615254724
31911.5366385626658-2.53663856266579
321818.1338861133562-0.13388611335617
331812.28127437482655.71872562517346
341213.7334787119315-1.73347871193151
351713.74647478388313.2535252161169
36912.180100986597-3.18010098659698
37913.0996037346963-4.09960373469627
38128.756823416237673.24317658376233
391816.93884739945681.06115260054315
401213.0183579531476-1.01835795314763
411814.19214247872763.80785752127238
421414.0065124265686-0.00651242656858649
431511.99996765368333.00003234631672
441610.88688170526825.11311829473177
451013.1598363805743-3.1598363805743
461111.5869093316551-0.586909331655076
471412.93750260314491.06249739685507
48913.0506391836234-4.05063918362344
491213.7935940647809-1.79359406478086
501712.26737442409254.73262557590748
5159.75250536396423-4.75250536396423
521212.4250249208537-0.425024920853655
531212.0206606749896-0.0206606749895912
5469.42619032623413-3.42619032623413
552422.92158312929351.07841687070647
561212.5548091279476-0.554809127947605
571213.0075845425635-1.00758454256354
581411.64929835899492.35070164100508
5979.2771289240683-2.2771289240683
601311.11190650466741.88809349533261
611213.3058705676628-1.30587056766278
621311.57046577108561.42953422891441
631411.5008962631162.49910373688399
64812.9623777135221-4.96237771352209
65119.438019126728721.56198087327128
66911.817846234235-2.81784623423502
671113.7698065355102-2.76980653551015
681313.4913778588218-0.491377858821848
69109.487054794077520.512945205922478
701112.7531082927103-1.7531082927103
711212.7589089054675-0.758908905467533
72911.9182954258976-2.9182954258976
731514.68819125830450.311808741695511
741814.94152410994323.0584758900568
751512.16230927096612.83769072903386
761212.8411433481507-0.841143348150716
77139.943203507252743.05679649274726
781413.09823127861840.901768721381636
791011.9752956048536-1.97529560485363
801312.31872512179820.681274878201805
811313.8144142400931-0.814414240093145
821112.1590693511798-1.15906935117982
831312.21657072763030.783429272369743
841614.56778677567671.43221322432329
8589.70253111843646-1.70253111843646
861611.6309874175314.36901258246903
871111.1459107521002-0.145910752100214
88911.3866424352244-2.38664243522445
891617.8391226331453-1.83912263314527
901211.46393233678820.536067663211767
911411.97660424805052.02339575194953
92810.6731802604061-2.67318026040613
9399.57410215748894-0.574102157488939
941511.73691408048583.26308591951421
951113.6250891574027-2.62508915740272
962117.28891896926633.71108103073375
971413.22947622682170.77052377317829
981815.79061771587442.20938228412561
991211.71567772782050.284322272179452
1001312.67691158083840.323088419161647
1011514.56453680212230.435463197877748
1021211.08249869325090.917501306749067
1031914.47434167402694.52565832597313
1041514.07296302276980.92703697723024
1051113.0429391125752-2.04293911257523
1061110.59584377979510.404156220204941
1071012.3347421333432-2.33474213334316
1081314.7689187914377-1.76891879143766
1091514.77741971052390.222580289476144
110129.870094487758672.12990551224133
1111211.01056820037090.9894317996291
1121615.73437616827790.265623831722135
113915.5316216970419-6.53162169704191
1141817.58902674141590.410973258584075
115815.1511976184637-7.15119761846366
1161310.3709247748662.62907522513404
1171714.20027081012782.79972918987216
118911.0289289224772-2.02892892247722
1191513.18741048468571.8125895153143
12089.55441530664951-1.55441530664951
121711.1831641135043-4.18316411350431
1221211.3257221502730.674277849727017
1231415.0580201790477-1.05802017904769
124610.7598610359995-4.75986103599955
125810.1221506439949-2.12215064399493
1261712.43288086922134.56711913077873
127109.736874155497330.263125844502671
1281112.5602093198084-1.5602093198084
1291412.82577640753181.17422359246825
1301113.5974984017525-2.59749840175249
1311315.3986548064744-2.39865480647444
1321211.89889119465420.101108805345784
1331110.41551804098690.5844819590131
13499.41103884182004-0.411038841820042
1351212.0310324576761-0.0310324576761144
1362014.72964101493955.27035898506052
1371210.6585434428431.34145655715705
1381313.6210461793078-0.621046179307752
1391213.1591631531483-1.15916315314826
1401216.4919630614362-4.49196306143619
141914.5404641195754-5.54046411957543
1421515.5626788726532-0.562678872653223
1432421.53850443010262.46149556989742
14479.90590165480888-2.90590165480888
1451714.61752878396492.38247121603512
1461111.8636609159468-0.863660915946791
1471715.1041798951281.89582010487197
1481112.2580700525978-1.25807005259778
1491212.484315620769-0.484315620768967
1501414.455674976405-0.455674976404969
1511114.3163919694258-3.31639196942581
1521612.76198388090133.2380161190987
1532113.77452597435097.22547402564915
1541412.15118045434191.84881954565809
1552016.42385833465813.57614166534192
1561311.00607348201451.99392651798552
1571113.017226114997-2.01722611499701
1581513.90597226942491.0940277305751
1591917.87722250313981.12277749686019


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.6586587558789060.6826824882421870.341341244121094
120.5490776159068450.901844768186310.450922384093155
130.4264965738315520.8529931476631030.573503426168448
140.6006339398993250.798732120201350.399366060100675
150.7197084856523660.5605830286952680.280291514347634
160.6438287130863070.7123425738273860.356171286913693
170.7405565805428590.5188868389142830.259443419457141
180.665132587319710.669734825360580.33486741268029
190.7201819303002990.5596361393994020.279818069699701
200.6785187950610710.6429624098778580.321481204938929
210.7017831730099880.5964336539800250.298216826990012
220.7119441194557680.5761117610884630.288055880544232
230.6628299220881420.6743401558237160.337170077911858
240.7418158067834230.5163683864331530.258184193216577
250.7119035249029440.5761929501941120.288096475097056
260.6567277351105420.6865445297789160.343272264889458
270.6081824525741990.7836350948516030.391817547425801
280.5440327825072380.9119344349855230.455967217492762
290.4857764574496060.9715529148992120.514223542550394
300.4250273057824380.8500546115648760.574972694217562
310.5759146182667440.8481707634665130.424085381733256
320.5228264093577540.9543471812844910.477173590642246
330.5570047322424120.8859905355151770.442995267757588
340.666110276884410.667779446231180.33388972311559
350.6509332861156430.6981334277687140.349066713884357
360.7231490129625290.5537019740749420.276850987037471
370.7904013052934450.419197389413110.209598694706555
380.7734244920966410.4531510158067180.226575507903359
390.7451883042250580.5096233915498830.254811695774942
400.7218893344888050.5562213310223910.278110665511195
410.7592428619153790.4815142761692430.240757138084621
420.720686637051950.55862672589610.27931336294805
430.7048440327216760.5903119345566490.295155967278324
440.7453133883317340.5093732233365320.254686611668266
450.8151376532570310.3697246934859380.184862346742969
460.7999073139620980.4001853720758050.200092686037902
470.762943959149190.4741120817016190.237056040850809
480.8076550806761670.3846898386476670.192344919323833
490.7862332396069650.4275335207860690.213766760393035
500.8381432845132060.3237134309735880.161856715486794
510.9010291377906750.1979417244186490.0989708622093247
520.882767432809810.2344651343803790.11723256719019
530.8567870474430880.2864259051138240.143212952556912
540.8860587727159880.2278824545680240.113941227284012
550.8638180889455840.2723638221088330.136181911054416
560.8357324688891290.3285350622217420.164267531110871
570.8100396090225950.379920781954810.189960390977405
580.7988142259452120.4023715481095760.201185774054788
590.8007696741692960.3984606516614080.199230325830704
600.7814825319164630.4370349361670740.218517468083537
610.7572950387479820.4854099225040350.242704961252018
620.7320250746849610.5359498506300770.267974925315039
630.7264162592472620.5471674815054760.273583740752738
640.8172955478426040.3654089043147910.182704452157396
650.798701746038640.402596507922720.20129825396136
660.7915471958048910.4169056083902180.208452804195109
670.7873407850949520.4253184298100960.212659214905048
680.753046613478960.493906773042080.24695338652104
690.7229229884556940.5541540230886120.277077011544306
700.693624268696030.612751462607940.30637573130397
710.6658624291667320.6682751416665370.334137570833268
720.6623850603075920.6752298793848160.337614939692408
730.6316582940280410.7366834119439180.368341705971959
740.6640974875673070.6718050248653860.335902512432693
750.6765490256370780.6469019487258440.323450974362922
760.6374356249767220.7251287500465560.362564375023278
770.6702650173408820.6594699653182350.329734982659118
780.6339272719761220.7321454560477560.366072728023878
790.6074925155820310.7850149688359380.392507484417969
800.567550064765150.86489987046970.43244993523485
810.5226314704290640.9547370591418710.477368529570936
820.4851035983444010.9702071966888010.514896401655599
830.4442708651268320.8885417302536640.555729134873168
840.4127513089696730.8255026179393460.587248691030327
850.3823112611315860.7646225222631710.617688738868414
860.4667196737644920.9334393475289830.533280326235508
870.4218084827839230.8436169655678470.578191517216077
880.402884843412740.805769686825480.59711515658726
890.3786271902203810.7572543804407610.62137280977962
900.3365129124126010.6730258248252030.663487087587399
910.3211736824242680.6423473648485360.678826317575732
920.3147345791162510.6294691582325020.685265420883749
930.2740809957934470.5481619915868950.725919004206553
940.2978233901237590.5956467802475170.702176609876241
950.2918316633181950.583663326636390.708168336681805
960.3265834008028390.6531668016056790.67341659919716
970.2892277276930720.5784554553861450.710772272306928
980.271286586975950.54257317395190.72871341302405
990.2333286528114510.4666573056229030.766671347188549
1000.1980739021046150.396147804209230.801926097895385
1010.1678103689900860.3356207379801720.832189631009914
1020.1461978812874390.2923957625748770.853802118712561
1030.2164640742953970.4329281485907940.783535925704603
1040.1949274151486860.3898548302973730.805072584851314
1050.1737669837015490.3475339674030980.826233016298451
1060.1484527601881240.2969055203762490.851547239811876
1070.136855504302670.2737110086053390.86314449569733
1080.1197936287532190.2395872575064370.880206371246781
1090.0977258695950770.1954517391901540.902274130404923
1100.09959940734928110.1991988146985620.900400592650719
1110.08860832648395680.1772166529679140.911391673516043
1120.07048582653641070.1409716530728210.929514173463589
1130.1746639185016960.3493278370033930.825336081498304
1140.1526608296537940.3053216593075870.847339170346206
1150.3391872165287380.6783744330574750.660812783471262
1160.3477801381892780.6955602763785560.652219861810722
1170.4022268031290210.8044536062580410.597773196870979
1180.3598855599141510.7197711198283020.640114440085849
1190.344972814650850.6899456293016990.65502718534915
1200.3109606907465720.6219213814931440.689039309253428
1210.3192481080485980.6384962160971970.680751891951402
1220.3156591366603520.6313182733207030.684340863339648
1230.2678629458065170.5357258916130340.732137054193483
1240.3459437439870180.6918874879740370.654056256012982
1250.2988756399406140.5977512798812270.701124360059386
1260.4347394482629360.8694788965258720.565260551737064
1270.3883599497902970.7767198995805950.611640050209703
1280.3405681507999830.6811363015999670.659431849200017
1290.2927617950389380.5855235900778760.707238204961062
1300.2879146417060110.5758292834120230.712085358293989
1310.2576743916177990.5153487832355970.742325608382201
1320.2069042905135050.4138085810270110.793095709486495
1330.164071752182260.328143504364520.83592824781774
1340.1249103850583550.2498207701167110.875089614941645
1350.09248218779907130.1849643755981430.907517812200929
1360.1976047797747030.3952095595494060.802395220225297
1370.2437178145522360.4874356291044720.756282185447764
1380.243631903494260.487263806988520.75636809650574
1390.1851622482002080.3703244964004160.814837751799792
1400.1833602592321140.3667205184642270.816639740767886
1410.3229743322185960.6459486644371910.677025667781404
1420.278027880719270.5560557614385410.72197211928073
1430.2138181881120.4276363762240.786181811888
1440.1702954374011750.340590874802350.829704562598825
1450.1870681795967230.3741363591934450.812931820403277
1460.1295286817643590.2590573635287180.870471318235641
1470.07545849878232030.1509169975646410.92454150121768
1480.04135692045789310.08271384091578620.958643079542107


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 level10.0072463768115942OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906048190vsc4rq5xo5m815/10zl1r1290604831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906048190vsc4rq5xo5m815/10zl1r1290604831.ps (open in new window)


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906048190vsc4rq5xo5m815/76uko1290604831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906048190vsc4rq5xo5m815/76uko1290604831.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12906048190vsc4rq5xo5m815/86uko1290604831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12906048190vsc4rq5xo5m815/86uko1290604831.ps (open in new window)


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


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by