Home » date » 2010 » Dec » 29 »

*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, 29 Dec 2010 12:28:26 +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/29/t12936256389i9b2y3h6sv9yvl.htm/, Retrieved Wed, 29 Dec 2010 13:27:30 +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/29/t12936256389i9b2y3h6sv9yvl.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 «
1567 0 2237 0 2598 0 3729 0 5715 0 5776 0 5852 0 6878 0 5488 0 3583 0 2054 0 2282 0 1552 0 2261 0 2446 0 3519 0 5161 0 5085 0 5711 0 6057 0 5224 0 3363 0 1899 0 2115 0 1491 0 2061 0 2419 0 3430 0 4778 0 4862 0 6176 0 5664 0 5529 0 3418 0 1941 0 2402 0 1579 0 2146 0 2462 0 3695 0 4831 0 5134 0 6250 0 5760 0 6249 0 2917 0 1741 0 2359 0 1511 0 2059 0 2635 0 2867 0 4403 0 5720 0 4502 0 5749 0 5627 0 2846 0 1762 0 2429 0 1169 0 2154 0 2249 0 2687 0 4359 0 5382 0 4459 0 6398 0 4596 0 3024 0 1887 0 2070 0 1351 0 2218 0 2461 0 3028 0 4784 0 4975 1 4607 1 6249 1 4809 1 3157 1 1910 1 2228 1 1673 1 2589 1 2332 1 3785 1 4916 1 5207 1 6055 1 5751 1 5247 1 3387 1 2091 1 2401 1 1664 1 2205 1 2295 1 3762 1 4890 1 5117 1 6099 1 5865 1 5594 1 3229 1 2106 1 2410 1 1583 1 2092 1 2612 1 3665 1 4880 1 5875 1 5892 1 6078 1 6515 1 3164 1 2028 1 2677 1 1580 1 2196 1 2838 1 3087 1 4726 1 6521 1 6739 1 5943 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Aantalhuwelijken[t] = + 2248.6655982906 + 169.478174603174Dummy[t] -813.27090964591M1[t] -105.655525030524M2[t] + 169.036782661784M3[t] + 1065.03678266178M4[t] + 2618.65216727716M5[t] + 3073.69230769231M6[t] + 3246.07692307692M7[t] + 3903.46153846154M8[t] + 3222.84615384615M9[t] + 955.307692307692M10[t] -376.692307692306M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2248.6655982906119.13477718.87500
Dummy169.47817460317465.8596392.57330.0110910.005545
M1-813.27090964591160.92428-5.05371e-061e-06
M2-105.655525030524160.92428-0.65660.5125230.256261
M3169.036782661784160.924281.05040.2953010.14765
M41065.03678266178160.924286.618200
M52618.65216727716160.9242816.272600
M63073.69230769231160.84451519.109700
M73246.07692307692160.84451520.181500
M83903.46153846154160.84451524.268500
M93222.84615384615160.84451520.03700
M10955.307692307692160.8445155.939300
M11-376.692307692306160.844515-2.3420.0205620.010281


Multiple Linear Regression - Regression Statistics
Multiple R0.97194288209495
R-squared0.944672966055038
Adjusted R-squared0.940030138031685
F-TEST (value)203.469299595706
F-TEST (DF numerator)12
F-TEST (DF denominator)143
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation410.074661434315
Sum Squared Residuals24047055.5969170


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115671435.39468864469131.60531135531
222372143.0100732600793.9899267399274
325982417.70238095238180.297619047623
437293313.70238095238415.297619047616
557154867.31776556777847.682234432233
657765322.35790598291453.642094017094
758525494.74252136751357.257478632492
868786152.12713675215725.872863247851
954885471.5117521367516.4882478632508
1035833203.97329059830379.026709401704
1120541871.97329059828182.026709401717
1222822248.665598290633.3344017094019
1315521435.39468864469116.605311355312
1422612143.01007326007117.989926739927
1524462417.7023809523828.2976190476187
1635193313.70238095238205.297619047619
1751614867.31776556777293.682234432235
1850855322.35790598291-237.357905982906
1957115494.74252136752216.257478632477
2060576152.12713675214-95.1271367521358
2152245471.51175213675-247.511752136752
2233633203.97329059829159.02670940171
2318991871.9732905982927.0267094017086
2421152248.6655982906-133.665598290598
2514911435.3946886446955.6053113553113
2620612143.01007326007-82.0100732600734
2724192417.702380952381.29761904761871
2834303313.70238095238116.297619047619
2947784867.31776556777-89.3177655677652
3048625322.35790598291-460.357905982906
3161765494.74252136752681.257478632477
3256646152.12713675214-488.127136752136
3355295471.5117521367557.4882478632475
3434183203.97329059829214.02670940171
3519411871.9732905982969.0267094017081
3624022248.6655982906153.334401709402
3715791435.39468864469143.605311355311
3821462143.010073260072.9899267399266
3924622417.7023809523844.2976190476187
4036953313.70238095238381.297619047619
4148314867.31776556777-36.3177655677651
4251345322.35790598291-188.357905982906
4362505494.74252136752755.257478632477
4457606152.12713675214-392.127136752136
4562495471.51175213675777.488247863247
4629173203.97329059829-286.97329059829
4717411871.97329059829-130.973290598291
4823592248.6655982906110.334401709402
4915111435.3946886446975.6053113553113
5020592143.01007326007-84.0100732600734
5126352417.70238095238217.297619047619
5228673313.70238095238-446.702380952381
5344034867.31776556777-464.317765567765
5457205322.35790598291397.642094017094
5545025494.74252136752-992.742521367523
5657496152.12713675214-403.127136752136
5756275471.51175213675155.488247863247
5828463203.97329059829-357.97329059829
5917621871.97329059829-109.973290598291
6024292248.6655982906180.334401709402
6111691435.39468864469-266.394688644689
6221542143.0100732600710.9899267399266
6322492417.70238095238-168.702380952381
6426873313.70238095238-626.70238095238
6543594867.31776556777-508.317765567765
6653825322.3579059829159.6420940170937
6744595494.74252136752-1035.74252136752
6863986152.12713675214245.872863247864
6945965471.51175213675-875.511752136752
7030243203.97329059829-179.973290598290
7118871871.9732905982915.0267094017086
7220702248.6655982906-178.665598290598
7313511435.39468864469-84.3946886446887
7422182143.0100732600774.9899267399265
7524612417.7023809523843.2976190476187
7630283313.70238095238-285.702380952381
7747844867.31776556777-83.3177655677652
7849755491.83608058608-516.836080586081
7946075664.2206959707-1057.22069597070
8062496321.60531135531-72.6053113553099
8148095640.98992673993-831.989926739926
8231573373.45146520146-216.451465201465
8319102041.45146520147-131.451465201466
8422282418.14377289377-190.143772893772
8516731604.8728632478668.1271367521368
8625892312.48824786325276.511752136752
8723322587.18055555556-255.180555555556
8837853483.18055555556301.819444444444
8949165036.79594017094-120.795940170940
9052075491.83608058608-284.836080586081
9160555664.2206959707390.779304029303
9257516321.60531135531-570.60531135531
9352475640.98992673993-393.989926739927
9433873373.4514652014613.5485347985350
9520912041.4514652014749.5485347985342
9624012418.14377289377-17.1437728937722
9716641604.8728632478659.1271367521368
9822052312.48824786325-107.488247863248
9922952587.18055555556-292.180555555556
10037623483.18055555556278.819444444445
10148905036.79594017094-146.795940170940
10251175491.83608058608-374.836080586081
10360995664.2206959707434.779304029303
10458656321.60531135531-456.60531135531
10555945640.98992673993-46.9899267399269
10632293373.45146520146-144.451465201465
10721062041.4514652014764.5485347985342
10824102418.14377289377-8.1437728937722
10915831604.87286324786-21.8728632478631
11020922312.48824786325-220.488247863248
11126122587.1805555555624.8194444444442
11236653483.18055555556181.819444444445
11348805036.79594017094-156.795940170940
11458755491.83608058608383.163919413919
11558925664.2206959707227.779304029303
11660786321.60531135531-243.60531135531
11765155640.98992673993874.010073260073
11831643373.45146520146-209.451465201465
11920282041.45146520147-13.4514652014658
12026772418.14377289377258.856227106227
12115801604.87286324786-24.8728632478631
12221962312.48824786325-116.488247863248
12328382587.18055555556250.819444444444
12430873483.18055555556-396.180555555555
12547265036.79594017094-310.795940170940
12665215491.836080586081029.16391941392
12767395664.22069597071074.77930402930
12859436321.60531135531-378.60531135531
12962655640.98992673993624.010073260073
13033233373.45146520146-50.451465201465
13120982041.4514652014756.5485347985342
13225442418.14377289377125.856227106227
13314421604.87286324786-162.872863247863
13423072312.48824786325-5.48824786324774
13528112587.18055555556223.819444444444
13634613483.18055555556-22.1805555555554
13754515036.79594017094414.20405982906
13854815491.83608058608-10.8360805860811
13951145664.2206959707-550.220695970697
14083816321.605311355312059.39468864469
14152155640.98992673993-425.989926739927
14237003373.45146520146326.548534798535
14321222041.4514652014780.5485347985342
14423112418.14377289377-107.143772893772
14515151604.87286324786-89.8728632478631
14623512312.4882478632538.5117521367523
14722892587.18055555556-298.180555555556
14833803483.18055555556-103.180555555555
14953985036.79594017094361.20405982906
15052425491.83608058608-249.836080586081
15151625664.2206959707-502.220695970697
15263916321.6053113553169.39468864469
15359585640.98992673993317.010073260073
15437273373.45146520146353.548534798535
15518832041.45146520147-158.451465201466
15621912418.14377289377-227.143772893772


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.02245695050856520.04491390101713030.977543049491435
170.1065022788963790.2130045577927580.89349772110362
180.2222030304573950.4444060609147890.777796969542605
190.1371154857910670.2742309715821350.862884514208933
200.2752898656072030.5505797312144070.724710134392797
210.2062752666737100.4125505333474210.79372473332629
220.1474280285678300.2948560571356590.85257197143217
230.09811350549558310.1962270109911660.901886494504417
240.0638768715160780.1277537430321560.936123128483922
250.03864952820216860.07729905640433720.961350471797831
260.0249574325841190.0499148651682380.975042567415881
270.01455293233468130.02910586466936260.985447067665319
280.009272225475558140.01854445095111630.990727774524442
290.02164010291127660.04328020582255320.978359897088723
300.03139619655489040.06279239310978080.96860380344511
310.03363008991568150.0672601798313630.966369910084318
320.07847957828246170.1569591565649230.921520421717538
330.05728644665609220.1145728933121840.942713553343908
340.04032888416766510.08065776833533020.959671115832335
350.02707391323628320.05414782647256630.972926086763717
360.01949856573689620.03899713147379240.980501434263104
370.01281132153781000.02562264307562000.98718867846219
380.00809172889494880.01618345778989760.991908271105051
390.00501546413161350.0100309282632270.994984535868386
400.003621417481427470.007242834962854940.996378582518572
410.003414791014219860.006829582028439730.99658520898578
420.002129451931964310.004258903863928610.997870548068036
430.002930602471473110.005861204942946210.997069397528527
440.003211854073915710.006423708147831430.996788145926084
450.01573313395277810.03146626790555620.984266866047222
460.01868253852378820.03736507704757630.981317461476212
470.01404704750173060.02809409500346120.98595295249827
480.009968887481797330.01993777496359470.990031112518203
490.006908479930580950.01381695986116190.993091520069419
500.004686520034819250.00937304006963850.99531347996518
510.003521813371146390.007043626742292790.996478186628854
520.007527391218254870.01505478243650970.992472608781745
530.01373167769016670.02746335538033350.986268322309833
540.01713065581612590.03426131163225180.982869344183874
550.1772051003513730.3544102007027450.822794899648628
560.1620343537182860.3240687074365730.837965646281714
570.1389969781514360.2779939563028730.861003021848564
580.1342464956504160.2684929913008310.865753504349584
590.1095886885125280.2191773770250550.890411311487472
600.09382611719665720.1876522343933140.906173882803343
610.08339604984329850.1667920996865970.916603950156702
620.06622381249610960.1324476249922190.93377618750389
630.05468768153036460.1093753630607290.945312318469635
640.07725524039499660.1545104807899930.922744759605003
650.08682244106398830.1736448821279770.913177558936012
660.07042343101345580.1408468620269120.929576568986544
670.2087344326619000.4174688653238000.7912655673381
680.195217348566450.39043469713290.80478265143355
690.3204126355831430.6408252711662870.679587364416857
700.2825581579286670.5651163158573340.717441842071333
710.2421041458430170.4842082916860350.757895854156982
720.2111273808303800.4222547616607590.78887261916962
730.1780995279154180.3561990558308350.821900472084582
740.1492955318209290.2985910636418570.850704468179071
750.1251313390959460.2502626781918910.874868660904054
760.1078054457823280.2156108915646560.892194554217672
770.08680134502759720.1736026900551940.913198654972403
780.08099048157033430.1619809631406690.919009518429666
790.1408376320972710.2816752641945410.85916236790273
800.1455549743200110.2911099486400220.85444502567999
810.1890917433394450.3781834866788890.810908256660555
820.1725435048771510.3450870097543030.827456495122849
830.1530551140953580.3061102281907170.846944885904642
840.1310918457302470.2621836914604950.868908154269753
850.1190280718592630.2380561437185270.880971928140737
860.1235825553635630.2471651107271260.876417444636437
870.1027349461238720.2054698922477430.897265053876128
880.1057893194518170.2115786389036340.894210680548183
890.08630508446965560.1726101689393110.913694915530344
900.0760798248918090.1521596497836180.923920175108191
910.08343228566026980.1668645713205400.91656771433973
920.0989452587555730.1978905175111460.901054741244427
930.1016657067114720.2033314134229450.898334293288528
940.08320284977697550.1664056995539510.916797150223025
950.06726315838374640.1345263167674930.932736841616254
960.05277520004540150.1055504000908030.947224799954599
970.0416493574659420.0832987149318840.958350642534058
980.03144201133768280.06288402267536550.968557988662317
990.02587123070348090.05174246140696170.97412876929652
1000.02366377121764120.04732754243528250.976336228782359
1010.01797907377129380.03595814754258770.982020926228706
1020.01880003045189220.03760006090378450.981199969548108
1030.02004597505924830.04009195011849660.979954024940752
1040.0263997660764110.0527995321528220.973600233923589
1050.02269506350247750.04539012700495490.977304936497523
1060.01731782993222240.03463565986444480.982682170067778
1070.01263991729375940.02527983458751890.98736008270624
1080.008909608162749540.01781921632549910.99109039183725
1090.006162113605493160.01232422721098630.993837886394507
1100.004390187410807370.008780374821614740.995609812589193
1110.002968182709590890.005936365419181780.99703181729041
1120.002312874924113780.004625749848227570.997687125075886
1130.001648550235523590.003297100471047190.998351449764476
1140.001429273786831920.002858547573663840.998570726213168
1150.001033031766955920.002066063533911840.998966968233044
1160.001392532085642430.002785064171284860.998607467914358
1170.003736857169579700.007473714339159390.99626314283042
1180.002930510307996620.005861020615993250.997069489692003
1190.001844564909397930.003689129818795860.998155435090602
1200.001385302129468060.002770604258936120.998614697870532
1210.0008437172703728680.001687434540745740.999156282729627
1220.0005070346345909980.001014069269182000.99949296536541
1230.0003462381820957780.0006924763641915550.999653761817904
1240.0002521449455373660.0005042898910747320.999747855054463
1250.0002620008155766520.0005240016311533040.999737999184423
1260.001898002642739730.003796005285479450.99810199735726
1270.03660539058117920.07321078116235840.96339460941882
1280.1974105328906980.3948210657813960.802589467109302
1290.2483639820480390.4967279640960780.751636017951961
1300.2183279800988890.4366559601977780.78167201990111
1310.1641947211637960.3283894423275920.835805278836204
1320.1293143989377840.2586287978755690.870685601062216
1330.08983036947618950.1796607389523790.91016963052381
1340.05862239269508550.1172447853901710.941377607304914
1350.04866937408675430.09733874817350860.951330625913246
1360.02871247027662570.05742494055325140.971287529723374
1370.0167220245301690.0334440490603380.983277975469831
1380.00885922265324330.01771844530648660.991140777346757
1390.004426669735948120.008853339471896240.995573330264052
1400.6290763301872780.7418473396254450.370923669812722


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level250.2NOK
5% type I error level530.424NOK
10% type I error level650.52NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/10hfiy1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/10hfiy1293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/1seln1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/1seln1293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/23nk81293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/23nk81293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/33nk81293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/33nk81293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/43nk81293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/43nk81293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/5ee1s1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/5ee1s1293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/6ee1s1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/6ee1s1293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/776je1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/776je1293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/876je1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/876je1293625695.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/9hfiy1293625695.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936256389i9b2y3h6sv9yvl/9hfiy1293625695.ps (open in new window)


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