Home » date » 2010 » Dec » 01 »

*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, 01 Dec 2010 09:37:13 +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/Dec/01/t1291196394fc0h0ycukk3keej.htm/, Retrieved Wed, 01 Dec 2010 10:39:54 +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/Dec/01/t1291196394fc0h0ycukk3keej.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 «
4 4 3 3 2 2 2 2 2 4 2 4 2 3 1 1 2 3 3 2 2 1 2 2 5 4 4 3 4 3 2 2 4 4 4 2 2 1 1 2 4 4 4 4 2 3 3 3 4 4 4 4 4 4 2 2 1 1 2 3 4 4 2 3 3 2 3 3 4 4 3 4 1 2 2 2 2 3 2 2 1 3 1 2 4 3 4 3 4 3 4 4 1 2 2 2 4 4 4 3 5 4 4 4 4 4 4 3 4 4 3 3 4 4 3 3 2 2 2 2 2 2 2 2 4 4 2 4 4 3 4 3 2 2 1 3 3 2 4 2 4 4 4 4 3 3 1 3 2 2 2 2 4 4 3 3 4 4 4 4 3 3 3 4 1 1 1 2 2 2 3 1 4 2 2 2 2 2 1 3 3 4 3 3 4 3 4 4 1 2 1 2 3 2 4 3 4 4 4 4 1 1 1 2 4 5 4 2 3 2 4 3 1 3 2 2 1 4 4 4 4 4 3 3 4 3 2 3 4 4 4 4 2 2 2 4 4 3 4 4 2 2 2 2 4 4 4 4 5 5 5 4 3 3 4 4 2 1 1 2 4 3 3 3 4 4 4 3 2 2 1 2 3 3 3 4 1 1 1 1 4 3 4 3 4 2 4 3 4 3 2 2 4 4 4 2 3 3 3 3 4 4 4 3 3 4 4 3 3 3 4 3 2 2 1 3 1 1 2 2 2 2 1 2 4 3 3 3 3 4 3 3 5 1 3 2 1 1 1 2 3 3 3 3 2 2 2 2 3 2 3 3 4 3 4 3 3 2 2 2 3 2 2 3 4 3 3 3 4 4 4 4 4 4 4 4 2 2 4 3 2 2 2 2 1 1 1 1 1 2 2 2 4 3 4 3 2 3 3 3 4 4 4 5 3 4 4 4 5 4 3 5 1 NA 2 2 1 1 1 1 2 3 2 3 4 2 2 3 4 3 4 4 3 3 2 2 4 2 1 2 4 3 2 3 5 2 4 4 1 2 2 2 4 3 3 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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Q4 [t] = + 1.07639616086863 + 0.15332101187467Q1[t] + 0.230797317115352Q2[t] + 0.247490376625303Q3[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.076396160868630.1696586.344500
Q10.153321011874670.0647142.36920.01910.00955
Q20.2307973171153520.0725523.18120.0017830.000891
Q30.2474903766253030.0680653.63610.000380.00019


Multiple Linear Regression - Regression Statistics
Multiple R0.679846065001826
R-squared0.462190672098467
Adjusted R-squared0.451434485540436
F-TEST (value)42.9697523006786
F-TEST (DF numerator)3
F-TEST (DF denominator)150
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.638029844270637
Sum Squared Residuals61.062312327002


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.35534060670463-0.355340606704631
222.33961357209929-0.339613572099286
342.801208206329991.19879179367001
412.32292051258934-1.32292051258934
522.81790126583994-0.817901265839942
622.10881625498393-0.108816254983934
733.75615199520461-0.756151995204607
822.87705291296398-0.877052912963978
923.60283098332994-1.60283098332994
1021.861325878358630.138674121641370
1143.602830983329940.397169016670063
1232.817901265839940.182098734160058
1343.602830983329940.397169016670063
1423.10785023007933-1.10785023007933
1531.955495243109261.04450475689074
1633.10785023007933-0.107850230079330
1732.740424960599260.259575039400741
1843.355340606704630.644659393295366
1922.18629256022462-0.186292560224616
2022.57041088921464-0.570410889214638
2122.16959950071466-0.169599500714665
2233.37203366621458-0.372033666214585
2343.372033666214580.627966333785415
2422.18629256022462-0.186292560224616
2533.60283098332994-0.602830983329937
2643.756151995204610.243848004795393
2733.60283098332994-0.602830983329937
2833.35534060670463-0.355340606704634
2933.35534060670463-0.355340606704634
3022.33961357209929-0.339613572099286
3122.33961357209929-0.339613572099286
3243.107850230079330.89214976992067
3333.37203366621458-0.372033666214585
3432.092123195473980.907876804526017
3522.98791533722456-0.987915337224563
3643.602830983329940.397169016670063
3732.476241524464000.523758475535995
3822.33961357209929-0.339613572099286
3933.35534060670463-0.355340606704634
4043.602830983329940.397169016670063
4142.971222277714611.02877772228539
4221.708004866483960.29199513351604
4312.58710394872459-1.58710394872459
4422.64625559584863-0.646255595848626
4532.092123195473980.907876804526017
4633.20201959482996-0.202019594829964
4743.372033666214580.627966333785415
4821.938802183599310.0611978164006874
4932.987915337224560.0120846627754373
5043.602830983329940.397169016670063
5121.708004866483960.29199513351604
5223.83362830044529-1.83362830044529
5332.987915337224560.0120846627754373
5422.41708987733997-0.417089877339968
5543.142867947705930.857132052294073
5633.35534060670463-0.355340606704634
5732.877052912963980.122947087036022
5843.602830983329940.397169016670063
5942.339613572099291.66038642790071
6043.372033666214580.627966333785415
6122.33961357209929-0.339613572099286
6243.602830983329940.397169016670063
6344.23443968894526-0.234439688945263
6443.218712654339920.781287345660085
6521.861325878358630.138674121641370
6633.12454328958928-0.124543289589282
6733.60283098332994-0.602830983329937
6822.09212319547398-0.0921231954739826
6942.971222277714611.02877772228539
7011.70800486648396-0.70800486648396
7133.37203366621458-0.372033666214585
7233.14123634909923-0.141236349099233
7322.87705291296398-0.877052912963978
7423.60283098332994-1.60283098332994
7532.971222277714610.0287777222853885
7633.60283098332994-0.602830983329937
7733.44950997145527-0.449509971455267
7833.21871265433991-0.218712654339915
7932.092123195473980.907876804526017
8021.955495243109260.0445047568907363
8122.09212319547398-0.0921231954739826
8233.12454328958928-0.124543289589282
8333.20201959482996-0.202019594829964
8422.81626966723325-0.816269667233247
8521.708004866483960.29199513351604
8632.971222277714610.0287777222853885
8722.33961357209929-0.339613572099286
8832.740424960599260.259575039400741
8933.37203366621458-0.372033666214585
9022.49293458397396-0.492934583973956
9132.492934583973960.507065416026044
9233.12454328958928-0.124543289589282
9343.602830983329940.397169016670063
9443.602830983329940.397169016670063
9532.834594325349890.165405674650107
9622.33961357209929-0.339613572099286
9711.70800486648396-0.70800486648396
9822.18629256022462-0.186292560224616
9933.37203366621458-0.372033666214585
10032.817901265839940.182098734160058
10153.602830983329941.39716901667006
10243.449509971455270.550490028544733
10353.508661618579301.49133838142070
10422.70800486648396-0.70800486648396
10510.5704108892146380.429589110785362
10632.646255595848630.353744404151374
10732.372033666214580.627966333785415
10844.72373190108931-0.723731901089308
10922.39876521922332-0.398765219223323
11021.877052912963980.122947087036022
11132.294557360973900.705442639026097
11244.18629256022462-0.186292560224616
11322.12454328958928-0.124543289589282
11432.893745972473930.106254027526071
11532.124543289589280.875456710410718
11643.29618895958060.703811040419403
11744.33961357209929-0.339613572099286
11822.60283098332994-0.602830983329937
11934.21871265433991-1.21871265433991
12021.971222277714610.0287777222853885
12132.602830983329940.397169016670063
12244.58710394872459-0.58710394872459
12321.372033666214580.627966333785415
12443.355340606704630.644659393295366
12543.955495243109260.0445047568907363
12622.35534060670463-0.355340606704634
12733.60283098332994-0.602830983329937
12832.492934583973960.507065416026044
12931.708004866483961.29199513351604
13032.107850230079330.89214976992067
13143.987915337224560.0120846627754373
13233.33961357209929-0.339613572099286
13321.723731901089310.276268098910692
13433.12454328958928-0.124543289589282
13532.339613572099290.660386427900714
13632.372033666214580.627966333785415
13744.12454328958928-0.124543289589282
13832.449509971455270.550490028544733
13943.124543289589280.875456710410718
14043.602830983329940.397169016670063
14144.37203366621458-0.372033666214585
14233.35534060670463-0.355340606704634
14333.72373190108931-0.723731901089308
14421.492934583973960.507065416026044
14533.70800486648396-0.70800486648396
14611.33961357209929-0.339613572099286
14721.355340606704630.644659393295366
14843.602830983329940.397169016670063
14943.971222277714610.0287777222853885
15032.971222277714610.0287777222853885
15132.372033666214580.627966333785415
15244.49293458397396-0.492934583973956
15322.35534060670463-0.355340606704634
15443.646255595848630.353744404151374
1553NANA
1563NANA


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.9536404096401610.09271918071967770.0463595903598389
80.9114041578587940.1771916842824120.0885958421412058
90.9525785961167960.0948428077664080.047421403883204
100.9345943164853840.1308113670292320.0654056835146162
110.9602302211524650.07953955769507070.0397697788475354
120.9372452614207020.1255094771585960.0627547385792978
130.9402460957777920.1195078084444160.0597539042222079
140.9276815864563930.1446368270872140.0723184135436072
150.9345667828390050.1308664343219890.0654332171609947
160.9322810518567160.1354378962865690.0677189481432844
170.9121888343460240.1756223313079510.0878111656539755
180.9430521756470280.1138956487059430.0569478243529717
190.929425046229220.1411499075415590.0705749537707797
200.9179147009911340.1641705980177320.0820852990088658
210.888578567486490.2228428650270220.111421432513511
220.8572579517032010.2854840965935970.142742048296799
230.8621125524174830.2757748951650340.137887447582517
240.830866521444350.3382669571113010.169133478555650
250.8107445897840240.3785108204319510.189255410215976
260.7932876397911080.4134247204177840.206712360208892
270.7726497960266820.4547004079466370.227350203973318
280.7278690198159890.5442619603680220.272130980184011
290.6801442827816030.6397114344367940.319855717218397
300.6342802919906660.7314394160186680.365719708009334
310.5861436348780960.8277127302438070.413856365121904
320.7338712767823830.5322574464352330.266128723217617
330.692845350573580.614309298852840.30715464942642
340.7524669911917530.4950660176164930.247533008808247
350.7874516367977710.4250967264044580.212548363202229
360.7794895033716340.4410209932567310.220510496628366
370.7671801923129070.4656396153741860.232819807687093
380.7324612876184520.5350774247630950.267538712381548
390.693558512698960.6128829746020790.306441487301040
400.6818901824254550.636219635149090.318109817574545
410.7654409973916710.4691180052166580.234559002608329
420.7300815739135420.5398368521729160.269918426086458
430.8799501387803360.2400997224393270.120049861219664
440.8728281483518470.2543437032963070.127171851648153
450.8951315491666310.2097369016667380.104868450833369
460.8717119620370910.2565760759258180.128288037962909
470.882609564905170.234780870189660.11739043509483
480.8559096434133070.2881807131733860.144090356586693
490.8279517049003280.3440965901993440.172048295099672
500.8141251453282910.3717497093434180.185874854671709
510.785748514477630.4285029710447410.214251485522370
520.939700332072590.1205993358548190.0602996679274097
530.924201375924570.1515972481508590.0757986240754297
540.9122146178816410.1755707642367180.087785382118359
550.9315415090126830.1369169819746340.0684584909873169
560.919435866653330.1611282666933400.0805641333466699
570.9018566389166170.1962867221667670.0981433610833833
580.892317205191430.215365589617140.10768279480857
590.9716933382490560.05661332350188840.0283066617509442
600.9722827043153760.05543459136924770.0277172956846238
610.9664556095131240.06708878097375180.0335443904868759
620.9613848124626580.07723037507468470.0386151875373424
630.9530901288817630.09381974223647340.0469098711182367
640.9586306828990120.08273863420197540.0413693171009877
650.9478910452117290.1042179095765420.0521089547882711
660.9348009037994640.1303981924010710.0651990962005357
670.9339801170393740.1320397659212520.0660198829606259
680.917888804911810.1642223901763800.0821111950881902
690.9423835707243870.1152328585512260.057616429275613
700.9452715969040960.1094568061918090.0547284030959045
710.936056111760710.1278877764785790.0639438882392895
720.9205080739896950.1589838520206100.0794919260103051
730.9366541704365660.1266916591268690.0633458295634343
740.9867980693352820.02640386132943680.0132019306647184
750.9823037067105710.03539258657885780.0176962932894289
760.9835863866937010.03282722661259720.0164136133062986
770.9825051218066790.03498975638664280.0174948781933214
780.9778538851169120.04429222976617630.0221461148830881
790.9846643176073830.03067136478523480.0153356823926174
800.980301971275810.03939605744838060.0196980287241903
810.9740050000387670.05198999992246610.0259949999612331
820.967169711759350.06566057648129940.0328302882406497
830.960985390004440.07802921999111870.0390146099955593
840.9674626607891940.06507467842161120.0325373392108056
850.9636662715289890.07266745694202210.0363337284710111
860.9532811008553890.09343779828922230.0467188991446111
870.9436053881870490.1127892236259020.056394611812951
880.9316692668468430.1366614663063140.0683307331531572
890.9268121379318760.1463757241362470.0731878620681235
900.920705264298260.1585894714034810.0792947357017403
910.9156023336968640.1687953326062730.0843976663031364
920.9001629014760880.1996741970478240.099837098523912
930.884708398026760.2305832039464800.115291601973240
940.867083294119850.2658334117603010.132916705880151
950.8416647481657990.3166705036684030.158335251834202
960.8176660021371990.3646679957256020.182333997862801
970.8149557870557120.3700884258885770.185044212944288
980.7823829859939640.4352340280120730.217617014006036
990.7734403297247860.4531193405504280.226559670275214
1000.7373546934194220.5252906131611560.262645306580578
1010.8484648079924460.3030703840151090.151535192007554
1020.8367936283197440.3264127433605120.163206371680256
1030.9267761312382780.1464477375234450.0732238687617223
1040.9275211601852630.1449576796294740.0724788398147369
1050.919900745419090.1601985091618210.0800992545809105
1060.9032113338177590.1935773323644820.096788666182241
1070.8961186169005450.2077627661989110.103881383099455
1080.9077429138888040.1845141722223910.0922570861111957
1090.9065129998748170.1869740002503660.0934870001251832
1100.8838323795505670.2323352408988670.116167620449433
1110.8787556419247580.2424887161504840.121244358075242
1120.850650222852050.2986995542959020.149349777147951
1130.8230860099406570.3538279801186860.176913990059343
1140.7854937862567110.4290124274865780.214506213743289
1150.8044770201463620.3910459597072770.195522979853638
1160.8433341964706530.3133316070586940.156665803529347
1170.8178652339160090.3642695321679830.182134766083991
1180.8193428421233260.3613143157533470.180657157876674
1190.9113467308300360.1773065383399280.0886532691699638
1200.884913257075450.2301734858491000.115086742924550
1210.8604149173086980.2791701653826050.139585082691302
1220.8631157067547170.2737685864905660.136884293245283
1230.8490870032253750.3018259935492490.150912996774625
1240.8408032579804240.3183934840391520.159196742019576
1250.7988519718750080.4022960562499830.201148028124992
1260.778859645068330.4422807098633390.221140354931669
1270.8042395301328850.3915209397342290.195760469867115
1280.77565344417290.4486931116541990.224346555827100
1290.9525168679933280.09496626401334460.0474831320066723
1300.9682469527705840.06350609445883290.0317530472294165
1310.9585798439270950.08284031214580950.0414201560729047
1320.9419762745099040.1160474509801920.0580237254900962
1330.9331895278001620.1336209443996760.0668104721998381
1340.9123472193412930.1753055613174150.0876527806587074
1350.9523400864981540.0953198270036910.0476599135018455
1360.9302921880300680.1394156239398640.0697078119699321
1370.9095951816873580.1808096366252840.0904048183126422
1380.9107299291301970.1785401417396060.0892700708698029
1390.9255918288339310.1488163423321380.0744081711660689
1400.8915808077969730.2168383844060550.108419192203027
1410.9610683897285920.07786322054281690.0389316102714084
1420.9445647954811050.1108704090377900.0554352045188952
1430.935031120637820.129937758724360.06496887936218
1440.9480292902408720.1039414195182550.0519707097591276
1450.900478809523890.1990423809522220.0995211904761108
1460.8262900939832260.3474198120335490.173709906016775
1470.9163365294567090.1673269410865820.0836634705432912
1480.7826455378318450.4347089243363090.217354462168155
1490.5272160524933950.945567895013210.472783947506605


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level70.048951048951049OK
10% type I error level270.188811188811189NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/104m761291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/104m761291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/1f3ad1291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/1f3ad1291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/2f3ad1291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/2f3ad1291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/3f3ad1291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/3f3ad1291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/48u9x1291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/48u9x1291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/58u9x1291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/58u9x1291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/6j4qi1291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/6j4qi1291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/7tv731291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/7tv731291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/8tv731291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/8tv731291196222.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/9tv731291196222.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291196394fc0h0ycukk3keej/9tv731291196222.ps (open in new window)


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