Home » date » 2010 » Nov » 22 »

test

*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: Mon, 22 Nov 2010 21:34:59 +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/22/t1290461892p6cywpt7vic7c4f.htm/, Retrieved Mon, 22 Nov 2010 22:38:15 +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/22/t1290461892p6cywpt7vic7c4f.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 «
5,6 5,5 6 4,8 4,4 3,5 4 4,4 2,4 8,5 4 5,6 4,8 5 4 4,8 3,2 6 4,5 8,4 4 6 3,5 4,8 4 5,5 2 8,8 4,4 5,5 5,5 4,4 6,4 6 3,5 4 4,4 6,5 3,5 5,2 5,2 7 6 4 4,8 8 5 3,2 3,2 5,5 5 6 4,8 5 4 5,6 4,4 5,5 4 4 1,6 7,5 2 5,6 3,6 4,5 4,5 5,6 3,2 5,5 4 4,4 3,2 8,5 3,5 4 5,6 8,5 5,5 5,2 6 5,5 4,5 2,8 6,4 9 5,5 5,6 3,6 7 6,5 4,8 5,6 5 4 5,6 4,4 5,5 4 4,4 3,2 7,5 4,5 3,6 3,6 7,5 3 4,4 3,6 6,5 4,5 6 3,6 8 4,5 5,6 3,6 6,5 3 5,2 4 4,5 3 3,6 6,4 9 8 6 4,4 9 2,5 4 3,2 6 3,5 4,4 3,6 8,5 4,5 5,2 6,4 4,5 3 3,2 4,4 4,5 3 8 6,4 6 2,5 4,8 4,8 9 6 4 4,8 6 3,5 4 5,6 9 5 3,6 3,6 7 4,5 5,6 4 7,5 4 3,2 3,6 8 2,5 5,6 4 5 4 4,4 4,8 5,5 4 5,2 5,6 7 5 3,6 5,6 4,5 3 4,4 4 6 4 6 5,6 8,5 3,5 4,4 6,4 2,5 2 4 3,6 6 4 5,6 4 6 4 7,2 2,4 3 2 5,6 3,2 12 10 4,4 5,2 6 4 4,8 4 6 4 5,2 3,2 7 3 3,6 2,8 3,5 2 4 6 6,5 4 6 3,6 6 4,5 8 4 6,5 3 4,8 4,8 7 3,5 4,8 5,2 4 4,5 5,6 4 5,5 2,5 5,2 4,4 4,5 2,5 4,4 3,2 5,5 4 6,8 3,6 6,5 4 4,8 5,2 5 3 5,2 4,4 5,5 4 5,6 3,2 6 3,5 5,2 3,6 4,5 3,5 6 3,6 7,5 4,5 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Depression[t] = + 5.70984648766359 -0.0799607227294421Doubts[t] -0.021800622364926Expectat[t] -0.0155788482792036Criticism[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.709846487663590.54612210.455300
Doubts-0.07996072272944210.091271-0.87610.3823430.191172
Expectat-0.0218006223649260.072838-0.29930.765110.382555
Criticism-0.01557884827920360.093796-0.16610.86830.43415


Multiple Linear Regression - Regression Statistics
Multiple R0.0855457044326433
R-squared0.00731806754687717
Adjusted R-squared-0.0118951311457638
F-TEST (value)0.380887517167045
F-TEST (DF numerator)3
F-TEST (DF denominator)155
p-value0.766914280365275
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.26562203627464
Sum Squared Residuals248.278866499113


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14.85.0486899276964-0.248689927696399
24.45.21940173625999-0.81940173625999
35.65.270320069894240.329679930105755
44.85.15471651362082-0.354716513620825
58.45.25306362348343.1469363765166
64.85.20467389357905-0.404673893579054
78.85.238942477180323.56105752281968
84.45.15243221911133-0.752432219111333
945.01276815902839-1.01276815902839
105.25.161789293304810.0382107066951858
1145.04797328324079-1.04797328324079
123.25.07373579824684-1.87373579824684
1365.256174510526270.743825489473734
145.65.154716513620820.445283486379175
1545.17580049153014-1.17580049153014
165.65.387246967001130.212753032998868
175.65.253780267939020.346219732060983
184.45.27175335880547-0.87175335880547
1945.21414091585029-1.21414091585029
205.24.991077484741220.208922515258775
212.85.04007391102343-2.24007391102343
225.64.916208595375210.683791404624792
234.85.16812101546829-0.368121015468295
245.65.090747935437270.509252064562729
254.45.17580049153014-0.775800491530138
263.65.22036268993602-1.62036268993602
274.45.21174667326304-0.811746673263044
2865.210179023209160.789820976790835
295.65.177478089661780.422521910338224
305.25.23354729562797-0.0335472956279698
313.65.24516425126605-1.64516425126604
3264.87726147467721.1227385253228
3345.1228665856717-1.1228665856717
344.45.26864247176261-0.868642471762608
355.25.166577778479310.0334222215206876
363.25.05325851671538-1.85325851671538
3785.213179962174272.78682003782573
384.85.0283470073076-0.228347007307597
3945.03635632760271-1.03635632760271
4045.1407053153955-1.1407053153955
413.64.98796659769836-1.38796659769836
425.65.19927871202670.400721287973298
433.25.16418353589206-1.96418353589206
445.65.208635786220180.391364213779817
454.45.21868509180438-0.818685091804378
465.25.143816202438360.0561837975616383
473.65.03156784242822-1.43156784242822
484.45.11722709489894-0.717227094898937
4965.196884469439450.803115530560548
504.45.02223518129963-0.622235181299632
5145.11243860972444-1.11243860972444
525.65.228868758531230.37113124146877
537.25.196884469439452.00311553056055
545.65.421381189459750.178618810540255
554.45.03657622375823-0.636576223758228
564.85.10093160216412-0.300931602164122
575.25.196884469439450.00311553056054765
583.65.25463127353728-1.65463127353728
5945.37849658918551-1.37849658918551
6065.02606271279810.973937287201895
6185.221079334391632.77892066560837
624.85.20156300653619-0.401563006536193
634.85.11890469303057-0.318904693030575
645.65.136743422754370.463256577245627
655.25.23115305304072-0.0311530530407207
664.45.22096938631387-0.82096938631387
676.85.271753358805471.52824664119453
684.85.21796844734877-0.417968447348766
695.25.138311072808250.0616889271917487
705.65.175800491530140.424199508469861
715.25.26864247176261-0.0686424717626078
7265.269359116218220.73064088378178
735.25.188378400844240.0116215991557616
7444.94819288446698-0.948192884466985
754.45.21174667326304-0.811746673263044
767.65.196884469439452.40311553056055
775.25.073625850169090.126374149830914
786.85.103325844751371.69667415524863
795.25.154716513620820.0452834863791753
803.65.16957871744442-1.56957871744442
814.45.04246815361068-0.642468153610678
8245.33572193698902-1.33572193698902
833.65.12201558007344-1.52201558007344
844.85.20167295461395-0.401672954613951
854.85.135916830221-0.335916830221003
865.25.129088359757430.0709116402425748
875.25.23115305304072-0.0311530530407207
884.85.10164824661973-0.301648246619734
8965.042578101688440.957421898311564
908.85.204673893579053.59532610642095
915.25.047146690707420.152853309292581
9265.415986007907390.584013992092608
935.25.22096938631387-0.0209693863138698
9465.179762384171270.820237615828733
9545.22419022143449-1.22419022143449
964.45.06762397223888-0.667623972238878
976.44.975388688384261.42461131161574
984.45.00437203851094-0.604372038510936
994.45.23665818267083-0.83665818267083
10045.18598415825699-1.18598415825699
10145.14860468761286-1.14860468761286
1026.45.308416184993991.09158381500601
1034.85.13698773197478-0.336987731974785
1044.45.21257326579641-0.812573265796413
1056.45.06426877597561.3357312240244
1067.65.103215896673612.49678410332639
1074.45.29044309412753-0.890443094127534
1086.45.202389599069561.19761040093044
10965.012878107106150.98712189289385
1109.65.084526161351554.51547383864845
1115.65.268642471762610.331357528237392
11265.186094106334750.813905893665253
1134.45.27018570875159-0.87018570875159
11465.20406719720120.7959328027988
1154.85.34505459811761-0.545054598117607
11645.27332100885935-1.27332100885935
1175.65.270320069894240.329679930105755
1185.25.21317996217427-0.013179962174268
1193.65.02845695538536-1.42845695538535
12065.239659121635930.760340878364065
12165.25055943281840.749440567181602
1225.65.172689604487280.427310395512722
1234.45.02377841828861-0.623778418288613
1243.25.34183376299699-2.14183376299699
1254.44.92843224739114-0.528432247391138
1264.45.11039862443536-0.71039862443536
1273.25.31381136654634-2.11381136654634
12845.17580049153014-1.17580049153014
1294.45.16729442293492-0.767294422934924
1305.25.079847624254810.120152375745192
1314.45.13063159674641-0.730631596746407
13285.228868758531232.77113124146877
13345.2631373421325-1.2631373421325
13465.32471167772880.675288322271198
1354.85.19688446943945-0.396884469439453
1365.64.998150264425210.601849735574785
1379.25.116510450443334.08348954955667
1385.65.114226155933830.485773844066166
1396.45.25306362348341.1469363765166
1404.45.06198448146611-0.661984481466113
1414.85.09385882248013-0.293858822480133
14245.08463610942931-1.08463610942931
1435.64.844670489207570.755329510792432
1444.85.11483285231169-0.314832852311689
1454.85.023061773833-0.223061773833002
1464.45.03145789435046-0.631457894350458
1474.85.16657777847931-0.366577778479313
1485.25.24755849385329-0.047558493853294
1494.45.22107933439163-0.821079334391627
1507.65.223473576978882.37652642302112
1514.85.29594822375764-0.495948223757644
1526.84.961377490158941.83862250984106
1533.65.07458680384511-1.47458680384511
1544.85.22264698444551-0.422646984445507
1557.65.038750570189962.56124942981004
1567.25.233547295627971.96645270437203
15765.079847624254810.920152375745192
1585.65.052651820337530.54734817966247
1594.44.86636116349474-0.466361163494736


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.9763945343223430.04721093135531380.0236054656776569
80.9519033864738520.09619322705229550.0480966135261478
90.919862850969680.1602742980606410.0801371490303205
100.8734981349108290.2530037301783420.126501865089171
110.81206607002410.3758678599518010.1879339299759
120.7875880455577190.4248239088845620.212411954442281
130.7107855469434470.5784289061131060.289214453056553
140.6275139946371140.7449720107257730.372486005362886
150.6550043036572310.6899913926855380.344995696342769
160.7231855862794660.5536288274410670.276814413720534
170.6548202727026850.690359454594630.345179727297315
180.671761928492560.6564761430148810.328238071507441
190.6481642799530960.7036714400938080.351835720046904
200.6801043632379490.6397912735241010.319895636762051
210.7239831092510410.5520337814979180.276016890748959
220.7757135223738430.4485729552523150.224286477626157
230.7213784112292490.5572431775415030.278621588770751
240.6809238141058710.6381523717882580.319076185894129
250.6409547019220620.7180905961558750.359045298077938
260.6709884044313020.6580231911373960.329011595568698
270.6397386130684430.7205227738631140.360261386931557
280.6074907111638090.7850185776723820.392509288836191
290.5590874947117190.8818250105765630.440912505288281
300.49882720516290.99765441032580.5011727948371
310.5521156235527370.8957687528945260.447884376447263
320.5875479371278360.8249041257443290.412452062872164
330.559270668049350.88145866390130.44072933195065
340.5248368770783180.9503262458433650.475163122921682
350.4674083881988330.9348167763976660.532591611801167
360.4713865671429050.942773134285810.528613432857095
370.7110003344301010.5779993311397970.288999665569899
380.6671047364263150.665790527147370.332895263573685
390.6380647697654220.7238704604691560.361935230234578
400.6156478983205740.7687042033588520.384352101679426
410.598069122896710.803861754206580.40193087710329
420.5520874783404270.8958250433191460.447912521659573
430.6041859239779240.7916281520441520.395814076022076
440.5649215840851170.8701568318297670.435078415914883
450.5331389735170790.9337220529658420.466861026482921
460.4839402159407610.9678804318815230.516059784059239
470.4756295819723370.9512591639446750.524370418027663
480.4342053895758120.8684107791516230.565794610424188
490.4092801291161460.8185602582322910.590719870883854
500.3687095324497430.7374190648994870.631290467550257
510.3461149953245360.6922299906490730.653885004675464
520.3051913028609870.6103826057219740.694808697139013
530.3845158578042750.769031715608550.615484142195725
540.3408710699859130.6817421399718250.659128930014087
550.3064383857865790.6128767715731580.693561614213421
560.2671610987884230.5343221975768460.732838901211577
570.2285880992830120.4571761985660230.771411900716988
580.2568831810490850.5137663620981690.743116818950916
590.2745880595697550.549176119139510.725411940430245
600.279156326473110.558312652946220.72084367352689
610.4554114919013560.9108229838027130.544588508098644
620.4122932075406010.8245864150812010.587706792459399
630.3701274628886060.7402549257772120.629872537111394
640.3334285615732030.6668571231464060.666571438426797
650.2921198280752720.5842396561505430.707880171924728
660.2681159144557260.5362318289114520.731884085544274
670.2834864028708270.5669728057416550.716513597129173
680.2490556492467850.4981112984935710.750944350753215
690.2157105354925420.4314210709850830.784289464507458
700.1872142120409470.3744284240818940.812785787959053
710.1575481542610030.3150963085220070.842451845738997
720.1384071295983720.2768142591967450.861592870401628
730.1143033090028130.2286066180056260.885696690997187
740.1039474776663580.2078949553327170.896052522333642
750.09184987705740020.18369975411480.9081501229426
760.1567894774278830.3135789548557660.843210522572117
770.1356587137988720.2713174275977440.864341286201128
780.1624841312496690.3249682624993390.83751586875033
790.1356913843047010.2713827686094020.864308615695299
800.1504863610716010.3009727221432020.849513638928399
810.1315156059765910.2630312119531810.86848439402341
820.1398427199632090.2796854399264170.860157280036791
830.1527122610588740.3054245221177490.847287738941126
840.1295234287280740.2590468574561480.870476571271926
850.1098277463201570.2196554926403130.890172253679843
860.09196942469493250.1839388493898650.908030575305067
870.07484782119113250.1496956423822650.925152178808867
880.06110176336013210.1222035267202640.938898236639868
890.05618713967745890.1123742793549180.94381286032254
900.2206192822434050.4412385644868110.779380717756595
910.1917346453349030.3834692906698060.808265354665097
920.1715339776665610.3430679553331220.828466022333439
930.1438210971347150.2876421942694290.856178902865285
940.128877093529040.257754187058080.87112290647096
950.1268348373574090.2536696747148190.87316516264259
960.1113944000625050.222788800125010.888605599937495
970.1166238470471290.2332476940942580.883376152952871
980.1022680855837870.2045361711675740.897731914416213
990.09135894350606630.1827178870121330.908641056493934
1000.0902812303778820.1805624607557640.909718769622118
1010.08822234698612240.1764446939722450.911777653013878
1020.0824345309079990.1648690618159980.917565469092001
1030.06839921857331340.1367984371466270.931600781426687
1040.05994715340278720.1198943068055740.940052846597213
1050.06023543065923270.1204708613184650.939764569340767
1060.1032293560501180.2064587121002360.896770643949882
1070.0920132622354370.1840265244708740.907986737764563
1080.08872883547709980.17745767095420.9112711645229
1090.07911388361759820.1582277672351960.920886116382402
1100.4694955174981110.9389910349962220.530504482501889
1110.4226012129416360.8452024258832730.577398787058363
1120.3901185754757490.7802371509514980.609881424524251
1130.3582048904587480.7164097809174970.641795109541252
1140.3244309034064680.6488618068129360.675569096593532
1150.2841011877408250.568202375481650.715898812259175
1160.2865558433895450.573111686779090.713444156610455
1170.2448946266746760.4897892533493510.755105373325324
1180.2053927789849160.4107855579698310.794607221015084
1190.2220611367925610.4441222735851230.777938863207439
1200.1981849617377760.3963699234755520.801815038262224
1210.1791478713483690.3582957426967390.82085212865163
1220.1488822848268990.2977645696537980.8511177151731
1230.1274058136315780.2548116272631550.872594186368422
1240.1658552504021990.3317105008043980.8341447495978
1250.1379903326775870.2759806653551740.862009667322413
1260.1227200304925090.2454400609850190.87727996950749
1270.1854987574403240.3709975148806470.814501242559676
1280.1870855288297060.3741710576594110.812914471170294
1290.1732312817887210.3464625635774420.826768718211279
1300.1378118073419510.2756236146839030.862188192658049
1310.1234524859534590.2469049719069180.876547514046541
1320.2216726277150680.4433452554301370.778327372284932
1330.2416486224226450.4832972448452910.758351377577354
1340.197335687546180.394671375092360.80266431245382
1350.1664140782409560.3328281564819120.833585921759044
1360.1301232111664740.2602464223329480.869876788833526
1370.594958682119830.810082635760340.40504131788017
1380.5275513942361820.9448972115276360.472448605763818
1390.4885350858341140.9770701716682270.511464914165886
1400.4479763225580.8959526451159990.552023677442
1410.3792579954715690.7585159909431380.620742004528431
1420.3872579397152110.7745158794304220.612742060284789
1430.3165923067498940.6331846134997870.683407693250106
1440.2486312826476230.4972625652952460.751368717352377
1450.1982100256484440.3964200512968880.801789974351556
1460.168858314784440.3377166295688810.83114168521556
1470.1258886329907130.2517772659814250.874111367009287
1480.08647370444620570.1729474088924110.913526295553794
1490.09387707512965530.1877541502593110.906122924870345
1500.1159225677690260.2318451355380520.884077432230974
1510.1127012689504090.2254025379008170.887298731049591
1520.3545981200104820.7091962400209640.645401879989518


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


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/1f11s1290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/1f11s1290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/2qb0w1290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/2qb0w1290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/3qb0w1290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/3qb0w1290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/4qb0w1290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/4qb0w1290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/5qb0w1290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/5qb0w1290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/6i2hh1290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/6i2hh1290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/7btz11290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/7btz11290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/8btz11290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/8btz11290461686.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/9btz11290461686.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290461892p6cywpt7vic7c4f/9btz11290461686.ps (open in new window)


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