Home » date » 2010 » Nov » 19 »

Multiple linear regression 1

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 19 Nov 2010 16:51:37 +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/19/t1290185446loejfnmcrmnl8i6.htm/, Retrieved Fri, 19 Nov 2010 17:50:57 +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/19/t1290185446loejfnmcrmnl8i6.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 «
15 10 77 5 4 46 15 11 12 13 6 12 20 63 6 4 37 9 12 7 11 4 15 16 73 4 10 45 12 12 13 14 6 12 10 76 6 6 46 15 11 11 12 5 14 8 90 3 5 55 17 11 16 12 5 8 14 67 10 8 40 14 10 10 6 4 11 19 69 8 9 43 9 11 15 10 5 15 15 70 3 6 43 12 9 5 11 3 4 23 54 4 8 33 11 10 4 10 2 13 9 54 3 11 33 13 12 7 12 5 19 12 76 5 6 47 16 12 15 15 6 10 14 75 5 8 44 16 12 5 13 6 15 13 76 6 11 47 15 13 16 18 8 6 11 80 5 5 49 10 9 15 11 6 7 11 89 3 10 55 16 12 13 12 3 14 10 73 4 7 43 12 12 13 13 6 16 12 74 8 7 46 15 12 15 14 6 16 18 78 8 13 51 13 12 15 16 7 14 12 76 8 10 47 18 13 10 16 8 15 10 69 5 8 42 13 11 17 16 6 14 15 74 8 6 42 17 12 14 15 7 12 15 82 2 8 48 14 12 9 13 4 9 12 77 0 7 45 13 15 6 8 4 12 9 84 5 5 51 13 11 11 14 2 14 11 75 2 9 46 15 12 13 15 6 12 15 54 7 9 33 13 10 12 13 6 14 16 79 5 11 47 15 11 10 16 6 10 17 79 2 11 47 13 13 4 13 6 14 12 69 12 11 42 14 6 13 12 6 16 11 88 7 9 55 13 12 15 15 7 10 13 57 0 7 36 16 12 8 11 4 8 9 69 2 6 42 14 10 10 14 3 12 11 86 3 6 51 18 12 8 13 5 11 9 65 0 6 43 15 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -1.40033179694972 -0.076094555483637Depression[t] + 0.0719081107769395Belonging[t] + 0.0941357682157757Weighted_popularity[t] + 0.083878464867039Parental_criticism[t] -0.0399931531986932Belonging_final[t] -0.0601894895057676Happiness[t] + 0.118163788663957FindingFriends[t] + 0.230029151161890KnowingPeople[t] + 0.344271299678481Liked[t] + 0.522587758027874Celebrity[t] -0.00639854118490133t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.400331796949722.56448-0.5460.5858770.292939
Depression-0.0760945554836370.063844-1.19190.235270.117635
Belonging0.07190811077693950.0514821.39680.1646320.082316
Weighted_popularity0.09413576821577570.05841.61190.1091690.054585
Parental_criticism0.0838784648670390.0659321.27220.2053530.102677
Belonging_final-0.03999315319869320.073107-0.54710.5851910.292595
Happiness-0.06018948950576760.085851-0.70110.4843740.242187
FindingFriends0.1181637886639570.0938941.25850.2102560.105128
KnowingPeople0.2300291511618900.0645893.56145e-040.00025
Liked0.3442712996784810.0941933.6550.000360.00018
Celebrity0.5225877580278740.1588553.28970.0012610.00063
t-0.006398541184901330.003744-1.70910.0895910.044795


Multiple Linear Regression - Regression Statistics
Multiple R0.747479529845818
R-squared0.558725647538525
Adjusted R-squared0.525017190058829
F-TEST (value)16.5752362852874
F-TEST (DF numerator)11
F-TEST (DF denominator)144
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.02389408044419
Sum Squared Residuals589.845203835411


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11513.10411888090751.89588111909250
2129.379572235489662.62042776451034
31513.66928290473511.33071709526493
41212.1780196356576-0.17801963565763
51413.63406638481250.365933615187533
689.12171124973133-1.12171124973133
71112.1232135702656-1.12321357026557
8158.352695352270796.64730464772921
946.33029989402401-2.33029989402401
101310.6090666812382.39093331876199
111914.38040437585064.61959562414936
121011.4488108912758-1.44881089127583
131517.291412674971-2.29141267497098
14613.1906313519517-7.19063135195172
15712.1323718286991-5.1323718286991
161413.52674881435100.47325118564904
171614.32039401972771.67960598027230
181615.77987494835390.220125051646122
191415.1842230800641-1.18422308006412
201515.2061068182984-0.206106818298382
211414.6590612639979-0.659061263997852
221211.3650278495430.634972150456999
2399.07843878284137-0.0784387828413666
241211.56458655886740.435413441132648
251413.90436367430320.0956363256968038
261212.0395860686947-0.0395860686946777
271413.74491739633450.255082603665467
281011.3237347453513-1.32373474535133
291412.95870637259151.04129362740849
301616.0209419101327-0.0209419101327301
31108.830744427978021.16925557202198
32810.7103914354383-2.71039143543826
331211.74485458927990.255145410720076
341110.89123982907210.108760170927926
35810.3166168319753-2.31661683197533
361312.12378872463810.876211275361948
371110.01556689669140.98443310330859
38129.785784885710042.21421511428996
391615.26963036585610.730369634143928
401612.97847210707633.02152789292375
411313.8822688592405-0.882268859240485
421415.2715261726568-1.27152617265677
4355.55350869007313-0.553508690073128
441413.31750772459150.682492275408454
45139.032165895770663.96783410422934
461615.48302062039740.516979379602634
471414.6731379723986-0.673137972398646
481514.20822598301870.791774016981327
491513.30122948746531.69877051253468
501112.1583384993798-1.15833849937977
511513.60270189935871.3972981006413
521612.61452878680683.38547121319315
531313.3125508280339-0.312550828033874
541113.6932708599582-2.69327085995817
551213.8771452843589-1.87714528435892
561211.53689280320680.463107196793213
571013.3738483993187-3.37384839931873
5889.03838872227876-1.03838872227876
5999.60405812870067-0.604058128700668
601212.0926494029421-0.0926494029421035
611413.94814721482740.0518527851726437
621213.0528342079952-1.05283420799521
631111.0075014050402-0.00750140504018929
641413.90940055219770.0905994478022505
65711.5459981683963-4.54599816839630
661614.04475397274011.95524602725989
671615.53715287144920.462847128550839
681112.2647601803260-1.26476018032602
691615.35461214450550.645387855494538
701314.4183599616621-1.41835996166212
711110.82073288780610.17926711219393
721312.80317605040.19682394960001
731414.3362199694722-0.336219969472208
741513.48616893958641.51383106041364
75109.359659407222940.640340592777062
761514.72447441985310.275525580146891
771112.9958102339005-1.99581023390055
781111.4024329141157-0.402432914115743
7968.49918198128773-2.49918198128773
80119.632337418401931.36766258159807
811211.55664370196360.443356298036368
821313.2091406540391-0.209140654039053
831212.3210617317896-0.321061731789568
84810.6490833407533-2.64908334075331
85910.7349212539284-1.73492125392839
861011.6467410654182-1.64674106541819
871613.11587907013892.88412092986111
881512.76522991599382.23477008400617
891413.56960718756760.430392812432445
901213.6433703651392-1.64337036513920
911210.26827476188071.73172523811934
92108.820332062713181.17966793728682
931211.42637461338360.573625386616377
9489.3413456607946-1.34134566079460
951614.05207650692261.94792349307736
96117.750873764631233.24912623536877
971211.49227448057700.507725519422968
98910.2998349775947-1.29983497759473
991411.31071992558732.68928007441269
1001514.44179146272960.558208537270431
101810.7050914338505-2.70509143385053
1021212.2985131903579-0.298513190357948
1031010.4127573387016-0.412757338701639
1041614.78389020264291.21610979735713
1051714.27199666982762.72800333017243
106810.0794170593795-2.07941705937948
107910.5838716669164-1.58387166691636
108811.3755467072374-3.37554670723741
1091112.3744237176035-1.37442371760347
1101615.27596002906290.724039970937076
1111313.4306727557511-0.430672755751130
11257.71119025790909-2.71119025790909
1131512.78467871000662.21532128999339
1141513.9408392167791.05916078322099
1151211.39729190715030.60270809284972
1161211.39560277990660.60439722009336
1171615.72343887247390.276561127526108
1181212.4369449584-0.436944958399993
1191011.6255542363726-1.62555423637263
1201210.56609915655751.43390084344252
12146.22293211352812-2.22293211352812
1221112.9176944639492-1.91769446394925
1231614.67881011607401.32118988392603
12478.79712611731686-1.79712611731686
125910.7125218131455-1.71252181314545
1261410.82810290137843.17189709862156
127119.645373124880191.35462687511981
1281010.7811590578546-0.781159057854605
12968.4773317134976-2.47733171349761
1301412.80235244916451.19764755083547
1311110.82017442731760.179825572682416
132119.118604324233731.88139567576627
133913.8648278690724-4.86482786907245
1341611.3723579274544.62764207254599
13578.44596341492404-1.44596341492404
13688.78090798916263-0.780907989162627
137109.907247113123780.0927528868762226
1381411.91072591833422.08927408166581
13999.55187003377597-0.551870033775968
1401312.24403850580420.755961494195762
141139.58402687019163.41597312980839
1421211.65213641403920.347863585960838
1431112.5351681163983-1.53516811639827
1441014.9020014400070-4.90200144000698
1451211.91720443517050.0827955648294793
1461413.24193186753880.758068132461205
1471113.3186321462926-2.3186321462926
1481310.99187776127512.00812223872485
1491413.54288723676160.457112763238448
1501312.56418949320980.435810506790199
1511616.0433459968011-0.0433459968011405
1521312.12901360157780.87098639842222
1531211.16926560519660.83073439480335
15499.09291427494277-0.0929142749427714
1551411.25776782703252.74223217296746
1561514.52799791894940.472002081050603


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9336492573955630.1327014852088740.066350742604437
160.9999306218741460.0001387562517079236.93781258539613e-05
170.999825330422720.0003493391545604130.000174669577280207
180.9995788242493360.0008423515013271790.000421175750663589
190.999442462963340.001115074073318620.000557537036659311
200.9989417082623730.002116583475253860.00105829173762693
210.9990347553211670.001930489357665010.000965244678832506
220.9995672504713650.0008654990572709780.000432749528635489
230.9991578278316070.001684344336786150.000842172168393073
240.9984453260016660.003109347996668610.00155467399833431
250.9972355174606210.005528965078757280.00276448253937864
260.9952678823144680.009464235371065050.00473211768553253
270.9959426887683370.008114622463326840.00405731123166342
280.9935169324214010.01296613515719700.00648306757859852
290.9965824577184790.006835084563042070.00341754228152104
300.9952171762680080.00956564746398340.0047828237319917
310.9929213369923820.01415732601523650.00707866300761823
320.9962843345489040.007431330902191590.00371566545109579
330.9943308617574320.01133827648513560.00566913824256779
340.9922774370725640.01544512585487140.00772256292743568
350.9912793561000530.01744128779989320.00872064389994661
360.9877578153960070.02448436920798570.0122421846039929
370.9848936426377310.03021271472453720.0151063573622686
380.9860230592496970.02795388150060670.0139769407503034
390.9852617601434230.02947647971315370.0147382398565768
400.9898363558670450.02032728826591010.0101636441329550
410.986022983535750.02795403292850060.0139770164642503
420.980778542402160.03844291519568090.0192214575978405
430.9734890365830660.05302192683386820.0265109634169341
440.967690414269650.0646191714607010.0323095857303505
450.9912925549644440.01741489007111160.00870744503555578
460.9880136781771970.02397264364560560.0119863218228028
470.9839868942327420.03202621153451670.0160131057672583
480.9790217195390530.04195656092189360.0209782804609468
490.9765208322078370.04695833558432520.0234791677921626
500.9720102590318660.05597948193626890.0279897409681344
510.9694319506334640.06113609873307160.0305680493665358
520.9821389886582160.03572202268356780.0178610113417839
530.9760673762037820.04786524759243530.0239326237962177
540.9767379353712320.0465241292575350.0232620646287675
550.9733760106219360.0532479787561280.026623989378064
560.9663856462991970.06722870740160550.0336143537008028
570.9750728129680490.04985437406390270.0249271870319513
580.9686046853847950.06279062923040990.0313953146152050
590.9587840317144120.08243193657117520.0412159682855876
600.9467447109821430.1065105780357140.0532552890178569
610.932843091196050.1343138176078990.0671569088039494
620.9198991157672450.1602017684655100.0801008842327551
630.9002519497902520.1994961004194970.0997480502097483
640.8846227746413660.2307544507172680.115377225358634
650.9361582272630730.1276835454738540.0638417727369268
660.9413024341610880.1173951316778230.0586975658389117
670.9281614025785540.1436771948428920.0718385974214462
680.9155660044640060.1688679910719890.0844339955359943
690.8984462267925830.2031075464148350.101553773207417
700.8854602364057880.2290795271884240.114539763594212
710.8627780799441780.2744438401116440.137221920055822
720.836868337466270.3262633250674590.163131662533729
730.8207122115727170.3585755768545670.179287788427283
740.8151383342403230.3697233315193530.184861665759677
750.790247551034460.419504897931080.20975244896554
760.7561521080818760.4876957838362480.243847891918124
770.746658574939360.5066828501212820.253341425060641
780.7057336850527970.5885326298944050.294266314947203
790.7113377505204570.5773244989590870.288662249479543
800.6972040707100980.6055918585798050.302795929289902
810.6618986882728770.6762026234542460.338101311727123
820.6199648520953040.7600702958093920.380035147904696
830.572654456594140.854691086811720.42734554340586
840.5814236588777490.8371526822445020.418576341122251
850.5630902037335140.8738195925329720.436909796266486
860.5395088497290240.9209823005419520.460491150270976
870.591790927840140.816418144319720.40820907215986
880.620743725162610.7585125496747810.379256274837390
890.585861475621070.828277048757860.41413852437893
900.5699168260686210.8601663478627580.430083173931379
910.5582096358566160.8835807282867680.441790364143384
920.5264658416113350.947068316777330.473534158388665
930.4829474754425660.9658949508851320.517052524557434
940.4654655263681090.9309310527362170.534534473631892
950.4793073149375690.9586146298751370.520692685062431
960.6190566541635230.7618866916729540.380943345836477
970.5739056003687620.8521887992624750.426094399631238
980.5379113310184870.9241773379630260.462088668981513
990.6049847962496090.7900304075007820.395015203750391
1000.570591213403750.85881757319250.42940878659625
1010.5908218220078040.8183563559843920.409178177992196
1020.5444237587305190.9111524825389610.455576241269481
1030.4942123088512290.9884246177024570.505787691148771
1040.5002203976503560.9995592046992870.499779602349644
1050.5519343664408120.8961312671183770.448065633559188
1060.5548921509762650.8902156980474710.445107849023735
1070.5119420381920780.9761159236158440.488057961807922
1080.609724562712760.780550874574480.39027543728724
1090.5930667409027040.8138665181945920.406933259097296
1100.5505772612457470.8988454775085050.449422738754253
1110.4948265996685130.9896531993370270.505173400331487
1120.6168093432778450.766381313444310.383190656722155
1130.6261543908035780.7476912183928430.373845609196422
1140.6152354880973120.7695290238053770.384764511902688
1150.5599876296091190.8800247407817620.440012370390881
1160.5211388776550420.9577222446899160.478861122344958
1170.4770161818485170.9540323636970340.522983818151483
1180.4638834165828050.927766833165610.536116583417195
1190.494739372148820.989478744297640.50526062785118
1200.441530858356720.883061716713440.558469141643279
1210.4134829522043010.8269659044086030.586517047795699
1220.3685878329170530.7371756658341070.631412167082947
1230.4260640319806920.8521280639613840.573935968019308
1240.3873901037021720.7747802074043440.612609896297828
1250.4151331684270880.8302663368541770.584866831572912
1260.4448625504681380.8897251009362750.555137449531862
1270.4320321230372650.864064246074530.567967876962735
1280.3616135946336770.7232271892673530.638386405366323
1290.5980661188481580.8038677623036840.401933881151842
1300.7384688316503330.5230623366993340.261531168349667
1310.7418200110498450.5163599779003090.258179988950155
1320.7892672181567970.4214655636864070.210732781843203
1330.7626227260879270.4747545478241460.237377273912073
1340.8089580224469450.3820839551061100.191041977553055
1350.7326375291746140.5347249416507720.267362470825386
1360.6681748812628130.6636502374743740.331825118737187
1370.7582451793360020.4835096413279950.241754820663998
1380.7042372239546890.5915255520906230.295762776045311
1390.6469509147001210.7060981705997570.353049085299879
1400.5030939508278420.9938120983443160.496906049172158
1410.402127666541330.804255333082660.59787233345867


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level150.118110236220472NOK
5% type I error level360.283464566929134NOK
10% type I error level440.346456692913386NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/102q961290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/102q961290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/1dpcc1290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/1dpcc1290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/2dpcc1290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/2dpcc1290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/3dpcc1290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/3dpcc1290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/4ogcx1290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/4ogcx1290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/5ogcx1290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/5ogcx1290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/6ogcx1290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/6ogcx1290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/7rha31290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/7rha31290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/8rha31290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/8rha31290185485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/9rha31290185485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290185446loejfnmcrmnl8i6/9rha31290185485.ps (open in new window)


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