Home » date » 2010 » Dec » 14 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 14 Dec 2010 11:10:42 +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/14/t1292325014pqlg8ovran0gspl.htm/, Retrieved Tue, 14 Dec 2010 12:12:28 +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/14/t1292325014pqlg8ovran0gspl.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 «
3 3 4 2 5 3 3 2 2 4 4 4 2 4 4 3 3 2 3 3 3 2 2 3 4 3 3 2 1 4 3 4 5 4 4 2 2 4 2 4 3 3 4 2 4 3 4 2 2 2 3 3 4 4 1 3 3 2 3 4 3 4 4 3 3 2 2 4 2 5 3 2 1 3 5 3 3 4 2 5 2 2 3 3 5 3 4 4 3 3 2 2 1 2 4 1 1 2 2 3 2 3 1 1 3 3 4 4 4 3 3 2 4 3 4 3 3 1 2 4 3 3 4 3 4 3 4 5 3 4 2 3 4 4 4 3 3 4 3 3 3 4 4 3 3 4 4 2 2 4 3 4 2 2 4 3 3 4 4 3 3 4 4 4 4 3 3 2 2 4 2 2 3 2 4 3 4 4 3 4 3 3 3 3 4 3 2 2 3 2 3 4 4 3 4 4 4 4 4 3 3 4 3 3 4 3 4 1 1 3 1 2 2 2 5 2 2 4 2 4 3 3 2 3 4 4 4 3 4 3 4 5 4 3 3 2 2 1 2 5 1 3 3 2 4 3 3 4 3 4 3 2 1 3 4 1 2 4 4 4 3 3 3 3 4 2 2 1 2 4 3 4 1 2 4 3 3 4 2 4 2 3 4 2 3 4 4 4 3 3 1 1 2 1 5 3 4 4 5 3 2 2 2 2 4 4 4 4 3 4 3 4 5 4 3 4 4 3 4 4 3 2 2 2 3 3 4 4 3 4 3 2 4 3 4 3 4 2 3 4 3 4 3 3 4 1 1 1 1 5 3 4 4 3 4 3 4 4 3 4 3 3 4 3 4 2 3 4 4 2 3 3 3 3 3 3 3 4 4 4 3 3 3 3 4 2 3 3 3 3 3 4 2 2 4 2 1 1 1 4 2 3 2 2 4 3 4 4 3 3 3 3 3 3 4 2 3 5 2 4 2 4 1 2 5 3 3 3 3 4 2 2 2 2 5 3 3 3 3 3 4 4 4 4 3 2 3 3 2 4 3 4 3 3 4 2 3 4 3 4 4 4 4 4 4 3 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.958098198311375 + 0.497466363851451Friends[t] -0.131819434513708Known[t] + 0.303489208454995Nfriends[t] -0.0335165464291636Before[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.9580981983113750.3273852.92650.0039580.001979
Friends0.4974663638514510.0594288.370900
Known-0.1318194345137080.046904-2.81040.0056040.002802
Nfriends0.3034892084549950.0645114.70446e-063e-06
Before-0.03351654642916360.062163-0.53920.5905640.295282


Multiple Linear Regression - Regression Statistics
Multiple R0.70337646006034
R-squared0.494738444567015
Adjusted R-squared0.481354032502565
F-TEST (value)36.9637786243207
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.563332541287094
Sum Squared Residuals47.9188763630193


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.362615236575070.637384763424932
232.659770652031650.340229347968354
343.764215432793090.235784567206915
432.99677640691580.00322359308419623
532.465793496635190.534206503364812
632.356281443576650.64371855642335
733.36875712925196-0.36875712925196
821.898665419152780.101334580847222
932.396131783004230.603868216995772
1033.22427010874142-0.224270108741423
1133.10365983920171-0.103659839201708
1232.963259860486640.0367401395133602
1333.23060390173984-0.230603901739837
1421.865148872723610.134851127276386
1532.564096384719730.435903615280266
1632.362615236575060.637384763424935
1722.30045751569232-0.300457515692317
1833.23060390173984-0.230603901739837
1922.29412372269390-0.294123722693903
2011.69835447075791-0.698354470757908
2122.52161742451952-0.521617424519523
2233.53409311019483-0.534093110194832
2332.202154627607770.797845372392228
2432.791590086545350.208409913454647
2532.699620991459220.300379008540777
2633.06526792079697-0.0652679207969651
2723.00311019991422-1.00311019991422
2832.733137537888390.266862462111613
2933.23060390173984-0.230603901739837
3043.157237015883100.842762984116904
3133.15723701588310-0.157237015883096
3233.03662674634338-0.0366267463433812
3333.50057656376567-0.500576563765668
3432.659770652031650.340229347968355
3522.03048485366649-0.0304848536664862
3633.19708735531067-0.197087355310674
3732.831440425972930.168559574027069
3832.532826589493520.467173410506484
3933.19708735531067-0.197087355310674
4043.534093110194830.465906889805168
4133.32890678982438-0.328906789824382
4233.01908378837097-0.0190837883709731
4312.12878774175103-1.12878774175103
4421.898665419152780.101334580847222
4532.963259860486640.0367401395133602
4643.665912544708540.33408745529146
4743.728070265591290.271929734408712
4822.26060717626474-0.260607176264739
4912.52795121751794-1.52795121751794
5032.699620991459220.300379008540777
5132.59761293114890.402387068851102
5212.50564383606277-1.50564383606277
5332.831440425972930.168559574027069
5422.29412372269390-0.294123722693903
5533.28905645039680-0.289056450396804
5632.396131783004230.603868216995772
5722.42964832943339-0.429648329433392
5843.230603901739840.769396098260163
5911.32783216944459-0.327832169444586
6033.83758231864983-0.837582318649827
6122.16230428818019-0.162304288180195
6243.197087355310670.802912644689326
6333.40227367568112-0.402273675681123
6443.632395998279380.367604001720624
6532.195820834609360.804179165390642
6633.19708735531067-0.197087355310674
6732.202154627607770.797845372392228
6833.46072622433809-0.46072622433809
6933.32890678982438-0.328906789824382
7011.45965160395829-0.459651603958294
7133.19708735531067-0.197087355310674
7233.19708735531067-0.197087355310674
7332.699620991459220.300379008540777
7423.07014329277254-1.07014329277254
7532.864956972402100.135043027597905
7633.00311019991422-0.00311019991421758
7732.831440425972930.168559574027069
7822.86495697240210-0.864956972402095
7933.15723701588310-0.157237015883096
8021.493168150387460.506831849612542
8122.65977065203165-0.659770652031645
8233.23060390173984-0.230603901739837
8332.831440425972930.168559574027069
8422.26431234849052-0.26431234849052
8523.25553990396764-1.25553990396764
8632.831440425972930.168559574027069
8722.12878774175103-0.128787741751031
8832.864956972402100.135043027597905
8943.534093110194830.465906889805168
9022.52795121751794-0.527951217517937
9133.32890678982438-0.328906789824382
9222.69962099145922-0.699620991459223
9343.500576563765670.499423436234332
9433.23060390173984-0.230603901739837
9532.659770652031650.340229347968355
9632.162304288180190.837695711819805
9732.167179660155770.832820339844226
9822.26060717626474-0.260607176264739
9932.26918772046610.7308122795339
10042.963259860486641.03674013951336
10143.534093110194830.465906889805168
10243.632395998279380.367604001720624
10332.534285010516350.465714989483649
10432.555133970948690.444866029051314
10511.52668469681662-0.526684696816621
10643.233232522512470.76676747748753
10712.39613178300423-1.39613178300423
10833.53409311019483-0.534093110194832
10922.06400140009565-0.0640014000956498
11021.932181965581940.0678180344180585
11132.733137537888390.266862462111613
11232.904807311829670.095192688170327
11323.09507929500035-1.09507929500035
11433.19708735531067-0.197087355310674
11533.50057656376567-0.500576563765668
11642.860081600426521.13991839957348
11743.460726224338090.53927377566191
11832.465793496635190.534206503364811
11932.699620991459220.300379008540777
12033.02541758136939-0.0254175813693874
12132.527951217517940.472048782482063
12232.927114693284840.0728853067151573
12312.16230428818019-1.16230428818019
12423.46706001733650-1.46706001733650
12543.197087355310670.802912644689326
12632.791590086545350.208409913454647
12743.500576563765670.499423436234332
12832.699620991459220.300379008540777
12922.59498431037626-0.594984310376264
13011.49316815038746-0.493168150387458
13143.500576563765670.499423436234332
13233.36242333625355-0.362423336253546
13332.162304288180190.837695711819805
13432.494434671088770.505565328911227
13543.197087355310670.802912644689326
13632.659770652031650.340229347968355
13733.23060390173984-0.230603901739837
13811.89866541915278-0.898665419152778
13943.826373153675830.173626846324168
14022.69962099145922-0.699620991459223
14122.89359814685568-0.89359814685568
14232.699620991459220.300379008540777
14332.893598146855680.106401853144321
14422.03048485366649-0.0304848536664862
14532.527951217517940.472048782482063
14633.06156274857118-0.0615627485711845
14722.16230428818019-0.162304288180195
14822.66610444503006-0.666104445030059
14933.23060390173984-0.230603901739837
15043.632395998279380.367604001720624
15143.168446180857090.83155381914291
15243.500576563765670.499423436234332
15322.03048485366649-0.0304848536664862
15433.23060390173984-0.230603901739837
15533.23060390173984-0.230603901739837
15632.092642574549230.907357425450766


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.01303456417733730.02606912835467470.986965435822663
90.05114559871749250.1022911974349850.948854401282508
100.01819524659422190.03639049318844380.981804753405778
110.04185845069145660.08371690138291330.958141549308543
120.02674343724527070.05348687449054140.97325656275473
130.01269153486699530.02538306973399070.987308465133005
140.01187796763980480.02375593527960960.988122032360195
150.00561847307609530.01123694615219060.994381526923905
160.003851388106224940.007702776212449880.996148611893775
170.01050012300748360.02100024601496730.989499876992516
180.005972219917318350.01194443983463670.994027780082682
190.01317559929240720.02635119858481430.986824400707593
200.02195384122853440.04390768245706880.978046158771466
210.03158724477846210.06317448955692410.968412755221538
220.02996233318688630.05992466637377270.970037666813114
230.05435826676132310.1087165335226460.945641733238677
240.03691056929147190.07382113858294370.963089430708528
250.02527962331033520.05055924662067030.974720376689665
260.01833544953344670.03667089906689350.981664550466553
270.06317205604707410.1263441120941480.936827943952926
280.0537879756417660.1075759512835320.946212024358234
290.03889346110195060.07778692220390130.96110653889805
300.04886917771886720.09773835543773430.951130822281133
310.04241357481924010.08482714963848010.95758642518076
320.03140916965715410.06281833931430830.968590830342846
330.02955969868529980.05911939737059950.9704403013147
340.02162794778923190.04325589557846390.978372052210768
350.01559087460722870.03118174921445740.984409125392771
360.01166918264356180.02333836528712360.988330817356438
370.007985927203067340.01597185440613470.992014072796933
380.01126635780199540.02253271560399090.988733642198005
390.008073095307795490.01614619061559100.991926904692205
400.01043437760140870.02086875520281730.989565622398591
410.008534964593567520.01706992918713500.991465035406432
420.005857834869990890.01171566973998180.994142165130009
430.03915533141789930.07831066283579870.9608446685821
440.02885560767517490.05771121535034990.971144392324825
450.02090368158312720.04180736316625450.979096318416873
460.01885452594509870.03770905189019730.981145474054901
470.01461387973907260.02922775947814520.985386120260927
480.01171028493009120.02342056986018240.98828971506991
490.1040620584185410.2081241168370810.89593794158146
500.08829302189510660.1765860437902130.911706978104893
510.07983598719533790.1596719743906760.920164012804662
520.2521643774051330.5043287548102660.747835622594867
530.2176169790564400.4352339581128810.78238302094356
540.1917468280732660.3834936561465320.808253171926734
550.1712250624548450.3424501249096900.828774937545155
560.1727698883456560.3455397766913120.827230111654344
570.1616650213015760.3233300426031510.838334978698424
580.1904510859132220.3809021718264430.809548914086778
590.1693982233639540.3387964467279070.830601776636046
600.2001390606089010.4002781212178010.7998609393911
610.1698514933767050.339702986753410.830148506623295
620.2010952762548380.4021905525096750.798904723745162
630.1839911772396720.3679823544793430.816008822760328
640.1678996397113870.3357992794227750.832100360288613
650.2073314836511650.4146629673023290.792668516348835
660.1794001716469090.3588003432938170.820599828353092
670.2157695143015060.4315390286030120.784230485698494
680.2033685030829490.4067370061658980.796631496917051
690.1816141159428750.3632282318857510.818385884057125
700.1725157116599170.3450314233198340.827484288340083
710.1474661470000280.2949322940000560.852533852999972
720.1248796590990050.249759318198010.875120340900995
730.1082330749598750.2164661499197490.891766925040125
740.176322476287620.352644952575240.82367752371238
750.1498439581057490.2996879162114970.850156041894251
760.1259372955330860.2518745910661710.874062704466914
770.1053167878150260.2106335756300530.894683212184973
780.1392009364056230.2784018728112460.860799063594377
790.1170645023753540.2341290047507080.882935497624646
800.1133338385868680.2266676771737360.886666161413132
810.1215773671215630.2431547342431250.878422632878437
820.1036195527603580.2072391055207160.896380447239642
830.08582992061402780.1716598412280560.914170079385972
840.07319157266629530.1463831453325910.926808427333705
850.1568629346711430.3137258693422850.843137065328857
860.1329054441275040.2658108882550070.867094555872496
870.1101164145544180.2202328291088370.889883585445582
880.09080358047953880.1816071609590780.90919641952046
890.08448392073595970.1689678414719190.91551607926404
900.08216716205172230.1643343241034450.917832837948278
910.07185426415706650.1437085283141330.928145735842933
920.08092176120508250.1618435224101650.919078238794917
930.07664846727681760.1532969345536350.923351532723182
940.06409498064557660.1281899612911530.935905019354423
950.05458668490048820.1091733698009760.945413315099512
960.07050381452608720.1410076290521740.929496185473913
970.08521991264602570.1704398252920510.914780087353974
980.07110670545980740.1422134109196150.928893294540193
990.0846621252888680.1693242505777360.915337874711132
1000.1326735816849950.265347163369990.867326418315005
1010.1240647001911290.2481294003822580.87593529980887
1020.1093971776230490.2187943552460970.890602822376951
1030.1020997553703710.2041995107407430.897900244629628
1040.0944973298756150.188994659751230.905502670124385
1050.08746845819042260.1749369163808450.912531541809577
1060.1009809663380880.2019619326761760.899019033661912
1070.2551493490509860.5102986981019720.744850650949014
1080.2462524880920180.4925049761840360.753747511907982
1090.2080469071862040.4160938143724080.791953092813796
1100.1747333397245030.3494666794490060.825266660275497
1110.1519672910578370.3039345821156730.848032708942163
1120.1268307739267910.2536615478535820.873169226073209
1130.2184302015083190.4368604030166370.781569798491681
1140.1886105083937550.3772210167875110.811389491606245
1150.1853466741230280.3706933482460550.814653325876972
1160.2788543873636160.5577087747272330.721145612636384
1170.2554486392137840.5108972784275670.744551360786216
1180.2484471176099120.4968942352198240.751552882390088
1190.2203440576603680.4406881153207370.779655942339632
1200.1831373959805380.3662747919610770.816862604019462
1210.1702824853546890.3405649707093780.829717514645311
1220.1366731160045310.2733462320090620.863326883995469
1230.2406702220697150.481340444139430.759329777930285
1240.6614028941164370.6771942117671260.338597105883563
1250.6920170435302830.6159659129394330.307982956469717
1260.6360826568565760.7278346862868480.363917343143424
1270.5957020396898260.8085959206203470.404297960310174
1280.5488581176921510.9022837646156970.451141882307849
1290.5212705842233250.957458831553350.478729415776675
1300.5243037167906880.9513925664186230.475696283209312
1310.5048603485429610.9902793029140770.495139651457038
1320.5037713291738950.992457341652210.496228670826105
1330.5320084976889450.935983004622110.467991502311055
1340.5250402441924020.9499195116151960.474959755807598
1350.6269126955342940.7461746089314130.373087304465706
1360.5568311117294540.8863377765410920.443168888270546
1370.5021244263892720.9957511472214560.497875573610728
1380.5566655766962730.8866688466074540.443334423303727
1390.4794775603032490.9589551206064990.520522439696751
1400.529307819125520.941384361748960.47069218087448
1410.655231976945260.689536046109480.34476802305474
1420.5785442457042040.8429115085915920.421455754295796
1430.4745615864215730.9491231728431470.525438413578427
1440.3732988291283480.7465976582566960.626701170871652
1450.3077315913414890.6154631826829780.692268408658511
1460.2117318915717510.4234637831435010.78826810842825
1470.208258128687390.416516257374780.79174187131261
1480.2946571579794450.5893143159588910.705342842020555


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00709219858156028OK
5% type I error level240.170212765957447NOK
10% type I error level370.262411347517730NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/10bhhu1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/10bhhu1292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/14y211292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/14y211292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/24y211292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/24y211292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/34y211292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/34y211292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/4ksqa1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/4ksqa1292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/5ksqa1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/5ksqa1292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/6v28d1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/6v28d1292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/7v28d1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/7v28d1292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/8i80r1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/8i80r1292325030.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/9i80r1292325030.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292325014pqlg8ovran0gspl/9i80r1292325030.ps (open in new window)


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