Home » date » 2010 » Dec » 13 »

*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: Mon, 13 Dec 2010 10:03:31 +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/13/t1292234563mbp4a3sdrr4vokx.htm/, Retrieved Mon, 13 Dec 2010 11:02:47 +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/13/t1292234563mbp4a3sdrr4vokx.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 «
1 15 15 13 6 2 9 12 11 4 2 12 15 14 6 2 15 12 12 5 2 17 14 12 5 2 14 8 6 4 1 9 11 10 5 1 12 15 11 3 2 11 4 10 2 2 13 13 12 5 1 16 19 15 6 1 16 10 13 6 1 15 15 18 8 2 10 6 11 6 1 16 7 12 3 2 12 14 13 6 2 15 16 14 6 1 13 16 16 7 1 18 14 16 8 2 13 15 16 6 1 17 14 15 7 1 14 12 13 4 2 13 9 8 4 1 13 12 14 2 1 15 14 15 6 1 13 12 13 6 1 15 14 16 6 1 13 10 13 6 1 14 14 12 6 1 13 16 15 7 1 16 10 11 4 1 14 8 14 3 2 12 8 14 3 1 18 12 13 5 1 15 11 13 6 2 9 8 12 4 2 16 13 14 6 1 16 11 13 3 2 17 12 12 3 2 13 16 14 6 1 17 16 15 6 1 15 13 16 6 1 14 14 15 8 2 10 5 5 2 2 13 14 15 6 1 11 13 8 4 1 11 16 16 7 2 16 15 14 6 2 16 15 14 6 1 11 15 16 6 1 15 11 14 5 1 15 15 13 6 1 12 16 14 6 1 17 13 14 5 2 15 11 12 6 2 16 12 13 7 1 14 12 15 5 1 17 10 15 6 1 10 8 13 6 2 11 9 10 4 1 15 12 13 5 2 15 14 14 6 1 7 12 13 6 2 17 11 13 4 2 14 14 18 6 2 18 7 12 4 2 14 16 14 7 1 12 16 16 8 2 14 11 13 6 1 9 16 16 6 1 14 13 15 6 1 11 11 14 5 1 15 11 14 5 1 16 13 13 6 1 17 14 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 14.1776102759824 -0.662395540767814Gender[t] + 0.0402732610028032Popularity[t] + 0.063572774662549Liked[t] -0.107430080189719Celebrity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)14.17761027598241.34239110.561500
Gender-0.6623955407678140.381668-1.73550.0846470.042324
Popularity0.04027326100280320.0832490.48380.6292360.314618
Liked0.0635727746625490.1069410.59450.5530730.276537
Celebrity-0.1074300801897190.171962-0.62470.5330720.266536


Multiple Linear Regression - Regression Statistics
Multiple R0.167199882635009
R-squared0.0279558007531608
Adjusted R-squared0.00270789947402217
F-TEST (value)1.10725245809875
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value0.355215089174953
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.29699286024406
Sum Squared Residuals812.53113480188


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11514.30117923973150.698820760268548
2913.6056785270096-4.60567852700957
31213.7023564736262-1.70235647362619
41513.56182122148241.4381787785176
51713.6423677434883.35763225651199
61413.12672160968560.873278390314383
7914.0567979519223-5.05679795192232
81214.4963239309755-2.49632393097552
91113.434779824704-2.43477982470404
101313.6020944824852-0.602094482485208
111614.58941783306781.41058216693223
121614.09981293471741.90018706528256
131514.40418295266480.595817047335234
141013.1491788006133-3.14917880061332
151614.23771061761561.76228938238436
161213.5985104379608-1.59851043796084
171513.7426297346291.257370265371
181314.4247407445322-1.42474074453219
191814.23676414233693.76323585766314
201313.8295020229513-0.829502022951292
211714.2806214478642.71937855213597
221414.3952196171025-0.395219617102488
231313.2941404200135-0.294140420013519
241314.6736525521445-1.67365255214448
251514.38805152805380.611948471946246
261314.180359456723-1.18035945672305
271514.45162430271630.548375697283697
281314.0998129347174-1.09981293471744
291414.1973332040661-0.197333204066107
301314.3611679698696-1.36116796986964
311614.18752754577181.81247245422822
321414.4051294279435-0.405129427943544
331213.7427338871757-1.74273388717573
341814.28778953691283.71221046308723
351514.14008619572020.859913804279754
36913.5081582576609-4.50815825766091
371613.62180995162062.37819004837941
381614.46237643628941.5376235637106
391713.77668138186183.22331861813816
401313.742629734629-0.742629734628997
411714.46859805005942.53140194994064
421514.41135104171350.5886489582865
431414.1731913676743-0.173191367674315
441013.1571892123941-3.1571892123941
451313.7256559872859-0.72565598728594
461114.1176290047925-3.11762900479255
471114.4247407445322-3.42474074453219
481613.70235647362622.29764352637381
491613.70235647362622.29764352637381
501114.4918975637191-3.49189756371911
511514.31108905057250.688910949427485
521514.30117923973150.698820760268541
531214.4050252753968-2.40502527539681
541714.39163557257812.60836442742188
551513.41411788028991.58588211971012
561613.41053383576552.58946616423448
571414.4149350862379-0.414935086237867
581714.22695848404252.77304151595746
591014.0192664127118-4.01926641271184
601113.4212859693386-2.42128596933862
611514.28778953691280.712210463087231
621513.66208321262341.33791678737661
63714.180359456723-7.18035945672305
641713.69255081533193.30744918466813
651413.91637431127360.0836256887264133
661813.46788499665814.53211500334189
671413.63519965443930.364800345560722
681214.3173106643425-2.31731066434247
691413.47769065495240.522309345047568
70914.5321708247219-5.53217082472191
711414.347778267051-0.347778267050951
721114.3110890505725-3.31108905057251
731514.31108905057250.688910949427485
741614.22063271772591.77936728227415
751714.19733320406612.80266679593389
761614.70675772409851.29324227590146
771213.2905563754892-1.29055637548915
781514.21346462867710.786535371322881
791513.66840897894011.33159102105992
801614.241294662141.75870533785999
811614.56980651647911.43019348352088
821113.7328240763347-2.73282407633467
831513.62180995162061.37819004837941
841214.3075050060481-2.30750500604815
851413.52787372679630.472126273203709
861514.21082705943150.789172940568471
871714.50539141908452.49460858091547
881914.40502527539684.59497472460319
891514.40860931992120.591390680078822
901613.53493766329832.46506233670171
911414.0729293765333-0.0729293765333301
921614.11678668206051.8832133179395
931514.06038199644670.939618003553315
941514.39521961710250.604780382897512
951713.48844278852553.51155721147447
961214.2537378896799-2.25373788967992
971814.10065525744953.89934474255051
981314.3952196171025-1.39521961710249
991414.1669697539044-0.166969753904359
1001413.70594051815060.294059481849439
1011413.6584991680990.341500831900977
1021213.5717310323235-1.57173103232346
1031414.3513623115753-0.351362311575318
1041213.4177019248142-1.41770192481425
1051514.25373788967990.746262110320078
1061114.5527286165893-3.55272861658933
1071113.913736742028-2.913736742028
1081514.10339697924180.89660302075819
1091414.3612721224164-0.361272122416374
1101513.64869350980471.3513064901953
1111614.42474074453221.57525925546781
1121213.6218099516206-1.62180995162059
1131414.15716409561-0.157164095610036
1141414.15716409561-0.157164095610036
1151814.28146377059613.71853622940392
1161414.3011792397315-0.301179239731459
1171314.2242167622502-1.22421676225022
1181413.45439114129270.545608858707314
1191414.4247407445322-0.42474074453219
1201714.1803594567232.81964054327695
1211214.0362401600549-2.03624016005489
1221614.35136231157531.64863768842468
1231513.50087855711711.49912144288288
1241013.541263429615-3.54126342961498
1251313.8062025092915-0.806202509291546
1261513.57531507684781.42468492315217
1271614.1472542847691.85274571523102
1281513.74979782367771.25020217632227
1291414.2278008067746-0.227800806774587
1301114.1436702402446-3.14367024024461
1311313.3640389609928-0.364038960992756
1321714.26090597872872.73909402127134
1331414.0765134210577-0.0765134210576972
1341614.29137358143711.70862641856286
1351513.41685960208221.5831403979178
1361214.6198854357763-2.61988543577625
1371613.46788499665812.53211500334189
138813.5081582576609-5.50815825766091
139913.5887047796665-4.58870477966652
1401314.3683360589184-1.36833605891838
1411914.1472542847694.85274571523102
1421114.1132026375361-3.11320263753613
1431513.81695464286461.18304535713535
1441113.6889667708075-2.6889667708075
1451513.71226628446721.28773371553275
1461613.56456294327472.43543705672527
1471514.28778953691280.712210463087231
1481214.4516243027163-2.4516243027163
1491613.73198175360262.26801824639737
1501513.88052741752721.1194725824728
1511313.6620832126234-0.66208321262339
1521414.3280627979156-0.328062797915572
1531114.3173106643425-3.31731066434247
1541514.22063271772590.779367282274147
1551214.2206327177259-2.22063271772585
1561614.4587923917651.54120760823496
1571414.3818299142838-0.381829914283797
1581314.5393389137706-1.53933891377064
1591514.38446748352940.615532516470613


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.9165175236014690.1669649527970620.0834824763985309
90.9473725262933770.1052549474132450.0526274737066226
100.9060622221041350.1878755557917310.0939377778958654
110.8846061094017220.2307877811965550.115393890598278
120.8833479800752970.2333040398494060.116652019924703
130.8366778607984440.3266442784031120.163322139201556
140.856937561507650.2861248769847010.143062438492351
150.894907634540550.2101847309188990.10509236545945
160.8630939542677210.2738120914645590.136906045732279
170.825867625524280.348264748951440.17413237447572
180.8002178855681260.3995642288637470.199782114431874
190.8349950144430030.3300099711139950.165004985556998
200.7924868066363050.4150263867273890.207513193363695
210.7777141373068050.4445717253863910.222285862693195
220.7199179088801980.5601641822396030.280082091119802
230.6700323708892550.659935258221490.329967629110745
240.6113317291665220.7773365416669550.388668270833478
250.5447854781629840.9104290436740320.455214521837016
260.5033214104803710.9933571790392570.496678589519629
270.4377405853938370.8754811707876730.562259414606163
280.3915332679294110.7830665358588220.608466732070589
290.3311846223995460.6623692447990920.668815377600454
300.3135802398631030.6271604797262070.686419760136897
310.3234299321466930.6468598642933870.676570067853307
320.270350517281060.540701034562120.72964948271894
330.2304685905459670.4609371810919340.769531409454033
340.3220077548013850.644015509602770.677992245198615
350.2740251292052870.5480502584105740.725974870794713
360.3598087977675730.7196175955351460.640191202232427
370.3827257918076690.7654515836153390.617274208192331
380.3701365831453730.7402731662907460.629863416854627
390.477763400141410.955526800282820.52223659985859
400.4296251232338330.8592502464676660.570374876766167
410.4192561515435450.838512303087090.580743848456455
420.3686363167173720.7372726334347430.631363683282628
430.3257482966100640.6514965932201290.674251703389935
440.331986858486250.66397371697250.66801314151375
450.2894780724177880.5789561448355760.710521927582212
460.3234816109258580.6469632218517160.676518389074142
470.4245459181157040.8490918362314080.575454081884296
480.4253830585229360.8507661170458720.574616941477064
490.4217561343029290.8435122686058590.57824386569707
500.5094254262042620.9811491475914770.490574573795738
510.4653423078625780.9306846157251560.534657692137422
520.4197610376230670.8395220752461340.580238962376933
530.4299139165181650.8598278330363290.570086083481835
540.447146705584220.894293411168440.55285329441578
550.4256585819657520.8513171639315030.574341418034248
560.4339577763620460.8679155527240920.566042223637954
570.3878200640019140.7756401280038290.612179935998086
580.4089391491267270.8178782982534540.591060850873273
590.5015119003032740.9969761993934510.498488099696726
600.5045897891383520.9908204217232950.495410210861648
610.4634500446648140.9269000893296290.536549955335186
620.4285883631927150.857176726385430.571411636807285
630.7994214452982740.4011571094034530.200578554701726
640.8303804246723910.3392391506552180.169619575327609
650.808082298511130.3838354029777390.19191770148887
660.8876005431450310.2247989137099380.112399456854969
670.864675800470220.270648399059560.13532419952978
680.8637298781757240.2725402436485520.136270121824276
690.83763046340580.32473907318840.1623695365942
700.9366937537961360.1266124924077280.063306246203864
710.921021375474450.1579572490511010.0789786245255505
720.9363723522820550.127255295435890.063627647717945
730.9227797505468550.1544404989062890.0772202494531447
740.9178634835325810.1642730329348370.0821365164674187
750.9284803063608180.1430393872783630.0715196936391817
760.9177893903201110.1644212193597780.0822106096798892
770.9078756507217380.1842486985565240.0921243492782619
780.8906271159691840.2187457680616330.109372884030816
790.8783128934072380.2433742131855240.121687106592762
800.8704801314589690.2590397370820630.129519868541031
810.8549784857696940.2900430284606110.145021514230306
820.8688583328481720.2622833343036560.131141667151828
830.8524198156257320.2951603687485360.147580184374268
840.8494518054908750.3010963890182490.150548194509125
850.822312015247780.3553759695044390.17768798475222
860.7950078742463480.4099842515073040.204992125753652
870.8112886864155570.3774226271688860.188711313584443
880.8983687337519020.2032625324961970.101631266248098
890.877767624783710.244464750432580.12223237521629
900.8792328420982370.2415343158035260.120767157901763
910.8538891503190810.2922216993618370.146110849680919
920.8453598388896970.3092803222206070.154640161110303
930.8214081136367720.3571837727264560.178591886363228
940.7914210228753150.4171579542493690.208578977124685
950.8256771465656660.3486457068686680.174322853434334
960.8199350916542550.360129816691490.180064908345745
970.8674764577624780.2650470844750430.132523542237522
980.8491426580618480.3017146838763050.150857341938152
990.8190640921451690.3618718157096630.180935907854831
1000.7876428427781390.4247143144437230.212357157221861
1010.7548738829683610.4902522340632770.245126117031639
1020.7322677668438570.5354644663122850.267732233156143
1030.6907313089275550.618537382144890.309268691072445
1040.6639069386625990.6721861226748020.336093061337401
1050.6261709066960040.7476581866079920.373829093303996
1060.6775945071987140.6448109856025720.322405492801286
1070.7028718308478110.5942563383043770.297128169152189
1080.6635090258443550.672981948311290.336490974155645
1090.6179911235745270.7640177528509450.382008876425473
1100.5891160210446080.8217679579107840.410883978955392
1110.5768898952869140.8462202094261720.423110104713086
1120.5430398483635380.9139203032729230.456960151636462
1130.4961010541692170.9922021083384350.503898945830783
1140.4522919789443440.9045839578886890.547708021055656
1150.5604654414140010.8790691171719990.439534558585999
1160.5100791532454330.9798416935091330.489920846754567
1170.468796704827310.937593409654620.53120329517269
1180.4315305006345970.8630610012691930.568469499365403
1190.381698614071420.763397228142840.61830138592858
1200.4227454880607260.8454909761214520.577254511939274
1210.4051709255193020.8103418510386040.594829074480698
1220.3765692518218130.7531385036436270.623430748178187
1230.3406813483652510.6813626967305020.659318651634749
1240.3881062856611670.7762125713223330.611893714338833
1250.3364601373499040.6729202746998070.663539862650096
1260.290940445459370.5818808909187390.70905955454063
1270.26652754999810.53305509999620.7334724500019
1280.2607301448789050.521460289757810.739269855121095
1290.2143466001863010.4286932003726020.785653399813699
1300.2536787989593350.5073575979186690.746321201040665
1310.2166720204483120.4333440408966240.783327979551688
1320.2909375627045820.5818751254091630.709062437295418
1330.2394081108449860.4788162216899720.760591889155014
1340.2151175305892690.4302350611785370.784882469410731
1350.1814714415099140.3629428830198270.818528558490086
1360.1654804103887570.3309608207775140.834519589611243
1370.1649377827074840.3298755654149680.835062217292516
1380.4762224373550460.9524448747100920.523777562644954
1390.8598879490429420.2802241019141150.140112050957058
1400.8098361116693720.3803277766612560.190163888330628
1410.9108181779619160.1783636440761690.0891818220380843
1420.9032048728249010.1935902543501980.0967951271750989
1430.8720658694384740.2558682611230520.127934130561526
1440.9544545943836920.09109081123261620.0455454056163081
1450.9238729164140250.1522541671719490.0761270835859746
1460.877448310309360.2451033793812810.122551689690641
1470.8270993806661340.3458012386677310.172900619333866
1480.8126383349090770.3747233301818460.187361665090923
1490.7150854804785610.5698290390428780.284914519521439
1500.5863870733093030.8272258533813950.413612926690697
1510.4170212805509320.8340425611018630.582978719449068


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level10.00694444444444444OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/1086vr1292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/1086vr1292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/1kngf1292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/1kngf1292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/2kngf1292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/2kngf1292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/3cwx01292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/3cwx01292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/4cwx01292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/4cwx01292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/5cwx01292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/5cwx01292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/6n6f31292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/6n6f31292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/7gfw61292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/7gfw61292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/8gfw61292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/8gfw61292234599.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/9gfw61292234599.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234563mbp4a3sdrr4vokx/9gfw61292234599.ps (open in new window)


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