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:06:33 +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/t1292234735rinfzma1iw08ihn.htm/, Retrieved Mon, 13 Dec 2010 11:06:03 +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/t1292234735rinfzma1iw08ihn.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 time24 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 1.70905089015761 -0.520810039433372Gender[t] + 0.0376773966790884Happiness[t] + 0.426493049447179Liked[t] + 0.93554501323377Celebrity[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.709050890157611.6994091.00570.316150.158075
Gender-0.5208100394333720.370385-1.40610.16170.08085
Happiness0.03767739667908840.0778830.48380.6292360.314618
Liked0.4264930494471790.0976864.36592.3e-051.2e-05
Celebrity0.935545013233770.1484986.300


Multiple Linear Regression - Regression Statistics
Multiple R0.678310490940214
R-squared0.460105122119554
Adjusted R-squared0.446081878538244
F-TEST (value)32.8101782909031
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.22173210448981
Sum Squared Residuals760.15840579459


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11512.91108152312662.08891847687345
2129.440130978256712.55986902174329
31512.70373234310312.29626765689694
41211.02823342101220.971766578987806
51411.10358821437042.89641178562964
687.496052714416260.503947285583741
71110.46999298147670.530007018523322
8159.138428194493595.86157180550641
947.21790269570018-3.21790269570017
101310.95287862765402.04712137234598
111913.80174501870005.19825498130003
121012.9487589198056-2.94875891980561
131516.9146367968300-1.91463679682995
14611.3488984014033-5.34889840140334
1579.71563083065712-2.71563083065712
161412.27723929365591.72276070634412
171612.81676453314033.18323546685968
181615.05075089134360.949249108656351
191416.1746828879729-2.17468288797286
201513.59439583867651.40560416132349
211414.7749674286128-0.774967428612823
221211.00231409997990.99768590002011
2398.311361416631530.688638583368469
24129.520039726280442.47996027371956
251413.76406762202090.235932377979124
261212.8357267297683-0.83572672976834
271414.1905606714681-0.190560671468056
281012.8357267297683-2.83572672976834
291412.44691107700021.55308892299975
301614.62425784189651.37574215810353
311010.2246827944437-0.224682794443708
32810.4932621361933-2.4932621361933
3389.89709730340175-1.89709730340175
341212.08856869993-0.088568699930013
351112.9110815231265-1.91108152312652
3689.8666240277039-1.86662402770390
371312.85444192981940.145558070180587
381110.14212388010430.857876119895703
39129.232498187902832.76750181209717
401612.74140973978213.25859026021785
411613.83942241537912.16057758462095
421314.1905606714681-1.19056067146806
431415.5974802518093-1.59748025180933
4455.04776005178519-0.047760051785188
451413.16790278922930.832097210770673
46138.756816662706734.24318333729327
471614.97539609798551.02460390201453
481512.85444192981942.14555807018059
491512.85444192981942.14555807018059
501514.03985108475170.960148915248298
511112.4020295593399-1.40202955933993
521512.91108152312652.08891847687348
531613.22454238253642.77545761746357
541312.47738435269810.522615647301896
551111.9637784342460-0.963778434245965
561213.363493893606-1.36349389360600
571212.7908452121080-0.790845212108018
581013.8394224153791-3.83942241537905
59812.7226945397311-4.72269453973108
6099.08899272216771-0.088992722167713
611211.97553650989270.0244634901072524
621412.81676453314031.18323546685968
631212.6096623496938-0.60966234969381
641110.59453625058380.405463749416217
651414.4850593342500-0.485059334249955
66710.2057205978157-3.20572059781569
671613.7146321496952.28536785030499
681615.94861850789830.0513814921016704
691112.3525940870141-1.35259408701406
701613.96449629139352.03550370860647
711313.7263902253418-0.726390225341788
721112.2513199726236-1.25131997262357
731112.4020295593399-1.40202955933993
741312.94875891980560.0512410801943945
751412.55994326703751.44005673296249
761512.35714804167962.64285195832039
77109.63572208263340.364277917366609
781515.6351576484884-0.635157648488416
791113.6697506320347-2.66975063203468
8068.35359276797617-2.35359276797617
81119.206578866870531.79342113312947
821210.36847187050931.63152812949075
831312.81676453314030.183235466859676
841213.6510354319836-1.65103543198361
85811.8435421232275-3.84354212322747
86910.6134984472118-1.6134984472118
871012.3948254383587-2.39482543835869
881613.48828415929002.51171584070995
891511.97553650989273.02446349010725
901412.00145583092511.99854416907495
911213.8089491396812-1.80894913968120
921212.5222658703584-0.522265870358426
93109.334019298870260.66598070112974
941211.03999149665900.960008503341022
9588.37951208900848-0.379512089008474
961615.52212545845110.47787454154885
97119.447051488907521.55294851109248
981210.96463670330081.0353632966992
99911.9378591132137-2.93785911321366
1001411.41704907378032.58295092621971
1011514.14112519914220.858874800857815
102810.4061492671883-2.40614926718834
1031212.3643521626608-0.364352162660839
1041010.4887081815278-0.488708181527751
1051615.63515764848840.364842351511585
1061712.25131997262364.74868002737642
10789.35036794293607-1.35036794293607
108911.5490434604456-2.54904346044557
109811.8553001988742-3.85530019887425
1101111.8812195199066-0.881219519906555
1111615.16378308138090.836216918619086
1121312.70373234310310.296267656896941
11359.64027603729894-4.64027603729894
11459.64027603729894-4.64027603729894
1151511.23558260103573.76441739896435
1161512.87340412644742.12659587355257
1171211.47368866708740.526311332912609
1181211.92610103756690.0738989624331232
1191615.08842828802270.911571711977263
1201212.9864363164847-0.986436316484694
1211012.3715562836421-2.37155628364207
1221212.4397069560190-0.439706956019016
12347.20155405163436-3.20155405163436
1241112.6283775497449-1.62837754974488
1251613.16790278922932.83209721077067
12679.15714339454466-2.15714339454466
127910.2246827944437-1.22468279444371
1281410.09268840777843.90731159222157
1291110.14932800108550.85067199891447
1301011.3983338737292-1.39833387372921
13169.59084056497307-3.59084056497307
1321412.98643631648471.01356368351531
1331112.4469110770002-1.44691107700025
1341110.65117584389090.348824156109113
135914.1788025958213-5.17880259582127
1361611.35345235606894.64654764393111
137710.1303658044575-3.13036580445751
13889.8289466310248-1.82894663102481
139109.86662402770390.133375972296104
1401411.90018171653462.09981828346543
141910.3377149844810-1.33771498448097
1421313.6959169496439-0.695916949643932
143139.157143394544663.84285660545534
1441211.73050993319020.269490066809799
1451112.3077125693537-1.30771256935374
1461013.2809349792666-3.28093497926659
1471211.97553650989270.0244634901072524
1481414.0775284814308-0.0775284814307909
1491114.1339210781610-3.13392107816095
150139.583636443991843.41636355600816
1511412.74140973978211.25859026021785
1521311.93785911321371.06214088678634
1531615.91094111121920.0890588887807586
1541312.91108152312650.0889184768734832
1551312.79804933308930.201950666910748
1561211.50416194278520.495838057214754
157910.0667690867461-1.06676908674612
1581411.39112975274802.60887024725202
1591515.1261056847018-0.126105684701826


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.1170229578983730.2340459157967460.882977042101627
90.8753665836292240.2492668327415520.124633416370776
100.8025515852733720.3948968294532570.197448414726628
110.7349495778446290.5301008443107420.265050422155371
120.9685786130283640.06284277394327280.0314213869716364
130.984031032720710.03193793455858240.0159689672792912
140.994170277962590.01165944407482200.00582972203741101
150.9990624262829930.001875147434014200.000937573717007098
160.998530684654970.002938630690059880.00146931534502994
170.9983397302377150.003320539524570450.00166026976228523
180.9970749462448290.005850107510342490.00292505375517124
190.9971045598574670.005790880285066540.00289544014253327
200.9952844049327280.009431190134544110.00471559506727206
210.992815709161220.01436858167755920.00718429083877958
220.988830959300830.02233808139834110.0111690406991705
230.9832057003273520.03358859934529670.0167942996726483
240.9774248494910030.04515030101799410.0225751505089970
250.967468118634140.06506376273172030.0325318813658601
260.955763167839570.08847366432086160.0442368321604308
270.9413205740058480.1173588519883030.0586794259941517
280.9452493707938650.1095012584122690.0547506292061347
290.9390465363220160.1219069273559680.060953463677984
300.926984085084880.1460318298302420.073015914915121
310.9057292818490820.1885414363018360.0942707181509178
320.9302953729655620.1394092540688750.0697046270344377
330.9378053979244140.1243892041511720.0621946020755861
340.9186916507315140.1626166985369720.081308349268486
350.9114886713075990.1770226573848020.088511328692401
360.907738992858470.1845220142830620.0922610071415309
370.8834699235150870.2330601529698260.116530076484913
380.8563752409601710.2872495180796580.143624759039829
390.8513351716204050.2973296567591910.148664828379595
400.8686702135059280.2626595729881440.131329786494072
410.8587892112232080.2824215775535850.141210788776792
420.8390560423243720.3218879153512550.160943957675628
430.818389567862890.3632208642742210.181610432137111
440.7823179080813960.4353641838372080.217682091918604
450.7448089150770590.5103821698458820.255191084922941
460.8447641559669440.3104716880661130.155235844033056
470.8207765188473110.3584469623053780.179223481152689
480.8073647196953370.3852705606093260.192635280304663
490.7933197250942140.4133605498115720.206680274905786
500.76268825691820.4746234861635990.237311743081800
510.7436559594459450.5126880811081090.256344040554055
520.7336826400813820.5326347198372360.266317359918618
530.751740172578260.4965196548434790.248259827421739
540.7123825460951950.5752349078096090.287617453904805
550.6866514301004190.6266971397991630.313348569899581
560.6662337513751460.6675324972497080.333766248624854
570.6310563725992240.7378872548015510.368943627400776
580.7246154231578430.5507691536843150.275384576842157
590.8386555914029430.3226888171941130.161344408597057
600.810008600782460.379982798435080.18999139921754
610.776003398511820.4479932029763590.223996601488180
620.7476179469935270.5047641060129450.252382053006473
630.7097165751098620.5805668497802760.290283424890138
640.6731632372898210.6536735254203580.326836762710179
650.6350246545977920.7299506908044160.364975345402208
660.6952399392471450.609520121505710.304760060752855
670.6963110793007990.6073778413984030.303688920699201
680.6541132014256190.6917735971487620.345886798574381
690.6283255084727850.7433489830544290.371674491527214
700.6180488800236510.7639022399526970.381951119976349
710.5781371401762320.8437257196475370.421862859823768
720.5475771073967850.904845785206430.452422892603215
730.5204914091209330.9590171817581340.479508590879067
740.4739277904110280.9478555808220550.526072209588972
750.4474156930710040.8948313861420090.552584306928996
760.4584416922241730.9168833844483460.541558307775827
770.4160149158734650.832029831746930.583985084126535
780.3742923808595510.7485847617191020.625707619140449
790.3967069541863170.7934139083726330.603293045813683
800.4050142053606890.8100284107213780.594985794639311
810.3860098494110290.7720196988220580.613990150588971
820.3677763075247580.7355526150495160.632223692475242
830.3259721298704400.6519442597408810.67402787012956
840.3077050247096210.6154100494192420.692294975290379
850.3895378652007760.7790757304015520.610462134799224
860.3679845769878330.7359691539756670.632015423012167
870.3811452718224310.7622905436448620.618854728177569
880.3868249363987780.7736498727975570.613175063601222
890.4214461764835360.8428923529670730.578553823516464
900.4200741831450190.8401483662900390.57992581685498
910.4025632666019440.8051265332038870.597436733398056
920.3598716969756840.7197433939513680.640128303024316
930.3232804744065480.6465609488130950.676719525593452
940.288914930098730.577829860197460.71108506990127
950.2536567073057230.5073134146114460.746343292694277
960.2185106247122790.4370212494245580.78148937528772
970.2088441831375060.4176883662750130.791155816862494
980.1827654562966210.3655309125932430.817234543703379
990.2043465037689070.4086930075378140.795653496231093
1000.2255667102375380.4511334204750760.774433289762462
1010.1991679060326060.3983358120652120.800832093967394
1020.1980204010878530.3960408021757060.801979598912147
1030.1671378969180160.3342757938360330.832862103081984
1040.1403710810713230.2807421621426460.859628918928677
1050.1155822053687040.2311644107374070.884417794631296
1060.2095912819302370.4191825638604750.790408718069763
1070.1878149531037960.3756299062075930.812185046896204
1080.1912634758359720.3825269516719440.808736524164028
1090.2840318684284630.5680637368569260.715968131571537
1100.2464703428539270.4929406857078550.753529657146073
1110.2118898197301840.4237796394603690.788110180269815
1120.1807805188131850.361561037626370.819219481186815
1130.3427909298414160.6855818596828310.657209070158584
1140.6092791989077920.7814416021844150.390720801092208
1150.7517792823180040.4964414353639920.248220717681996
1160.7665883504359330.4668232991281340.233411649564067
1170.725209758376730.5495804832465390.274790241623270
1180.727959710740730.5440805785185410.272040289259271
1190.6918559517101080.6162880965797840.308144048289892
1200.6451335942067220.7097328115865570.354866405793278
1210.6309360707674710.7381278584650570.369063929232529
1220.5836140541148620.8327718917702750.416385945885138
1230.556922291396870.886155417206260.44307770860313
1240.5127235748556810.9745528502886380.487276425144319
1250.6248906801875940.7502186396248120.375109319812406
1260.6317864755275530.7364270489448940.368213524472447
1270.6045084210579320.7909831578841370.395491578942068
1280.808049217626460.3839015647470790.191950782373540
1290.7635765410133860.4728469179732270.236423458986614
1300.7614432541832780.4771134916334450.238556745816722
1310.8051538092881020.3896923814237960.194846190711898
1320.8081654535497230.3836690929005540.191834546450277
1330.7647374771927360.4705250456145270.235262522807264
1340.709996738808310.580006522383380.29000326119169
1350.7599561603638530.4800876792722940.240043839636147
1360.8193431167464090.3613137665071820.180656883253591
1370.8621674609377960.2756650781244080.137832539062204
1380.9282830071408650.1434339857182700.0717169928591349
1390.9537275725488350.09254485490233030.0462724274511651
1400.9383013004431950.1233973991136100.0616986995568051
1410.9215511081573210.1568977836853580.0784488918426788
1420.9092460493100760.1815079013798470.0907539506899236
1430.9275348334963540.1449303330072920.0724651665036461
1440.9036145325545720.1927709348908570.0963854674454284
1450.8603480073960590.2793039852078820.139651992603941
1460.8908267467336860.2183465065326270.109173253266314
1470.8271371032772760.3457257934454490.172862896722724
1480.7322006051627460.5355987896745080.267799394837254
1490.883962565343390.2320748693132210.116037434656610
1500.8384490235032580.3231019529934840.161550976496742
1510.6973981402802380.6052037194395230.302601859719762


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level60.0416666666666667NOK
5% type I error level120.0833333333333333NOK
10% type I error level160.111111111111111NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/10h4991292234768.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/10h4991292234768.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/22uci1292234768.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/22uci1292234768.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/32uci1292234768.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/32uci1292234768.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/42uci1292234768.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292234735rinfzma1iw08ihn/42uci1292234768.ps (open in new window)


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


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


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


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


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


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