Home » date » 2010 » Nov » 23 »

*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 21:18:19 +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/t12905470015owjiityj9125kq.htm/, Retrieved Tue, 23 Nov 2010 22:16:41 +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/t12905470015owjiityj9125kq.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 «
11 14 11 12 12 11 11 7 8 11 11 6 17 8 14 11 12 10 8 12 11 8 12 9 21 11 10 12 7 12 11 10 11 4 22 11 11 11 11 11 11 16 12 7 10 11 11 13 7 13 11 13 14 12 10 11 12 16 10 8 11 8 11 10 15 11 12 10 8 14 11 11 11 8 10 11 4 15 4 14 11 9 9 9 14 11 8 11 8 11 11 8 17 7 10 11 14 17 11 13 11 15 11 9 7 11 16 18 11 14 11 9 14 13 12 11 14 10 8 14 11 11 11 8 11 11 8 15 9 9 11 9 15 6 11 11 9 13 9 15 11 9 16 9 14 11 9 13 6 13 11 10 9 6 9 11 16 18 16 15 11 11 18 5 10 11 8 12 7 11 11 9 17 9 13 11 16 9 6 8 11 11 9 6 20 11 16 12 5 12 11 12 18 12 10 11 12 12 7 10 11 14 18 10 9 11 9 14 9 14 11 10 15 8 8 11 9 16 5 14 11 10 10 8 11 11 12 11 8 13 11 14 14 10 9 11 14 9 6 11 11 10 12 8 15 11 14 17 7 11 11 16 5 4 10 11 9 12 8 14 11 10 12 8 18 11 6 6 4 14 11 8 24 20 11 11 13 12 8 12 11 10 12 8 13 11 8 14 6 9 11 7 7 4 10 11 15 13 8 15 11 9 12 9 20 11 10 13 6 12 11 12 14 7 12 11 13 8 9 14 11 10 11 5 13 11 11 9 5 11 11 8 11 8 17 11 9 13 8 12 11 13 10 6 13 11 11 11 8 14 11 8 1 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Depression[t] = + 17.7769114656762 -0.329756031349403Month[t] -0.0754019001049189Doubts[t] -0.0115990201581907Expectations[t] -0.0388365785511978Criticism[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.77691146567627.0123822.53510.0122210.00611
Month-0.3297560313494030.625842-0.52690.5990070.299503
Doubts-0.07540190010491890.090844-0.830.4077920.203896
Expectations-0.01159902015819070.088215-0.13150.8955590.44778
Criticism-0.03883657855119780.108942-0.35650.7219530.360977


Multiple Linear Regression - Regression Statistics
Multiple R0.094583923349095
R-squared0.00894611855610749
Adjusted R-squared-0.0163036618628452
F-TEST (value)0.354304806127837
F-TEST (DF numerator)4
F-TEST (DF denominator)157
p-value0.84074436535968
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.16922646287394
Sum Squared Residuals1576.90743055793


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11212.5003403550095-0.500340355009515
21112.9282884501618-1.92828845016178
31413.18930774910450.81069225089553
41212.8180894895823-0.818089489582292
52113.05766247113447.94233752886561
61212.9845318280269-0.984531828026946
72213.11264058383878.88735941616127
81112.7653826338754-1.76538263387543
91012.5321204273974-2.53212042739743
101312.89753090776380.102469092236164
111012.5409451946398-2.54094519463982
12812.6708222115308-4.67082221153075
131513.03042491274141.96957508725862
141412.81808948958231.18191051041771
151012.8818923695290-2.88189236952902
161413.51865590383550.481344096164519
171413.01705763150400.982942368495959
181113.1080980698438-2.10809806984378
191013.0773405274458-3.07734052744583
201312.46958281261150.530417187388474
21712.5414481905581-5.54144819055815
221412.30717999224351.69282000775650
231212.8037162165083-0.803716216508297
241412.66728568937251.33271431062755
251112.8818923695290-1.88189236952902
26913.0228654106598-4.02286541065982
271113.0639732462085-2.06397324620849
281512.97066155087132.02933844912872
291412.93586449039671.06413550960329
301313.0871712865249-0.087171286524872
31913.0581654670527-4.05816546705272
321512.11299709948752.88700290051249
331012.9172089640753-2.91720896407528
341113.1353356282368-2.13533562823678
351312.92426547023850.0757345297614842
36812.6057540664232-4.6057540664232
372012.98276356694787.0172364330522
381212.6097935844998-0.609793584499828
391012.5699510141120-2.56995101411198
401012.8337280278171-2.83372802781711
41912.4968203710045-3.49682037100453
421412.95906253071311.04093746928691
43812.9108981890012-4.91089818900118
441413.09121080460150.908789195398502
451112.9688932897921-1.96889328979213
461312.80649046942410.193509530575899
47912.5432164516373-3.54321645163730
481112.7565578666330-1.75655786663304
491512.94569524947572.05430475052425
501112.6249291268163-1.62492912681632
511012.7298233041584-2.72982330415836
521413.02109714958070.978902850419333
531812.94569524947575.05430475052425
541413.47224328504940.527756714950641
551112.4912718651729-1.49127186517292
561212.719489549161-0.719489549160992
571312.94569524947570.0543047505242517
58913.1509741664716-4.1509741664716
591013.3852423647863-3.38524236478625
601512.55708672879302.44291327120704
612012.98226057102957.01773942897053
621213.0117693864200-1.01176938641995
631212.8105299875007-0.810529987500727
641412.72704905124261.27295094875744
651313.0738040052875-0.0738040052875324
661113.021600145499-2.02160014549900
671713.10809806984383.89190193015622
681213.0094981294225-1.00949812942248
691312.82036074657980.179639253420231
701412.88189236952901.11810763047098
711313.1353356282368-0.135335628236784
721513.09473078860641.90526921139356
731312.94746351055490.0525364894451028
741012.3825818923484-2.38258189234842
751113.0639732462085-2.06397324620849
761912.94569524947576.05430475052425
771312.71016178600030.289838213999722
781712.73285683039834.26714316960167
791312.81808948958230.181910510417708
80912.9363674863150-3.93636748631503
811112.5548154717955-1.55481547179549
821013.2589018700536-3.25890187005361
83912.7832924291077-3.78329242910772
841212.9724298119504-0.972429811950427
851212.8069934653424-0.806993465342429
861312.86273384728930.137266152710736
871313.0738040052875-0.0738040052875324
881212.6788847095306-0.678884709530645
891512.51547589732602.48452410267404
902212.98453182802699.01546817197305
911312.62088960873970.379110391260309
921513.44677398773551.5532260122645
931313.021600145499-0.0216001454989950
941512.98857134610362.01142865389643
951012.9550230126365-2.95502301263646
961112.6859577538472-1.68595775384724
971612.43124922997873.56875077002134
981112.4945491140071-1.49454911400706
991113.0599337281319-2.05993372813187
1001012.9340962293176-2.93409622931756
1011012.8332250318988-2.83322503189878
1021613.24957410689292.7504258931071
1031212.8622308513709-0.862230851370937
1041112.9840288321086-1.98402883210862
1051612.57801351211193.42198648788813
1061912.77219640486796.22780359513214
1071113.1585336685532-2.15853366855317
1081612.93182497232013.06817502767992
1091512.49278085292792.50721914707209
1102412.721760806158511.2782391938415
1111413.13533562823680.864664371763216
1121512.89475665484802.10524334515197
1131113.0147863745066-2.01478637450657
1141512.98579709318782.01420290681223
1151213.1771891948746-1.17718919487459
1161013.201409765181-3.20140976518099
1171413.18930774910450.81069225089553
1181312.98276356694780.0172364330522028
119912.5704540100303-3.5704540100303
1201513.07203574420841.92796425579162
1211513.08363476436661.91636523563343
1221412.90912992792201.09087007207797
1231112.5043798730861-1.50437987308610
124813.2437663277371-5.24376632773712
1251112.2769089076105-1.27690890761052
1261112.8122982485799-1.81229824857988
127813.2750434042068-5.27504340420676
1281012.8818923695290-2.88189236952902
1291112.8836606306082-1.88366063060817
1301312.65568666921430.344313330785737
1311112.7421845935590-1.74218459355904
1322013.02109714958076.97890285041933
1331013.1492059053925-3.14920590539245
1341513.28664242436491.71335757563505
1351212.9456952494757-0.945695249475748
1361412.54902423079311.45097576920693
1372312.797162706263410.2028372937366
1381412.74445585055651.25554414944348
1391613.05766247113442.94233752886561
1401112.525306656405-1.52530665640500
1411212.6400481309794-0.640048130979447
1421012.6824212316889-2.68242123168894
1431412.03886046454341.96113953545659
1441212.7431905853957-0.743190585395701
1451212.5449847127164-0.544984712716445
1461112.5825560261068-1.58255602610682
1471212.9242654702385-0.924265470238516
1481313.0715327482901-0.0715327482900557
1491112.9822605710295-1.98226057102947
1501912.99562785226686.00437214773319
1511213.1446633913975-1.14466339139750
1521712.44688776821354.55311223178653
153912.8047387464983-3.80473874649831
1541213.0755722663667-1.07557226636668
1551912.58331829534936.41668170465069
1561813.08717128652494.91282871347513
1571512.65568666921432.34431333078574
1581412.60701933158401.39298066841598
1591112.1013980793293-1.10139807932932
1601112.6443303842269-1.64433038422688
1611211.08180541665380.91819458334616
162812.5909729167308-4.59097291673082


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.9767709882208870.04645802355822520.0232290117791126
90.9552930771120680.0894138457758650.0447069228879325
100.9213490510336380.1573018979327230.0786509489663615
110.8724498804780840.2551002390438310.127550119521916
120.8489561747228540.3020876505542930.151043825277146
130.782010867777030.435978264445940.21798913222297
140.7051176957330520.5897646085338970.294882304266948
150.7251405601440840.5497188797118320.274859439855916
160.7816084313663980.4367831372672040.218391568633602
170.7183690376560080.5632619246879830.281630962343992
180.7306458319664590.5387083360670820.269354168033541
190.7069143393997650.5861713212004710.293085660600235
200.7338273346399860.5323453307200290.266172665360014
210.7704250436505540.4591499126988920.229574956349446
220.814900650216180.370198699567640.18509934978382
230.764612633760610.4707747324787790.235387366239390
240.7262652717807420.5474694564385160.273734728219258
250.6872548455391510.6254903089216980.312745154460849
260.713458972386270.5730820552274590.286541027613730
270.6830350764647920.6339298470704160.316964923535208
280.6513987484138570.6972025031722860.348601251586143
290.6036099779247880.7927800441504230.396390022075212
300.5434822550964050.913035489807190.456517744903595
310.593564277844260.8128714443114790.406435722155739
320.6275092186070250.744981562785950.372490781392975
330.6000183892649950.799963221470010.399981610735005
340.5651417676597920.8697164646804150.434858232340208
350.5074184765764630.9851630468470730.492581523423537
360.5093965345107990.9812069309784020.490603465489201
370.7409116752946230.5181766494107550.259088324705377
380.6987713255408650.6024573489182710.301228674459136
390.6699906476513490.6600187046973030.330009352348651
400.6473552973218190.7052894053563630.352644702678181
410.6296195146740160.7407609706519670.370380485325984
420.5842380649067380.8315238701865240.415761935093262
430.6338891989362920.7322216021274160.366110801063708
440.5948852497113110.8102295005773790.405114750288689
450.5624123405633190.8751753188733610.437587659436681
460.5131253382261960.9737493235476090.486874661773804
470.5031614727985580.9936770544028850.496838527201442
480.4606506852273590.9213013704547190.539349314772641
490.4353647933756150.870729586751230.564635206624385
500.3942961668659630.7885923337319260.605703833134037
510.3694912236605370.7389824473210730.630508776339463
520.3274195604915260.6548391209830520.672580439508474
530.4080905776687700.8161811553375390.59190942233123
540.3637088115983720.7274176231967440.636291188401628
550.3276662649858170.6553325299716330.672333735014183
560.2867443402822790.5734886805645570.713255659717722
570.2465456758117990.4930913516235980.753454324188201
580.2753671941297630.5507343882595250.724632805870237
590.2922722540261370.5845445080522740.707727745973863
600.2968500309393470.5937000618786930.703149969060654
610.4756505025477410.9513010050954830.524349497452259
620.4320239823153150.864047964630630.567976017684685
630.3891464945945760.7782929891891520.610853505405424
640.3521706014689720.7043412029379430.647829398531028
650.3097890052578800.6195780105157610.69021099474212
660.2842833865723420.5685667731446840.715716613427658
670.3003937720243540.6007875440487070.699606227975646
680.2647169514481250.5294339028962490.735283048551875
690.2301085515849190.4602171031698390.76989144841508
700.2006308770377230.4012617540754450.799369122962277
710.1695958775216590.3391917550433180.830404122478341
720.1498220518115500.2996441036230990.85017794818845
730.1243368389810390.2486736779620790.87566316101896
740.1131002877764150.226200575552830.886899712223585
750.1000108065361540.2000216130723080.899989193463846
760.1684259489133470.3368518978266950.831574051086653
770.1461617930285010.2923235860570030.853838206971499
780.1743302539702350.3486605079404690.825669746029765
790.1462856249378460.2925712498756920.853714375062154
800.1604232360027860.3208464720055720.839576763997214
810.1403004222708370.2806008445416740.859699577729163
820.1484922288139780.2969844576279550.851507771186022
830.1605831236920930.3211662473841850.839416876307908
840.1365765795557830.2731531591115650.863423420444217
850.1156561144239680.2313122288479360.884343885576032
860.09707615095558980.1941523019111800.90292384904441
870.0791650749982580.1583301499965160.920834925001742
880.06463384188090120.1292676837618020.935366158119099
890.05938537018695560.1187707403739110.940614629813044
900.2281106528412010.4562213056824030.771889347158799
910.1986157861647200.3972315723294410.80138421383528
920.1785729277862350.357145855572470.821427072213765
930.1500833652285000.3001667304569990.8499166347715
940.1351464318059030.2702928636118060.864853568194097
950.1327063703846510.2654127407693020.867293629615349
960.1169419805826460.2338839611652910.883058019417354
970.1228289645505170.2456579291010350.877171035449483
980.1079052572977770.2158105145955550.892094742702223
990.09616660969751740.1923332193950350.903833390302483
1000.0943676818923920.1887353637847840.905632318107608
1010.09179625129315930.1835925025863190.90820374870684
1020.08631426141276540.1726285228255310.913685738587235
1030.07184473383130270.1436894676626050.928155266168697
1040.06292825709548870.1258565141909770.937071742904511
1050.06366080652215480.1273216130443100.936339193477845
1060.1093369321650750.2186738643301510.890663067834925
1070.09714929705332960.1942985941066590.90285070294667
1080.09432752052962470.1886550410592490.905672479470375
1090.0846180884043150.169236176808630.915381911595685
1100.4805204089054040.9610408178108080.519479591094596
1110.4346538495856680.8693076991713360.565346150414332
1120.4035576234856070.8071152469712130.596442376514393
1130.3693644146382130.7387288292764270.630635585361787
1140.3363288836176930.6726577672353860.663671116382307
1150.294868614882990.589737229765980.70513138511701
1160.2963878032818360.5927756065636730.703612196718164
1170.2547227614368810.5094455228737620.745277238563119
1180.2151793815245370.4303587630490750.784820618475463
1190.2310603746872980.4621207493745960.768939625312702
1200.2087800688017040.4175601376034090.791219931198295
1210.1918967323657590.3837934647315170.808103267634241
1220.1613736390381500.3227472780763010.83862636096185
1230.1381189556223990.2762379112447980.8618810443776
1240.1684658826041350.3369317652082710.831534117395865
1250.1400871714319360.2801743428638730.859912828568064
1260.1259304292310520.2518608584621040.874069570768948
1270.1815727143524590.3631454287049190.81842728564754
1280.1775350862729630.3550701725459260.822464913727037
1290.1614018698052160.3228037396104330.838598130194784
1300.1283912561380910.2567825122761820.871608743861909
1310.1108983742834080.2217967485668160.889101625716592
1320.2116301120250590.4232602240501180.788369887974941
1330.2223211162331670.4446422324663350.777678883766832
1340.1840265582056490.3680531164112970.815973441794351
1350.1517975122174290.3035950244348580.848202487782571
1360.1192756382231070.2385512764462130.880724361776893
1370.5524331754607550.895133649078490.447566824539245
1380.4914550358155260.9829100716310520.508544964184474
1390.473950596603190.947901193206380.52604940339681
1400.4155268126567270.8310536253134530.584473187343273
1410.3453421432492600.6906842864985190.65465785675074
1420.3362558706936630.6725117413873260.663744129306337
1430.2726112007702820.5452224015405640.727388799229718
1440.2109786125397190.4219572250794370.789021387460281
1450.1654211423919520.3308422847839040.834578857608048
1460.1313652334203380.2627304668406770.868634766579662
1470.09978364061143750.1995672812228750.900216359388562
1480.06605700404926950.1321140080985390.93394299595073
1490.05133074842322340.1026614968464470.948669251576777
1500.09465330881310930.1893066176262190.90534669118689
1510.05806349249027240.1161269849805450.941936507509728
1520.0535595176741360.1071190353482720.946440482325864
1530.1663279160225670.3326558320451340.833672083977433
1540.210789761155010.421579522310020.78921023884499


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905470015owjiityj9125kq/16hmf1290547088.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905470015owjiityj9125kq/16hmf1290547088.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905470015owjiityj9125kq/5zq301290547088.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905470015owjiityj9125kq/5zq301290547088.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905470015owjiityj9125kq/6rz2l1290547088.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905470015owjiityj9125kq/6rz2l1290547088.ps (open in new window)


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


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


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


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