Home » date » 2010 » Nov » 24 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 01:04:45 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb.htm/, Retrieved Wed, 24 Nov 2010 02:05:31 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb.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 4 3 3 3 4 3 2 4 3 3 4 3 4 3 1 3 3 2 2 3 4 2 2 3 4 4 3 2 4 2 2 3 4 3 2 3 2 2 2 3 2 4 4 3 4 3 3 3 4 3 4 2 4 2 2 3 4 3 3 3 3 2 3 2 4 3 3 3 4 3 4 2 3 2 2 1 2 3 2 2 2 2 2 3 4 3 3 3 3 3 4 3 4 2 2 3 4 3 3 3 3 3 4 2 3 4 3 3 2 3 3 3 3 3 3 4 4 2 2 3 3 2 2 3 3 4 4 3 4 4 3 3 4 3 3 2 3 3 2 3 4 4 4 3 2 3 3 3 3 2 2 3 4 3 3 4 4 4 4 3 3 3 4 3 5 3 2 1 3 2 1 2 3 2 2 3 4 3 3 4 4 4 3 4 5 4 4 2 3 2 2 1 4 3 3 3 4 3 4 3 2 3 2 1 4 2 2 3 4 4 3 2 4 3 2 3 3 4 4 3 3 3 3 2 3 3 3 4 2 4 4 1 4 1 4 3 4 4 4 2 4 2 2 4 3 3 4 3 4 3 4 4 3 3 4 3 4 3 2 3 4 4 3 3 4 2 3 3 4 2 2 3 4 4 4 1 4 1 1 3 4 4 3 3 4 4 3 3 2 3 2 2 3 2 2 3 4 3 3 3 4 3 3 3 3 3 3 2 4 3 3 3 4 4 3 2 4 2 2 2 3 3 2 3 3 3 3 3 3 3 3 2 3 2 2 2 4 2 2 3 4 3 3 2 2 2 2 3 4 3 3 4 3 3 3 2 4 3 2 3 3 3 3 2 4 4 3 4 3 4 4 3 3 4 4 3 4 3 3 3 3 2 2 3 4 3 1 2 2 2 2 3 4 3 3 4 4 3 3 4 4 4 5 4 4 3 4 3 4 3 5 3 3 2 2 1 4 1 1 4 3 3 3 1 4 3 3 3 3 4 4 2 3 2 2 2 2 3 2 3 4 4 3 3 4 3 4 2 4 4 2 3 1 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 time9 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Poular[t] = + 1.35086028455801 + 0.0042491286076238Friends[t] + 0.15135129972613Considerfriends[t] + 0.341801603945097FriendStudents[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.350860284558010.3630663.72070.0002790.00014
Friends0.00424912860762380.0790780.05370.9572180.478609
Considerfriends0.151351299726130.0832781.81740.071120.03556
FriendStudents0.3418016039450970.0722834.72875e-063e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.460942309224963
R-squared0.212467812433641
Adjusted R-squared0.196924413994832
F-TEST (value)13.6693280604027
F-TEST (DF numerator)3
F-TEST (DF denominator)152
p-value6.09727346390088e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.698728939181563
Sum Squared Residuals74.2097638283684


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.847315510002200.152684489997804
232.505513906057090.494486093942914
343.184867985339650.815132014660347
432.163712302111990.83628769788801
532.349913477723330.650086522276666
632.354162606330960.645837393669042
732.998666809728310.00133319027168608
822.35416260633096-0.354162606330958
932.505513906057090.494486093942913
1032.345664349115710.65433565088429
1133.33197015645816-0.331970156458163
1232.847315510002180.152684489997816
1333.18911711394728-0.189117113947281
1422.35416260633096-0.354162606330958
1532.847315510002180.152684489997816
1632.691715081668430.308284918331569
1722.84731551000218-0.847315510002184
1833.18911711394728-0.189117113947281
1922.34991347772333-0.349913477723334
2012.49701564884184-1.49701564884184
2122.34566434911571-0.345664349115711
2232.847315510002180.152684489997816
2333.18486798533966-0.184867985339657
2432.354162606330960.645837393669042
2532.847315510002180.152684489997816
2633.18486798533966-0.184867985339657
2722.99441768112069-0.99441768112069
2832.838817252786940.161182747213063
2932.843066381394560.156933618605439
3042.354162606330961.64583739366904
3132.349913477723330.650086522276666
3233.33621928506579-0.336219285065787
3332.998666809728310.00133319027168608
3432.847315510002180.152684489997816
3522.50126477744946-0.501264777449464
3633.34046841367341-0.340468413673411
3732.838817252786940.161182747213063
3832.349913477723330.650086522276666
3932.847315510002180.152684489997816
4043.340468413673410.659531586326589
4133.18486798533966-0.184867985339657
4232.509763034664710.490236965335289
4312.00811187377824-1.00811187377824
4422.34991347772333-0.349913477723334
4532.847315510002180.152684489997816
4642.998666809728311.00133319027169
4743.344717542281030.655282457718966
4822.34991347772333-0.349913477723334
4912.84731551000218-1.84731551000218
5033.18911711394728-0.189117113947281
5132.497015648841840.50298435115816
5212.35416260633096-1.35416260633096
5332.998666809728310.00133319027168608
5422.50551390605709-0.505513906057087
5533.33621928506579-0.336219285065787
5632.843066381394560.156933618605439
5722.84306638139456-0.84306638139456
5843.331970156458160.668029843541837
5912.88641451449502-1.88641451449502
6033.34046841367341-0.340468413673411
6122.35416260633096-0.354162606330958
6243.184867985339660.815132014660343
6333.18911711394728-0.189117113947281
6443.184867985339660.815132014660343
6532.505513906057090.494486093942913
6632.998666809728310.00133319027168608
6732.695964210276050.304035789723945
6832.354162606330960.645837393669042
6933.34046841367341-0.340468413673411
7011.86100970265973-0.861009702659732
7132.998666809728310.00133319027168608
7232.998666809728310.00133319027168608
7332.497015648841840.50298435115816
7422.34991347772333-0.349913477723334
7532.847315510002180.152684489997816
7632.847315510002180.152684489997816
7732.843066381394560.156933618605439
7822.84731551000218-0.847315510002184
7932.998666809728310.00133319027168608
8022.35416260633096-0.354162606330958
8122.50126477744946-0.501264777449464
8232.843066381394560.156933618605439
8332.843066381394560.156933618605439
8422.34991347772333-0.349913477723334
8522.35416260633096-0.354162606330958
8632.847315510002180.152684489997816
8722.34566434911571-0.345664349115711
8832.847315510002180.152684489997816
8942.843066381394561.15693361860544
9022.50551390605709-0.505513906057087
9132.843066381394560.156933618605439
9222.99866680972831-0.998666809728314
9343.336219285065790.663780714934213
9433.33621928506579-0.336219285065787
9532.847315510002180.152684489997816
9632.349913477723330.650086522276666
9732.163712302111990.83628769788801
9822.34566434911571-0.345664349115711
9932.847315510002180.152684489997816
10042.847315510002181.15268448999782
10143.682270017618510.317729982381492
10243.189117113947280.810882886052719
10333.53091871789238-0.530918717892378
10432.349913477723330.650086522276666
10511.86100970265973-0.861009702659732
10642.843066381394561.15693361860544
10712.84731551000218-1.84731551000218
10833.33621928506579-0.336219285065787
10922.34991347772333-0.349913477723334
11022.49701564884184-0.49701564884184
11132.998666809728310.00133319027168608
11233.18911711394728-0.189117113947281
11322.65686520578322-0.656865205783217
11432.985919423905440.014080576094557
11532.847315510002180.152684489997816
11643.189117113947280.810882886052719
11743.189117113947280.810882886052719
11832.501264777449460.498735222550536
11932.847315510002180.152684489997816
12032.505513906057090.494486093942913
12132.843066381394560.156933618605439
12233.18911711394728-0.189117113947281
12312.65686520578322-1.65686520578322
12423.18911711394728-1.18911711394728
12543.037765814221150.962234185778848
12632.656865205783220.343134794216783
12742.843066381394561.15693361860544
12832.843066381394560.156933618605439
12922.54461291054993-0.544612910549925
13012.99866680972831-1.99866680972831
13143.189117113947280.810882886052719
13232.695964210276050.304035789723945
13332.354162606330960.645837393669042
13432.998666809728310.00133319027168608
13542.847315510002181.15268448999782
13632.998666809728310.00133319027168608
13733.03776581422115-0.0377658142211516
13812.99441768112069-1.99441768112069
13943.336219285065790.663780714934213
14023.18911711394728-1.18911711394728
14123.18911711394728-1.18911711394728
14232.838817252786940.161182747213063
14332.695964210276050.304035789723945
14422.50551390605709-0.505513906057087
14532.847315510002180.152684489997816
14632.167961430719610.832038569280386
14722.65686520578322-0.656865205783217
14833.34046841367341-0.340468413673411
14943.189117113947280.810882886052719
15042.847315510002181.15268448999782
15142.998666809728311.00133319027169
15223.03776581422115-1.03776581422115
15332.505513906057090.494486093942913
15433.34046841367341-0.340468413673411
15532.838817252786940.161182747213063
15632.847315510002180.152684489997816


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.09970772019810540.1994154403962110.900292279801895
80.1841421392626940.3682842785253880.815857860737306
90.09722486049347430.1944497209869490.902775139506526
100.08376589503093690.1675317900618740.916234104969063
110.1207479725693950.2414959451387900.879252027430605
120.0696006217458460.1392012434916920.930399378254154
130.04075709765662920.08151419531325830.95924290234337
140.05958658574326830.1191731714865370.940413414256732
150.03431359743490970.06862719486981930.96568640256509
160.01925651887363760.03851303774727520.980743481126362
170.04667641808557530.09335283617115050.953323581914425
180.02826629427274690.05653258854549370.971733705727253
190.03800364635696910.07600729271393810.96199635364303
200.2803443941833750.560688788366750.719655605816625
210.2294032800681100.4588065601362190.77059671993189
220.1762525369686840.3525050739373680.823747463031316
230.1324680628665020.2649361257330040.867531937133498
240.1098511370946070.2197022741892140.890148862905393
250.07975276419779120.1595055283955820.920247235802209
260.05674598373776770.1134919674755350.943254016262232
270.0626696535176190.1253393070352380.937330346482381
280.05385032222023040.1077006444404610.94614967777977
290.03993572703621830.07987145407243660.960064272963782
300.1089998333339250.2179996666678510.891000166666075
310.09339409218659810.1867881843731960.906605907813402
320.07146137342020510.1429227468404100.928538626579795
330.05351293925285780.1070258785057160.946487060747142
340.03877108115617120.07754216231234240.961228918843829
350.03308005420895570.06616010841791140.966919945791044
360.02409562470951520.04819124941903030.975904375290485
370.01975995598203100.03951991196406190.980240044017969
380.01622559660163250.03245119320326500.983774403398368
390.01117691772820060.02235383545640130.9888230822718
400.01464943079699970.02929886159399930.985350569203
410.01033184355007360.02066368710014710.989668156449926
420.007537579714024050.01507515942804810.992462420285976
430.01887671648761270.03775343297522550.981123283512387
440.01642352129853760.03284704259707520.983576478701462
450.01162474381526100.02324948763052210.988375256184739
460.02095525448555530.04191050897111060.979044745514445
470.0177576808991540.0355153617983080.982242319100846
480.01477040702274630.02954081404549260.985229592977254
490.1343565183257220.2687130366514450.865643481674278
500.1137309902822180.2274619805644360.886269009717782
510.1154400188144160.2308800376288310.884559981185584
520.2371223556995190.4742447113990370.762877644300481
530.2000808473159280.4001616946318560.799919152684072
540.1885578136702640.3771156273405280.811442186329736
550.1614500948006650.3229001896013310.838549905199335
560.1350633552629320.2701267105258650.864936644737068
570.1456901841314260.2913803682628510.854309815868574
580.1575204785480050.3150409570960090.842479521451995
590.3680024958604070.7360049917208140.631997504139593
600.3341844112789820.6683688225579640.665815588721018
610.3012913410320950.602582682064190.698708658967905
620.3322074290132590.6644148580265180.667792570986741
630.2918839966580720.5837679933161430.708116003341928
640.3161578926423150.632315785284630.683842107357685
650.2916935231904680.5833870463809370.708306476809532
660.2538415427081340.5076830854162690.746158457291866
670.2272250287961910.4544500575923820.772774971203809
680.2221872101186590.4443744202373180.777812789881341
690.1970891902943000.3941783805886010.8029108097057
700.2127580898611840.4255161797223670.787241910138816
710.1812613652380670.3625227304761330.818738634761933
720.1528238698189690.3056477396379390.84717613018103
730.1377592255313770.2755184510627530.862240774468623
740.1193434871636150.2386869743272310.880656512836385
750.0985025032567540.1970050065135080.901497496743246
760.08046589945780130.1609317989156030.919534100542199
770.06507200560540620.1301440112108120.934927994394594
780.07236747812281540.1447349562456310.927632521877185
790.05800184781893960.1160036956378790.94199815218106
800.04860302938107990.09720605876215970.95139697061892
810.04404778457314270.08809556914628540.955952215426857
820.03463919892401080.06927839784802160.96536080107599
830.02694170918061200.05388341836122410.973058290819388
840.02213111640185270.04426223280370530.977868883598147
850.01808962929000840.03617925858001690.981910370709992
860.01368135806617170.02736271613234330.986318641933828
870.01123934846123020.02247869692246050.98876065153877
880.008337146304660.016674292609320.99166285369534
890.01394060142493390.02788120284986780.986059398575066
900.01233250541720130.02466501083440260.987667494582799
910.009155764043337140.01831152808667430.990844235956663
920.01274376320711050.02548752641422100.98725623679289
930.01245960241201480.02491920482402960.987540397587985
940.009771683254702770.01954336650940550.990228316745297
950.00718867542906590.01437735085813180.992811324570934
960.006649658522241850.01329931704448370.993350341477758
970.00716927703937110.01433855407874220.992830722960629
980.005718777859408440.01143755571881690.994281222140592
990.00411447724623550.0082289544924710.995885522753765
1000.007156189106253020.01431237821250600.992843810893747
1010.005629016044106240.01125803208821250.994370983955894
1020.00639968175511950.0127993635102390.99360031824488
1030.005286634422416950.01057326884483390.994713365577583
1040.004784006452359270.009568012904718540.99521599354764
1050.006655351253533620.01331070250706720.993344648746466
1060.01095181340488100.02190362680976190.989048186595119
1070.05459221817161760.1091844363432350.945407781828382
1080.04383362641250040.08766725282500080.9561663735875
1090.03921296329045520.07842592658091040.960787036709545
1100.03707624620146050.0741524924029210.96292375379854
1110.02854845001063340.05709690002126690.971451549989367
1120.02141930066753770.04283860133507540.978580699332462
1130.02001555352686140.04003110705372280.979984446473139
1140.01461734930181050.02923469860362110.98538265069819
1150.01056855288637330.02113710577274660.989431447113627
1160.01211366234749400.02422732469498800.987886337652506
1170.01434421848623250.02868843697246510.985655781513767
1180.01100011215453700.02200022430907390.988999887845463
1190.007799506823163540.01559901364632710.992200493176836
1200.005952793714356280.01190558742871260.994047206285644
1210.004065077027283970.008130154054567950.995934922972716
1220.002722839128477220.005445678256954440.997277160871523
1230.01215354613321770.02430709226643530.987846453866782
1240.01793661754454030.03587323508908070.98206338245546
1250.02196356718023700.04392713436047410.978036432819763
1260.01615748066819680.03231496133639360.983842519331803
1270.02507293873372870.05014587746745740.974927061266271
1280.01794242779601610.03588485559203210.982057572203984
1290.01988637015036340.03977274030072690.980113629849637
1300.1106620576050040.2213241152100070.889337942394996
1310.1261296568627960.2522593137255920.873870343137204
1320.09677923735399260.1935584747079850.903220762646007
1330.07664585119585950.1532917023917190.92335414880414
1340.05525381686483880.1105076337296780.94474618313516
1350.08143715284356140.1628743056871230.918562847156439
1360.05820412342080450.1164082468416090.941795876579196
1370.04051686194542160.08103372389084320.959483138054578
1380.2867071467180200.5734142934360390.71329285328198
1390.2897466614664650.579493322932930.710253338533535
1400.3411469881489440.6822939762978890.658853011851056
1410.4503075084553850.900615016910770.549692491544615
1420.3632741257220730.7265482514441460.636725874277927
1430.2848621822850230.5697243645700450.715137817714977
1440.3050200754160750.6100401508321510.694979924583925
1450.2197133650638830.4394267301277660.780286634936117
1460.1555406201593220.3110812403186440.844459379840678
1470.3646953917173370.7293907834346730.635304608282663
1480.3063098183805050.612619636761010.693690181619495
1490.4635102069742370.9270204139484750.536489793025763


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level40.0279720279720280NOK
5% type I error level540.377622377622378NOK
10% type I error level720.503496503496504NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/105vr01290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/105vr01290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/1gcu61290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/1gcu61290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/2gcu61290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/2gcu61290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/394b91290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/394b91290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/494b91290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/494b91290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/52dtu1290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/52dtu1290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/62dtu1290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/62dtu1290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/7v4ax1290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/7v4ax1290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/8v4ax1290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/8v4ax1290560674.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/95vr01290560674.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290560721rxsba8erxx1qgsb/95vr01290560674.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