Home » date » 2010 » Nov » 20 »

*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: Sat, 20 Nov 2010 15:21:49 +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/20/t129026670624u7d07vzitam40.htm/, Retrieved Sat, 20 Nov 2010 16:25:18 +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/20/t129026670624u7d07vzitam40.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 «
14 24 11 12 24 26 11 25 7 8 25 23 6 17 17 8 30 25 12 18 10 8 19 23 8 18 12 9 22 19 10 16 12 7 22 29 10 20 11 4 25 25 11 16 11 11 23 21 16 18 12 7 17 22 11 17 13 7 21 25 13 23 14 12 19 24 12 30 16 10 19 18 8 23 11 10 15 22 12 18 10 8 16 15 11 15 11 8 23 22 4 12 15 4 27 28 9 21 9 9 22 20 8 15 11 8 14 12 8 20 17 7 22 24 14 31 17 11 23 20 15 27 11 9 23 21 16 34 18 11 21 20 9 21 14 13 19 21 14 31 10 8 18 23 11 19 11 8 20 28 8 16 15 9 23 24 9 20 15 6 25 24 9 21 13 9 19 24 9 22 16 9 24 23 9 17 13 6 22 23 10 24 9 6 25 29 16 25 18 16 26 24 11 26 18 5 29 18 8 25 12 7 32 25 9 17 17 9 25 21 16 32 9 6 29 26 11 33 9 6 28 22 16 13 12 5 17 22 12 32 18 12 28 22 12 25 12 7 29 23 14 29 18 10 26 30 9 22 14 9 25 23 10 18 15 8 14 17 9 17 16 5 25 23 10 20 10 8 26 23 12 15 11 8 20 25 14 20 14 10 18 24 14 33 9 6 32 24 10 29 12 8 25 23 14 23 17 7 25 21 16 26 5 4 23 24 9 18 12 8 21 24 10 20 12 8 20 28 6 11 6 4 15 16 8 28 24 20 30 20 13 26 12 8 24 29 10 22 12 8 26 27 8 17 14 6 24 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


Multiple Linear Regression - Estimated Regression Equation
Doubts[t] = + 7.47561072472881 + 0.248860445943252Concern[t] -0.105949734415458Expectations[t] + 0.147529539189439Criticism[t] -0.192213547252973Standards[t] + 0.109733980302453Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.475610724728811.5829114.72275e-063e-06
Concern0.2488604459432520.0400376.215700
Expectations-0.1059497344154580.073943-1.43290.1539410.07697
Criticism0.1475295391894390.0928761.58850.1142460.057123
Standards-0.1922135472529730.056762-3.38639e-040.00045
Organization0.1097339803024530.0566451.93720.054560.02728


Multiple Linear Regression - Regression Statistics
Multiple R0.489435601598432
R-squared0.239547208112019
Adjusted R-squared0.214695809684307
F-TEST (value)9.63918424183727
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value5.12764863902504e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.48174999937267
Sum Squared Residuals942.339708086094


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11412.29312717286231.7068728271377
21111.8542529115495-0.85425291154948
368.06227222418893-2.06227222418893
41210.94766187021821.05233812978182
589.86771537760797-1.86771537760797
61010.1722752103671-0.172275210367124
7109.815501548018540.184498451981458
8119.798257711867741.20174228813226
91610.86292597640135.13707402359868
101110.06846354793810.93153645206192
111312.46801729933280.53198270066718
121213.0446779919111-1.04467799191107
13813.0401936526073-5.0401936526073
141210.64643066955751.35356933044252
15119.216542628658631.78345737134137
1647.34559388921211-3.34559388921211
17911.0418798989866-2.04187989898656
1889.84912475091086-1.84912475091086
19810.0892984205506-2.08929842055058
201412.78573201422131.21426798577868
211512.24066353886462.75933646113537
221613.81079071214162.18920928785844
23911.7886240057284-2.7886240057284
241414.3750612147334-0.375061214733429
251111.4470289360053-0.44702893600527
2689.4086016367344-1.40860163673439
2799.57702770843313-0.577027708433134
28911.6336575242935-2.63365752429346
29910.4938670504230-1.49386705042302
3099.50925250089076-0.509252500890762
311011.7568378002112-1.75683780021115
321611.78656257954444.21343742045556
33119.177553570830221.82244642916978
34810.0509478301168-2.05094783011685
3598.731933578433420.268066421566578
361612.64966523783793.35033476216208
371112.6518033098243-1.65180330982433
38169.323564668306196.67643533169381
391212.3345724892786-0.334572489278588
401210.40812051127091.59187948872914
411412.55523100999551.44476899000448
42910.5135529720010-1.51355297200096
431010.7205770525910-0.720577052591042
4498.467233116696030.53276688330397
451010.0998879313339-0.0998879313338787
461210.12238521132491.87761478867509
471411.61859043037722.38140956962284
481412.10241708141731.89758291858266
491012.3199460232452-2.3199460232452
50149.930037175714054.06996282428595
511612.21905574437433.7809442556257
52910.4610692871838-1.46106928718378
531011.5899396475331-1.58993964753306
5469.04003585641422-3.04003585641422
55811.2797735574175-3.27977355741749
561312.42398211448310.576017885516867
571010.8246452755993-0.824645275599276
5888.9091416916669-0.909141691666905
5979.15425950080064-2.15425950080064
60159.82730075734655.1726992426535
6199.8928317189735-0.892831718973498
621010.2300011704603-0.230001170460275
631210.21279600455761.78720399544244
641310.45575712227612.54424287772387
65108.40823995068841.59176004931160
661111.8100631875226-0.810063187522588
67813.6099912716085-5.60999127160853
6899.12149677428637-0.121496774286373
69138.632326738954954.36767326104505
701110.40561970477630.594380295223702
71812.7748897940749-4.77488979407492
72910.7705154168815-1.77051541688151
73912.3432616515329-3.34326165153293
741512.51126332882672.48873667117329
75911.1799243643951-2.17992436439510
761011.5683831232456-1.56838312324565
77148.925492224975635.07450777502436
781210.95106714811911.04893285188092
791211.08607200896430.913927991035738
801111.5603427842052-0.560342784205158
811411.45482861275892.54517138724108
82611.5553411712160-5.55534117121603
831211.26666002449910.733339975500887
84810.0611961307754-2.06119613077543
851412.40021087240691.59978912759315
861110.82853569541520.171464304584769
87109.909944005595810.0900559944041932
881410.19657995960673.80342004039329
891212.0383027999684-0.0383027999683501
901011.0020524420421-1.00205244204212
911413.00890757491080.991092425089237
9258.98335267342666-3.98335267342666
931110.49772918968480.502270810315231
941010.2124533208687-0.212453320868745
95911.4401404868287-2.44014048682872
961011.4379445722869-1.43794457228688
971613.74161913510702.25838086489298
981312.82375200191720.176247998082808
99910.8098388947891-1.80983889478915
1001011.3785320767880-1.37853207678798
1011010.9689523566192-0.968952356619233
10279.47465402457373-2.47465402457373
10399.8265428213743-0.8265428213743
104810.2188112017114-2.21881120171137
1051412.84726377845961.15273622154039
1061411.64770189192352.35229810807650
107811.0805233342968-3.08052333429676
108911.5401625785906-2.54016257859058
1091411.80641633494812.19358366505185
1101410.74122910547213.25877089452788
11189.86606244753663-1.86606244753663
112813.6926336074711-5.69263360747113
113810.9525118828595-2.95251188285949
11478.55085509620331-1.55085509620331
11567.44027047059843-1.44027047059843
11689.4148100433135-1.41481004331350
11768.31398706901332-2.31398706901332
118119.878542611848731.12145738815127
1191411.84055919747662.15944080252337
1201111.1231055546712-0.123105554671159
1211111.9576290110093-0.957629011009308
122119.20908031081361.7909196891864
1231410.36967612917003.63032387082997
124810.3570748050233-2.35707480502332
1252011.48036020640788.51963979359218
1261110.31930752669050.680692473309466
12789.14405571417421-1.14405571417421
1281110.70756723233170.292432767668276
1291010.6161673181472-0.616167318147203
1301413.44859195478560.551408045214404
1311110.5581054305360.441894569463994
132910.5952141906548-1.59521419065478
13399.71061082418663-0.710610824186625
134810.1579861032424-2.15798610324236
1351012.0589843809759-2.05898438097594
1361310.71887836091522.28112163908477
1371310.11150138210102.88849861789897
138129.295575308630782.70442469136922
139810.3597383804300-2.35973838042996
1401311.01433939692891.98566060307107
1411412.43100648340811.56899351659186
1421211.66742817500660.332571824993391
1431410.91691389589673.08308610410328
1441511.29481067952253.70518932047750
1451310.51659551539372.48340448460630
1461611.85614356507834.14385643492171
147911.9965118610340-2.99651186103404
148910.4782744530865-1.47827445308649
149911.0181531709424-2.01815317094243
150811.2929483065479-3.29294830654791
151710.0317337558054-3.03173375580541
1521611.94923416719554.05076583280446
1531113.3481625806087-2.34816258060872
154910.0171718546235-1.0171718546235
155119.833263436725081.16673656327492
15699.86642518204478-0.866425182044775
1571412.47898283927281.52101716072717
1581311.02203943823141.97796056176859
1591614.46476152485541.53523847514457


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.4760910550835970.9521821101671940.523908944916403
100.3201550270949720.6403100541899440.679844972905028
110.3248035770065450.649607154013090.675196422993455
120.2332662135478370.4665324270956750.766733786452163
130.7935649342439490.4128701315121020.206435065756051
140.7182915930166480.5634168139667040.281708406983352
150.6411679409241770.7176641181516470.358832059075823
160.6876981015960450.6246037968079090.312301898403955
170.6671424506926950.665715098614610.332857549307305
180.6450498443546720.7099003112906560.354950155645328
190.576319759185510.847360481628980.42368024081449
200.5750993130201880.8498013739596240.424900686979812
210.5854050607462210.8291898785075580.414594939253779
220.5551267227454320.8897465545091360.444873277254568
230.5580177092238270.8839645815523470.441982290776173
240.5100359875155980.9799280249688030.489964012484402
250.439543343723470.879086687446940.56045665627653
260.3772782191390640.7545564382781270.622721780860936
270.3140968973300820.6281937946601640.685903102669918
280.3066929128411300.6133858256822590.69330708715887
290.2602298920831540.5204597841663080.739770107916846
300.2100381752477290.4200763504954590.78996182475227
310.1928814458251930.3857628916503850.807118554174807
320.2628840279305760.5257680558611510.737115972069424
330.2353967668760130.4707935337520270.764603233123987
340.2350070384630680.4700140769261360.764992961536932
350.191405880321680.382811760643360.80859411967832
360.2123026424518890.4246052849037780.787697357548111
370.2096481166990310.4192962333980620.790351883300969
380.6065409214176030.7869181571647940.393459078582397
390.5541357040779070.8917285918441860.445864295922093
400.5209909649787230.9580180700425550.479009035021278
410.4812581833942130.9625163667884260.518741816605787
420.4465859091935910.8931718183871810.553414090806409
430.3991132253500860.7982264507001730.600886774649914
440.3504186908920970.7008373817841930.649581309107903
450.3018315748208290.6036631496416580.69816842517917
460.285300856623610.570601713247220.71469914337639
470.2768806420432340.5537612840864690.723119357956766
480.2559988860107950.511997772021590.744001113989205
490.2566997297984690.5133994595969370.743300270201531
500.3202450943021860.6404901886043720.679754905697814
510.3708248884582010.7416497769164030.629175111541799
520.3408376593679330.6816753187358670.659162340632067
530.31493367978370.62986735956740.6850663202163
540.331760994229210.663521988458420.66823900577079
550.3516627269695550.7033254539391110.648337273030445
560.3078419809111960.6156839618223930.692158019088804
570.2702389864801310.5404779729602630.729761013519869
580.2356656989729700.4713313979459410.76433430102703
590.2232941948092940.4465883896185880.776705805190706
600.3579269921742770.7158539843485540.642073007825723
610.3174180963853760.6348361927707520.682581903614624
620.2763943664137750.5527887328275490.723605633586225
630.2565355137038470.5130710274076940.743464486296153
640.2678282665258510.5356565330517010.732171733474149
650.2440103072898300.4880206145796590.75598969271017
660.2123243296541300.4246486593082590.78767567034587
670.3900405194804410.7800810389608820.609959480519559
680.3452248333952000.6904496667904010.6547751666048
690.4348223328023870.8696446656047730.565177667197613
700.391410429384710.782820858769420.60858957061529
710.5189491596785230.9621016806429540.481050840321477
720.4964641348828470.9929282697656940.503535865117153
730.531641361916030.936717276167940.46835863808397
740.5317925426496880.9364149147006240.468207457350312
750.5199119996504820.9601760006990360.480088000349518
760.4924269756511760.9848539513023520.507573024348824
770.6444577932175810.7110844135648380.355542206782419
780.6084456071006020.7831087857987960.391554392899398
790.5690317708749190.8619364582501630.430968229125081
800.5262010242553750.947597951489250.473798975744625
810.5276742274230920.9446515451538160.472325772576908
820.6994931577085780.6010136845828440.300506842291422
830.6612887997968870.6774224004062250.338711200203113
840.6442793134014980.7114413731970050.355720686598502
850.6158431184276730.7683137631446540.384156881572327
860.571432471276690.857135057446620.42856752872331
870.525199918237690.9496001635246190.474800081762309
880.5947034542766060.8105930914467870.405296545723394
890.5501320021921650.899735995615670.449867997807835
900.5095759725822580.9808480548354840.490424027417742
910.4695217894787720.9390435789575430.530478210521228
920.5280562790193020.9438874419613960.471943720980698
930.4842672576452030.9685345152904060.515732742354797
940.437200214778860.874400429557720.56279978522114
950.4339313969345890.8678627938691790.566068603065411
960.4041008758601180.8082017517202350.595899124139882
970.3881945294911070.7763890589822140.611805470508893
980.3435949807408430.6871899614816870.656405019259157
990.3201680745847980.6403361491695950.679831925415202
1000.2903850907658410.5807701815316820.709614909234159
1010.2563523177064830.5127046354129670.743647682293517
1020.2485215058385210.4970430116770430.751478494161478
1030.2138548464631060.4277096929262110.786145153536894
1040.2040883099245410.4081766198490810.79591169007546
1050.1751053196910620.3502106393821240.824894680308938
1060.1705582360070890.3411164720141780.829441763992911
1070.1845784174631280.3691568349262550.815421582536872
1080.1892484344544850.3784968689089690.810751565545515
1090.1767211157757230.3534422315514460.823278884224277
1100.2020290859471660.4040581718943320.797970914052834
1110.1813187487825350.362637497565070.818681251217465
1120.4064985654256340.8129971308512680.593501434574366
1130.4654861537006640.9309723074013280.534513846299336
1140.4296490704198640.8592981408397280.570350929580136
1150.4221359960815160.8442719921630320.577864003918484
1160.3797399711744270.7594799423488540.620260028825573
1170.3654728599611790.7309457199223590.634527140038821
1180.3234207292343250.646841458468650.676579270765675
1190.3023314100445040.6046628200890080.697668589955496
1200.2575413582707120.5150827165414240.742458641729288
1210.2292171408644750.458434281728950.770782859135525
1220.2159628943072020.4319257886144040.784037105692798
1230.2278811625212090.4557623250424190.77211883747879
1240.2414529895261970.4829059790523950.758547010473803
1250.7909565384385380.4180869231229240.209043461561462
1260.7545370211290950.4909259577418090.245462978870905
1270.707232254855740.5855354902885210.292767745144261
1280.6506107075469150.6987785849061690.349389292453085
1290.5912115626811260.8175768746377490.408788437318874
1300.529775510485170.940448979029660.47022448951483
1310.4735939314960030.9471878629920050.526406068503997
1320.4183883637591680.8367767275183360.581611636240832
1330.3562589083787210.7125178167574420.643741091621279
1340.3167361894820380.6334723789640760.683263810517962
1350.2853675651239470.5707351302478950.714632434876053
1360.2626906262701630.5253812525403270.737309373729837
1370.2989576152246360.5979152304492730.701042384775364
1380.3079749035670510.6159498071341020.692025096432949
1390.3283313735041990.6566627470083990.671668626495801
1400.2653169781260990.5306339562521970.734683021873901
1410.2082087039308980.4164174078617960.791791296069102
1420.1580485502325650.316097100465130.841951449767435
1430.1844470314786920.3688940629573830.815552968521308
1440.1735916470909880.3471832941819750.826408352909012
1450.156255031298020.312510062596040.84374496870198
1460.2732007710779960.5464015421559910.726799228922004
1470.2397919065037310.4795838130074610.76020809349627
1480.1592210510123050.3184421020246110.840778948987695
1490.1125894178601900.2251788357203800.88741058213981
1500.1609994603014610.3219989206029220.839000539698539


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/10di6a1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/10di6a1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/1oz9y1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/1oz9y1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/2z9qj1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/2z9qj1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/3z9qj1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/3z9qj1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/4z9qj1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/4z9qj1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/5s0pm1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/5s0pm1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/6s0pm1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/6s0pm1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/7qcdv1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/7qcdv1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/8qcdv1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/8qcdv1290266498.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/9di6a1290266498.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t129026670624u7d07vzitam40/9di6a1290266498.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