Home » date » 2010 » Dec » 03 »

*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: Fri, 03 Dec 2010 12:28:11 +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/03/t1291379164c0fkc3lxvp08qvl.htm/, Retrieved Fri, 03 Dec 2010 13:26:04 +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/03/t1291379164c0fkc3lxvp08qvl.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 «
0 1 0 2 0 5 0 2 0 3 0 3 0 4 0 4 0 2 0 2 0 4 0 2 0 4 0 3 0 4 0 4 1 3 3 4 4 4 4 2 2 4 4 2 2 5 5 4 0 4 0 2 0 4 0 2 0 2 0 2 0 2 0 4 1 5 5 3 3 2 2 2 2 2 2 3 3 2 2 4 1 6 6 4 4 5 5 1 1 3 3 2 2 4 4 5 0 7 0 3 0 5 0 1 0 2 0 1 0 4 0 4 1 8 8 3 3 4 4 3 3 3 3 3 3 4 4 3 0 9 0 3 0 3 0 2 0 3 0 2 0 4 0 4 0 10 0 2 0 4 0 1 0 3 0 2 0 2 0 4 1 11 11 4 4 4 4 4 4 3 3 3 3 3 3 4 0 12 0 4 0 2 0 2 0 4 0 2 0 4 0 4 1 13 13 3 3 3 3 3 3 2 2 2 2 3 3 4 1 14 14 3 3 3 3 2 2 2 2 2 2 4 4 2 0 15 0 4 0 4 0 1 0 1 0 3 0 4 0 3 1 16 16 4 4 5 5 1 1 1 1 1 1 4 4 4 0 17 0 3 0 4 0 2 0 3 0 3 0 4 0 3 0 18 0 3 0 2 0 2 0 2 0 2 0 2 0 2 1 19 19 3 3 4 4 2 2 2 2 3 3 4 4 4 0 20 0 4 0 4 0 2 0 3 0 4 0 4 0 3 1 21 21 2 2 4 4 1 1 4 4 2 2 4 4 3 1 22 22 5 5 4 4 2 2 4 4 3 3 3 3 4 0 23 0 4 0 4 0 4 0 3 0 5 0 2 0 3 1 24 24 2 2 4 4 2 2 2 2 2 2 4 4 3 0 25 0 3 0 5 0 2 0 3 0 2 0 2 0 4 0 26 0 4 0 4 0 2 0 4 0 3 0 3 0 4 1 27 27 4 4 4 4 2 2 3 3 2 2 4 4 4 0 28 0 3 0 4 0 2 0 2 0 2 0 3 0 4 1 29 29 4 4 4 4 3 3 1 1 2 2 4 4 4 1 30 30 4 4 4 4 2 2 3 3 2 2 4 4 4 0 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
neat[t] = + 3.11496151267241 -0.356877549090113pop[t] -0.00119421517556332t -0.00179540754477218pop_t[t] -0.00219470236971442standards[t] -0.0349340132681798standards_t[t] + 0.304511079436016organization[t] -0.00263513485222802organization_t[t] -0.097552907943736punished[t] -0.0910536869962877punished_t[t] -0.00449692769033478secondrate[t] + 0.00189629269507846secondrate_t[t] -0.145120416918951mistakes[t] + 0.186359455031474mistakes_t[t] + 0.0261586753641117competent[t] + 0.0520976377859459competent_t[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.114961512672410.7075994.40222.1e-051e-05
pop-0.3568775490901130.94367-0.37820.7058570.352929
t-0.001194215175563320.002018-0.59160.5550260.277513
pop_t-0.001795407544772180.00278-0.64580.5194330.259716
standards-0.002194702369714420.091643-0.02390.9809270.490464
standards_t-0.03493401326817980.136461-0.2560.7983180.399159
organization0.3045110794360160.1021622.98070.0033810.001691
organization_t-0.002635134852228020.15028-0.01750.9860340.493017
punished-0.0975529079437360.100025-0.97530.3310660.165533
punished_t-0.09105368699628770.16336-0.55740.5781390.28907
secondrate-0.004496927690334780.085287-0.05270.9580230.479012
secondrate_t0.001896292695078460.1311870.01450.9884870.494244
mistakes-0.1451204169189510.101501-1.42970.1549720.077486
mistakes_t0.1863594550314740.1479171.25990.2097610.10488
competent0.02615867536411170.1034390.25290.8007160.400358
competent_t0.05209763778594590.1639810.31770.7511710.375586


Multiple Linear Regression - Regression Statistics
Multiple R0.457606458303133
R-squared0.209403670680737
Adjusted R-squared0.126473985787108
F-TEST (value)2.52507495897678
F-TEST (DF numerator)15
F-TEST (DF denominator)143
p-value0.00239273837122178
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.743455096513655
Sum Squared Residuals79.0397437160943


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.09261014167862-0.0926101416786193
243.78240791937670.217592080623298
343.894247923319130.105752076680872
443.881816410596970.118183589403027
543.133316873001640.866683126998361
654.300105916527130.699894083472868
744.47554081772749-0.475540817727494
833.69340529037304-0.693405290373043
943.616959975951310.383040024048686
1043.967707099796990.0322929002030065
1143.380444798484060.619555201515939
1243.302174620928560.697825379071441
1343.259686515920250.740313484079747
1423.52355980129-1.52355980129
1533.87353740836969-0.87353740836969
1644.23417192120177-0.234171921201767
1733.76679691706387-0.766796917063873
1823.25388053689734-1.25388053689734
1943.851726670384630.148273329615367
2033.61589915224852-0.615899152248517
2134.02504242741884-1.02504242741884
2243.685042787807270.314957212192732
2333.21977292318718-0.219772923187180
2433.83266823430833-0.832668234308326
2544.15455734128611-0.154557341286109
2643.723198675059640.276801324940358
2743.746841299876270.253158700123725
2843.877119219377850.122880780622150
2943.557456729486090.442543270513907
3043.737872431715270.262127568284731
3153.856517144979491.14348285502051
3243.434557437624340.56544256237566
3343.51757472473470.482425275265298
3443.739696106068340.260303893931659
3533.76676399122137-0.76676399122137
3644.21540007275691-0.215400072756913
3734.04923877542472-1.04923877542472
3843.51880442053520.481195579464798
3943.572247188254650.427752811745349
4033.70537556951666-0.705375569516657
4154.216228149890050.783771850109948
4244.02498766914298-0.0249876691429773
4333.58222406068394-0.582224060683942
4434.32261339053753-1.32261339053753
4533.76728552218602-0.767285522186025
4644.25997970898001-0.259979708980013
4743.535834919470420.464165080529581
4844.01997829212459-0.0199782921245865
4943.876004673685420.123995326314582
5043.658858431636910.341141568363095
5143.931243423334150.0687565766658503
5243.872422028158730.127577971841272
5353.74596917541861.25403082458140
5433.24546762284602-0.245467622846023
5532.853473148591400.146526851408597
5653.999146901208231.00085309879177
5753.861846501639671.13815349836033
5843.962809645049080.037190354950916
5944.13754558987472-0.137545589874722
6033.36530886441046-0.36530886441046
6143.982689100127180.0173108998728226
6243.826700777129930.173299222870073
6354.265739053346710.734260946653288
6443.788850444250070.211149555749933
6543.930486165825740.0695138341742564
6654.253162552439350.746837447560647
6743.510473115395890.48952688460411
6833.64933057875426-0.649330578754259
6944.11285063266188-0.112850632661879
7043.692544954177640.307455045822363
7143.644968470700460.355031529299540
7243.877772938672250.122227061327754
7344.04980475327384-0.0498047532738431
7444.01795493504383-0.0179549350438333
7543.861375680776180.138624319223821
7633.84815026868464-0.848150268684637
7743.823095474437420.176904525562582
7833.70503925578767-0.705039255787672
7954.146884000224250.853115999775751
8043.549752892581230.450247107418774
8153.847455583024261.15254441697574
8253.48196184509731.51803815490270
8343.765539828082610.234460171917386
8443.665260002017340.334739997982659
8543.716811857050050.283188142949953
8643.678203206171190.321796793828810
8743.928069882006840.071930117993158
8854.09317651661340.906823483386601
8943.628633323085080.371366676914922
9033.97435697077599-0.974356970775987
9143.558106080770060.441893919229941
9234.35456548250055-1.35456548250055
9343.510514281966160.489485718033844
9443.472996578603180.527003421396817
9543.880606304862210.119393695137786
9643.583624490623560.416375509376438
9743.768589423338950.231410576661049
9833.56801565220917-0.568015652209173
9933.33643743459474-0.336437434594737
10033.93625614365624-0.936256143656242
10133.25874631048137-0.258746310481367
10233.63146019016171-0.631460190161706
10323.57103843171203-1.57103843171203
10433.59349841668149-0.593498416681486
10554.059020127241040.940979872758956
10623.30877261302954-1.30877261302954
10723.46914451973253-1.46914451973253
10833.00131048061677-0.00131048061677235
10933.27184660375622-0.271846603756217
11033.91213122857843-0.912131228578426
11143.573343413634440.426656586365564
11243.57520144487280.424798555127196
11333.44508656576661-0.445086565766608
11423.71130096925346-1.71130096925346
11533.60347273295005-0.603472732950051
11643.912651773156890.0873482268431055
11722.87402336587850-0.874023365878504
11842.752255824160761.24774417583924
11943.662006398028090.337993601971911
12023.19751472346182-1.19751472346182
12134.03039228058693-1.03039228058693
12233.12242423434371-0.122424234343707
12333.00388305984289-0.00388305984289303
12444.12149769505773-0.121497695057726
12543.760561972606990.239438027393013
12643.444386494986250.555613505013755
12733.99037668410939-0.990376684109385
12843.403761807610230.596238192389774
12943.849559466899360.150440533100644
13043.517277913432140.482722086567864
13122.94283736244231-0.942837362442314
13243.752920841119270.247079158880735
13353.467236530151131.53276346984887
13443.986514105570780.0134858944292235
13543.725374222598180.274625777401822
13643.420972423359710.579027576640294
13733.56834497148300-0.568344971482995
13813.45883285102681-2.45883285102681
13943.219286637784050.780713362215954
14032.820277403400420.179722596599585
14132.956407293096030.0435927069039695
14233.59139107119343-0.591391071193428
14312.39835293598855-1.39835293598855
14443.621281064695570.378718935304433
14553.354799101761251.64520089823875
14643.466843314911510.533156685088488
14733.19899502264492-0.198995022644922
14843.115797384057550.88420261594245
14932.894018431208610.105981568791393
15043.551289269685380.448710730314619
15143.559651532516110.440348467483887
15243.373138459834340.626861540165663
15353.830029407456491.16997059254351
15422.87635824201131-0.876358242011313
15533.2172869906969-0.217286990696899
15633.72425967690575-0.724259676905746
15743.473575375020610.526424624979388
15843.546232475971210.453767524028791
15932.897968996793500.102031003206495


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
190.6888102855993010.6223794288013980.311189714400699
200.536650009800770.926699980398460.46334999019923
210.5717793710089390.8564412579821220.428220628991061
220.5000418053667780.9999163892664440.499958194633222
230.3838257775366270.7676515550732550.616174222463373
240.2967124633342240.5934249266684480.703287536665776
250.2370559193104220.4741118386208430.762944080689578
260.1656189087785140.3312378175570270.834381091221487
270.1793440989818170.3586881979636350.820655901018183
280.2597756205529640.5195512411059280.740224379447036
290.2285924029699090.4571848059398180.771407597030091
300.1822647901833050.3645295803666100.817735209816695
310.2360919670240090.4721839340480180.763908032975991
320.197939014215330.395878028430660.80206098578467
330.1498161609178610.2996323218357230.850183839082139
340.1813962509100270.3627925018200540.818603749089973
350.1743411433113330.3486822866226650.825658856688667
360.1570114630758710.3140229261517410.84298853692413
370.1336847539779500.2673695079558990.86631524602205
380.1057396371001270.2114792742002530.894260362899873
390.08515120031142160.1703024006228430.914848799688578
400.0677995763261320.1355991526522640.932200423673868
410.07723789285455890.1544757857091180.922762107145441
420.06077483562885320.1215496712577060.939225164371147
430.05147750171040590.1029550034208120.948522498289594
440.1244416151392960.2488832302785920.875558384860704
450.1163529890104450.232705978020890.883647010989555
460.1201162852745180.2402325705490370.879883714725482
470.1048033173926610.2096066347853210.89519668260734
480.1573479926270880.3146959852541770.842652007372912
490.1240976200762510.2481952401525020.875902379923749
500.0990655525791970.1981311051583940.900934447420803
510.1166699880437680.2333399760875360.883330011956232
520.09063374932510170.1812674986502030.909366250674898
530.1977127338907520.3954254677815030.802287266109248
540.1628174484736420.3256348969472840.837182551526358
550.1351927173594690.2703854347189380.86480728264053
560.1570529794522330.3141059589044670.842947020547767
570.1569803856717200.3139607713434390.84301961432828
580.1299326500608210.2598653001216420.870067349939179
590.1059518945336880.2119037890673750.894048105466312
600.1115169436231010.2230338872462010.8884830563769
610.08855628752289080.1771125750457820.91144371247711
620.06954430211576950.1390886042315390.93045569788423
630.05992842992762110.1198568598552420.940071570072379
640.04657837142615730.09315674285231470.953421628573843
650.03584602292304230.07169204584608450.964153977076958
660.03171651754453490.06343303508906980.968283482455465
670.02627123630959480.05254247261918970.973728763690405
680.03484671628109740.06969343256219490.965153283718903
690.02679836097559680.05359672195119360.973201639024403
700.02009004502810390.04018009005620780.979909954971896
710.01608915285640170.03217830571280340.983910847143598
720.01157607148816690.02315214297633390.988423928511833
730.008281484239864240.01656296847972850.991718515760136
740.005794567090943770.01158913418188750.994205432909056
750.004079422667444510.008158845334889010.995920577332555
760.006809311122276880.01361862224455380.993190688877723
770.004741879523382610.009483759046765210.995258120476617
780.006325569768070380.01265113953614080.99367443023193
790.00689899150184170.01379798300368340.993101008498158
800.005167478311622090.01033495662324420.994832521688378
810.01037845014378410.02075690028756810.989621549856216
820.0247127218030480.0494254436060960.975287278196952
830.01840145592541270.03680291185082530.981598544074587
840.01547476238988590.03094952477977170.984525237610114
850.01133132751028500.02266265502057000.988668672489715
860.008166186844233310.01633237368846660.991833813155767
870.008768756793906550.01753751358781310.991231243206093
880.008981157109396970.01796231421879390.991018842890603
890.007985369147327660.01597073829465530.992014630852672
900.01171452996963630.02342905993927250.988285470030364
910.01012886516482810.02025773032965610.989871134835172
920.02110055887347300.04220111774694610.978899441126527
930.01662310722414620.03324621444829250.983376892775854
940.01670794741405250.0334158948281050.983292052585948
950.01597753760588220.03195507521176450.984022462394118
960.01632352403565990.03264704807131980.98367647596434
970.01241734423198260.02483468846396520.987582655768017
980.01343174471484880.02686348942969760.986568255285151
990.01254883938305630.02509767876611260.987451160616944
1000.01512186205520650.03024372411041310.984878137944793
1010.01306232218188630.02612464436377260.986937677818114
1020.01180838354620270.02361676709240550.988191616453797
1030.02176787714179480.04353575428358950.978232122858205
1040.01857744409600650.03715488819201310.981422555903993
1050.02857285360752760.05714570721505520.971427146392472
1060.05125738197367560.1025147639473510.948742618026324
1070.08818479225065440.1763695845013090.911815207749346
1080.07370901696157050.1474180339231410.92629098303843
1090.05664843393449370.1132968678689870.943351566065506
1100.08939816772462360.1787963354492470.910601832275376
1110.0766673450836770.1533346901673540.923332654916323
1120.1075011903502900.2150023807005790.89249880964971
1130.1082187620917830.2164375241835660.891781237908217
1140.1384539062461830.2769078124923660.861546093753817
1150.1274637606869620.2549275213739250.872536239313037
1160.1026513532766110.2053027065532220.897348646723389
1170.1011819791606200.2023639583212400.89881802083938
1180.1506945689290700.3013891378581390.84930543107093
1190.1253327388682680.2506654777365360.874667261131732
1200.3373026020389880.6746052040779760.662697397961012
1210.3845633017579370.7691266035158750.615436698242062
1220.3243152869755130.6486305739510260.675684713024487
1230.2700453557638480.5400907115276950.729954644236152
1240.2506538575738790.5013077151477580.749346142426121
1250.2072814541328530.4145629082657050.792718545867147
1260.1949036739199330.3898073478398660.805096326080067
1270.2563171132574780.5126342265149560.743682886742522
1280.2709603574998810.5419207149997610.72903964250012
1290.2606624386482220.5213248772964450.739337561351778
1300.2420917425168090.4841834850336190.75790825748319
1310.2335708524185180.4671417048370360.766429147581482
1320.1949691885472230.3899383770944460.805030811452777
1330.2621067045262660.5242134090525330.737893295473734
1340.1990133064348980.3980266128697970.800986693565102
1350.2304752583783420.4609505167566850.769524741621658
1360.4341143156868670.8682286313737340.565885684313133
1370.3267414289808260.6534828579616520.673258571019174
1380.2783941609659910.5567883219319810.721605839034009
1390.3080921563310250.6161843126620490.691907843668975
1400.3139519915293050.627903983058610.686048008470695


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level20.0163934426229508NOK
5% type I error level350.286885245901639NOK
10% type I error level420.344262295081967NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/10b2b41291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/10b2b41291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/1njwb1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/1njwb1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/2njwb1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/2njwb1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/3ftew1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/3ftew1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/4ftew1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/4ftew1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/5ftew1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/5ftew1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/6qkvz1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/6qkvz1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/71bck1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/71bck1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/81bck1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/81bck1291379278.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/91bck1291379278.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379164c0fkc3lxvp08qvl/91bck1291379278.ps (open in new window)


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