Home » date » 2010 » Dec » 12 »

Workshop 10 (2)

*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: Sun, 12 Dec 2010 10:42:03 +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/12/t1292150871zrpy0qij51kw5cp.htm/, Retrieved Sun, 12 Dec 2010 11:48:02 +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/12/t1292150871zrpy0qij51kw5cp.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 «
13 15 42 14 13 12 18 51 8 13 15 11 42 12 16 12 16 46 7 12 10 12 41 10 11 12 17 49 7 12 15 15 47 16 18 9 19 33 11 11 12 16 33 14 14 11 18 47 6 9 11 10 42 16 14 11 14 32 11 12 15 18 53 16 11 7 18 41 12 12 11 14 41 7 13 11 14 33 13 11 10 12 37 11 12 14 16 43 15 16 10 15 45 7 9 6 13 33 9 11 11 16 49 7 13 15 14 42 14 15 11 9 43 15 10 12 9 37 7 11 14 17 43 15 13 15 13 42 17 16 9 15 43 15 15 13 17 46 14 14 13 16 33 14 14 16 12 42 8 14 13 11 40 8 8 12 16 44 14 13 14 17 42 14 15 11 17 52 8 13 9 16 44 11 11 16 13 45 16 15 12 12 46 10 15 10 12 36 8 9 13 16 45 14 13 16 14 49 16 16 14 12 43 13 13 15 12 43 5 11 5 14 37 8 12 8 8 32 10 12 11 15 45 8 12 16 14 45 13 14 17 11 45 15 14 9 13 45 6 8 9 14 31 12 13 13 15 33 16 16 10 16 44 5 13 6 10 49 15 11 12 11 44 12 14 8 12 41 8 13 14 14 44 13 13 12 15 38 14 13 11 16 33 12 12 16 9 47 16 16 8 11 37 10 15 15 15 48 15 15 7 15 40 8 12 16 13 50 16 14 14 17 54 19 12 16 17 43 14 15 9 15 54 6 12 14 13 44 13 13 11 15 47 15 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Y1[t] = -0.996170178492618 -0.0268429787707296X1[t] + 0.0790401730395211X2[t] + 0.323763854841615X3[t] + 0.474394463844188`X4 `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.9961701784926181.607037-0.61990.5362840.268142
X1-0.02684297877072960.077845-0.34480.7307120.365356
X20.07904017303952110.0250263.15840.0019210.000961
X30.3237638548416150.0588115.505200
`X4 `0.4743944638441880.0939955.0471e-061e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.6876699174452
R-squared0.472889915359088
Adjusted R-squared0.458739309060003
F-TEST (value)33.4183500949828
F-TEST (DF numerator)4
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.16086383895017
Sum Squared Residuals695.730547041885


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11312.62069440536340.37930559463656
21211.30894389735720.691056102642809
31513.50372200229561.49627799770435
41210.16927067101531.83072932898474
51010.3783388215812-0.378338821581222
61210.37954821136311.62045178863692
71516.0353952994652-1.03539529946516
899.88188044071155-0.881880440711552
91212.3568843330811-0.35688433308115
10118.447677640139132.55232235986087
111113.8768314727444-2.87683147274445
121110.41144962536990.588550374630133
131513.10834615448081.89165384551922
14711.3392031224843-4.33920312248425
151110.30215022720330.697849772796714
161110.66362304424840.336376955751568
171010.8603364481089-0.860336448108933
181414.4198388460064-0.419838846006353
19108.693890085213891.30610991478611
2069.3954106036527-3.3954106036527
211110.8807856539780.119214346022004
221513.59632631182251.40367368817751
231111.7613729143363-0.761372914336336
24129.171415501210482.82858449878953
251412.96981247570311.03018752429694
261515.0688553189623-0.0688553189622511
27913.9722873609329-4.9722873609329
281313.3575636038242-0.357563603824196
291312.35688433308110.64311566691885
301611.23303467647014.76696532352993
31138.255430526096634.74456947390337
321212.7519317726717-0.751931772671696
331413.51579737551030.484202624489701
341111.4148270491674-0.414827049167445
35910.8318512804585-1.83185128045848
361614.50781751939501.49218248060499
371212.6711175421556-0.671117542155571
38108.3868213190121.61317868098800
391312.83097194571120.169028054288782
401615.27152969662660.728470303373445
411412.45649965987351.54350034012652
42158.917599893452186.08240010654782
4359.83535892604263-4.83535892604263
44810.2487436431526-2.24874364315263
451110.44083733158810.559162668411931
461613.03528851225522.96471148774475
471713.76334515825073.23665484174933
4897.949417724069551.05058227593045
49911.1305677710161-2.13056777101615
501313.9800439492235-0.980043949223485
51109.838057079097160.161942920902841
52612.6831654376469-6.68316543764692
531212.7130134206863-0.713013420686302
54810.6796000395864-2.67960003958636
551412.48185387537151.51814612462846
561212.3045337132053-0.304533713205298
571110.76056769570950.239432304290455
581615.24766424440120.752335755598839
59811.9865989635706-3.98659896357061
601514.36748822613050.632511773869499
61710.0456364663905-3.04563646639046
621614.42862392074841.57137607925157
631414.6599153346601-0.659915334660067
641613.59483754854982.40516245145018
65910.5046711792605-1.50467117926053
661412.50869685414231.49130314585773
671112.8652646615584-1.86526466155842
68139.222277357813663.77772264218634
691512.53405106964032.46594893035967
7055.01075348269169-0.0107534826916893
711512.77877475144242.22122524855757
721312.71897439449010.281025605509896
731112.3609178238013-1.36091782380129
741114.5704694550089-3.57046945500892
751211.31549109586590.684508904134079
761213.2382422634104-1.23824226341036
771211.48862434170500.511375658295036
781212.6130912426799-0.613091242679853
791411.60139256289692.39860743710305
8069.45015252536896-3.45015252536896
8176.533422711197270.466577288802734
821411.84937906544832.15062093455169
831413.87968305140600.120316948593959
841011.4404606381563-1.44046063815631
85139.548585940102743.45141405989726
861211.05137417236960.948625827630432
8799.36229979986405-0.362299799864049
881212.7831150933767-0.783115093376685
891613.96468419824942.03531580175064
901010.6094983668960-0.609498366895977
911413.14402324272710.855976757272909
921013.5081942128268-3.50819421282677
931615.05976339300610.940236606993947
941513.61122578597541.38877421402457
951211.49116906915240.508830930847565
96109.228238331617460.77176166838254
9788.56878867432662-0.568788674326625
9889.35171911063518-1.35171911063518
991113.8066038521703-2.80660385217032
1001312.20268405211520.797315947884813
1011614.97445539494861.02554460505139
1021413.54055590365470.459444096345263
1031110.47037846341330.529621536586671
10447.3558828231419-3.3558828231419
1051413.06349430641490.936505693585098
106910.9648842622536-1.96488426225358
1071414.0781705127431-0.0781705127431459
108811.8268764286118-3.82687642861184
109813.0050292871282-5.00502928712819
1101112.4475611595243-1.44756115952434
1111213.2874619311338-1.28746193113381
1121110.43338759451160.566612405488402
1131413.56188017036820.438119829631772
1141513.79155095241031.20844904758968
1151612.46425624816413.53574375183593
1161613.85715885755942.14284114244061
1171413.47253868159060.527461318409354
1181411.57781240487552.42218759512451
1191212.1312470417592-0.131247041759196
1201413.76766394317470.232336056825257
121810.5304581938565-2.53045819385646
1221313.2607723779701-0.260772377970143
1231613.73501341620732.26498658379273
1241211.34757695513870.652423044861346
1251614.67768794448481.32231205551522
1261213.0488526487426-1.04885264874258
1271111.3541241536474-0.354124153647380
12845.60295304595373-1.60295304595373
1291614.30933005805791.69066994194209
1301512.28932738783822.71067261216176
1311012.2847292294234-2.28472922942336
1321313.4944766507324-0.494476650732376
1331513.08897446979671.91102553020329
1341211.50295914816320.497040851836835
1351413.73501341620730.264986583792729
136712.8232153574206-5.82321535742063
1371914.26160507432034.73839492567975
1381213.2009720210178-1.20097202101782
1391213.0594333379714-1.05943333797145
1401313.4917784976778-0.491778497677845
1411514.88647672155990.113523278440050
14287.87364037177930.126359628220702
1431211.7745258087360.225474191264012
144109.83194267968630.168057320313702
145811.1793487189286-3.17934871892861
1461014.7358461125574-4.73584611255738
1471513.79481377315961.20518622684041
1481613.16056490575982.83943509424024
1491312.08053861076310.919461389236928
1501615.13268916663470.867310833365288
151911.4759627437854-2.47596274378538
1521412.89660140787051.10339859212953
1531412.83081852010421.16918147989584
1541212.8888448195799-0.888844819579876


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.1222955286431410.2445910572862820.877704471356859
90.04803625668720070.09607251337440130.9519637433128
100.03972195243210370.07944390486420750.960278047567896
110.04100068551002720.08200137102005450.958999314489973
120.01827497683168800.03654995366337590.981725023168312
130.05188765613737710.1037753122747540.948112343862623
140.3502654606478520.7005309212957050.649734539352148
150.2626358885029770.5252717770059530.737364111497023
160.2115993976038590.4231987952077190.78840060239614
170.1594512529416210.3189025058832420.840548747058379
180.1118878941980790.2237757883961590.88811210580192
190.07600209046241920.1520041809248380.92399790953758
200.1331141018851910.2662282037703820.866885898114809
210.1061308650030530.2122617300061060.893869134996947
220.1036227664711580.2072455329423150.896377233528842
230.07367584897678360.1473516979535670.926324151023216
240.09411726630800950.1882345326160190.90588273369199
250.08246749828517360.1649349965703470.917532501714826
260.06018334695157530.1203666939031510.939816653048425
270.2029522115245170.4059044230490330.797047788475483
280.1583890110648930.3167780221297860.841610988935107
290.1517019623579050.3034039247158110.848298037642095
300.2781959837678210.5563919675356420.721804016232179
310.3985351057502480.7970702115004950.601464894249752
320.3429338308527110.6858676617054220.657066169147289
330.3047043329122590.6094086658245190.695295667087741
340.2867982079210880.5735964158421750.713201792078912
350.2874326315730070.5748652631460130.712567368426993
360.2752414562588550.550482912517710.724758543741145
370.2544290809147620.5088581618295250.745570919085238
380.2194606180964590.4389212361929180.780539381903541
390.1809771303274860.3619542606549730.819022869672514
400.1531098925533830.3062197851067670.846890107446617
410.13265579166510.26531158333020.8673442083349
420.2929637128758340.5859274257516680.707036287124166
430.58171293697530.8365741260493990.418287063024699
440.6076526398657220.7846947202685550.392347360134277
450.5616140155475390.8767719689049220.438385984452461
460.598660721819780.802678556360440.40133927818022
470.6383784900827850.723243019834430.361621509917215
480.6126480126625660.7747039746748680.387351987337434
490.5882472363762750.8235055272474510.411752763623725
500.5573816503149670.8852366993700660.442618349685033
510.5144870827547720.9710258344904560.485512917245228
520.9106590957835420.1786818084329160.089340904216458
530.893812686544610.2123746269107800.106187313455390
540.9151865644208920.1696268711582150.0848134355791076
550.9051145431434510.1897709137130990.0948854568565493
560.8841961551009950.2316076897980110.115803844899005
570.8618078586140690.2763842827718630.138192141385931
580.8361924669967150.3276150660065690.163807533003285
590.8990653379804230.2018693240391530.100934662019577
600.8777499443408060.2445001113183880.122250055659194
610.9022367797606570.1955264404786860.0977632202393432
620.88920697633040.2215860473392020.110793023669601
630.8693286532284960.2613426935430090.130671346771504
640.8772163060910280.2455673878179440.122783693908972
650.880331249291420.2393375014171590.119668750708580
660.8663534366049290.2672931267901420.133646563395071
670.8616277619467890.2767444761064220.138372238053211
680.9120616306164190.1758767387671620.0879383693835812
690.9168563868364030.1662872263271940.083143613163597
700.8998487630802670.2003024738394660.100151236919733
710.9006848492280960.1986303015438080.0993151507719041
720.8786985534764710.2426028930470570.121301446523529
730.8650236760894670.2699526478210660.134976323910533
740.9090266526531550.181946694693690.0909733473468451
750.8916866593235970.2166266813528060.108313340676403
760.8772503424671220.2454993150657560.122749657532878
770.8547807671876850.2904384656246300.145219232812315
780.8289334137108880.3421331725782230.171066586289112
790.8392689513483240.3214620973033520.160731048651676
800.8803873144759780.2392253710480440.119612685524022
810.8597702957631910.2804594084736170.140229704236809
820.8597787317144190.2804425365711620.140221268285581
830.8316036097465860.3367927805068290.168396390253414
840.8136249852597140.3727500294805710.186375014740286
850.8787175060080670.2425649879838660.121282493991933
860.8587075354971890.2825849290056230.141292464502811
870.8329948596328230.3340102807343540.167005140367177
880.8054808128876280.3890383742247440.194519187112372
890.7996267275962450.4007465448075090.200373272403755
900.7666700296236220.4666599407527560.233329970376378
910.7367104198895390.5265791602209220.263289580110461
920.8043168187606530.3913663624786940.195683181239347
930.773837813558490.452324372883020.22616218644151
940.7489349409603450.5021301180793110.251065059039655
950.7131598524687030.5736802950625940.286840147531297
960.6842064018154910.6315871963690180.315793598184509
970.6444614223316750.711077155336650.355538577668325
980.6125259577425740.7749480845148530.387474042257426
990.6569059998155740.6861880003688530.343094000184426
1000.6204711757955130.7590576484089730.379528824204486
1010.5794534535223510.8410930929552970.420546546477649
1020.570288775939930.859422448120140.42971122406007
1030.5596173406829540.8807653186340930.440382659317046
1040.5905257540632680.8189484918734650.409474245936732
1050.5502121612281720.8995756775436560.449787838771828
1060.5733347057328570.8533305885342850.426665294267143
1070.5274531809665740.9450936380668530.472546819033426
1080.6544628492677410.6910743014645170.345537150732259
1090.7858802080437710.4282395839124570.214119791956229
1100.7809245430413820.4381509139172360.219075456958618
1110.7608572257650210.4782855484699580.239142774234979
1120.7207926998617370.5584146002765270.279207300138263
1130.6735971970008130.6528056059983750.326402802999187
1140.6312833106412120.7374333787175750.368716689358788
1150.6528300805657790.6943398388684420.347169919434221
1160.6569388953960430.6861222092079130.343061104603957
1170.6042889618114930.7914220763770140.395711038188507
1180.6217306969970760.7565386060058480.378269303002924
1190.5649586586614690.8700826826770630.435041341338531
1200.5151037707916670.9697924584166660.484896229208333
1210.5593397276884920.8813205446230160.440660272311508
1220.5079946048611840.9840107902776330.492005395138816
1230.5078159879716290.9843680240567420.492184012028371
1240.5023943503686670.9952112992626670.497605649631333
1250.4513425245161460.9026850490322910.548657475483854
1260.4009057169021070.8018114338042140.599094283097893
1270.3813185691208240.7626371382416480.618681430879176
1280.3279626144770130.6559252289540250.672037385522987
1290.2768126649133210.5536253298266420.723187335086679
1300.3256686404414610.6513372808829230.674331359558539
1310.3248660108708840.6497320217417680.675133989129116
1320.2664261518804350.5328523037608690.733573848119565
1330.2414851905437750.482970381087550.758514809456225
1340.2008946921049400.4017893842098810.79910530789506
1350.1516823381698980.3033646763397970.848317661830101
1360.3043184966160070.6086369932320130.695681503383993
1370.6181237409076240.7637525181847520.381876259092376
1380.5556180266577750.888763946684450.444381973342225
1390.6229287166641130.7541425666717740.377071283335887
1400.5901920641554110.8196158716891790.409807935844589
1410.5557013251985050.888597349602990.444298674801495
1420.5121789754842870.9756420490314260.487821024515713
1430.3947529864469040.7895059728938070.605247013553096
1440.4616181247161590.9232362494323190.538381875283841
1450.3887497141774490.7774994283548980.611250285822551
1460.7589015246878660.4821969506242690.241098475312134


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.00719424460431655OK
10% type I error level40.0287769784172662OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/10kaf51292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/10kaf51292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/16ize1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/16ize1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/26ize1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/26ize1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/36ize1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/36ize1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/4hahh1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/4hahh1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/5hahh1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/5hahh1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/6hahh1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/6hahh1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/7a1yk1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/7a1yk1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/8a1yk1292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/8a1yk1292150512.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/9kaf51292150512.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150871zrpy0qij51kw5cp/9kaf51292150512.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