Home » date » 2010 » Nov » 23 »

*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: Tue, 23 Nov 2010 20:29:46 +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/23/t12905452502qviomya2rkvhvk.htm/, Retrieved Tue, 23 Nov 2010 21:47:30 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk.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 «
24 11 12 26 14 25 7 8 23 11 17 17 8 25 6 18 10 8 23 12 18 12 9 19 8 16 12 7 29 10 20 11 4 25 10 16 11 11 21 11 18 12 7 22 16 17 13 7 25 11 23 14 12 24 13 30 16 10 18 12 23 11 10 22 8 18 10 8 15 12 15 11 8 22 11 12 15 4 28 4 21 9 9 20 9 15 11 8 12 8 20 17 7 24 8 31 17 11 20 14 27 11 9 21 15 34 18 11 20 16 21 14 13 21 9 31 10 8 23 14 19 11 8 28 11 16 15 9 24 8 20 15 6 24 9 21 13 9 24 9 22 16 9 23 9 17 13 6 23 9 24 9 6 29 10 25 18 16 24 16 26 18 5 18 11 25 12 7 25 8 17 17 9 21 9 32 9 6 26 16 33 9 6 22 11 13 12 5 22 16 32 18 12 22 12 25 12 7 23 12 29 18 10 30 14 22 14 9 23 9 18 15 8 17 10 17 16 5 23 9 20 10 8 23 10 15 11 8 25 12 20 14 10 24 14 33 9 6 24 14 29 12 8 23 10 23 17 7 21 14 26 5 4 24 16 18 12 8 24 9 20 12 8 28 10 11 6 4 16 6 28 24 20 20 8 26 12 8 29 13 22 12 8 27 10 17 14 6 22 8 12 7 4 28 7 14 13 8 16 15 17 12 9 25 9 21 13 6 24 10 19 14 7 28 12 18 8 9 24 13 10 11 5 23 10 29 9 5 30 11 31 11 8 24 8 19 13 8 21 9 9 10 6 25 13 20 11 8 25 11 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
D[t] = + 6.49442505844273 + 0.199709095209500CM[t] -0.152437526053681PE[t] + 0.153754981742715PC[t] + 0.0350480394488463O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.494425058442731.6081824.03848.5e-054.2e-05
CM0.1997090952095000.0385615.17911e-060
PE-0.1524375260536810.075086-2.03020.0440610.022031
PC0.1537549817427150.0959611.60230.1111470.055573
O0.03504803944884630.0539190.650.5166520.258326


Multiple Linear Regression - Regression Statistics
Multiple R0.427261498314918
R-squared0.182552387942309
Adjusted R-squared0.161319982434317
F-TEST (value)8.59781939797614
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value2.73614794954469e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.56470383287756
Sum Squared Residuals1012.96668555803


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11412.36693936346281.63306063653715
21112.4562345175697-1.45623451756966
369.40428257425454-3.40428257425454
41210.60095827294211.39904172705789
5810.3096460447821-2.30964604478208
6109.953198285366110.046801714633887
71010.3030150892343-0.303015089234263
81110.44027142279990.559728577200115
91610.10728019964325.89271980035681
10119.860277696726551.13972230327345
111311.63982161119461.36017838880540
121212.2151120253752-0.215112025375229
13811.7195281469725-3.71952814697252
141210.32057395735131.67942604264866
15119.814345421811091.18565457818891
1648.20073634169008-4.20073634169008
17911.4011339480205-2.40113394802047
1889.46386502732262-1.46386502732262
1989.81460683869148-1.81460683869148
201412.48623465517151.51376534482854
211512.32956150661902.67043849338104
221612.93292441474633.06707558525372
23911.2890142841718-2.28901428417177
241413.19717651066560.802823489334384
251110.82347003934220.176529960657836
2689.62815547344627-1.62815547344627
2799.96572690905612-0.965726909056124
28910.9315760016011-1.93157600160113
29910.6389244792007-1.63892447920074
3099.63642663608614-0.636426636086139
311011.8544286434604-1.85442864346044
321612.04450962436973.95549037563026
331110.34262568371630.657374316283711
34811.6103879844562-3.61038798445623
3599.41784539820187-0.417845398201869
361613.34695728678992.65304271321009
371113.4064742242040-2.40647422420402
38168.801224760110267.19877523988974
391212.7573572849677-0.757357284967684
401211.54029190555850.459708094441463
411412.13110435144451.86889564855548
42910.9437995313081-1.94379953130811
43109.628482405980630.371517594019369
4499.02535907618238-0.0253590761823804
451011.0003764633611-1.00037646336111
46129.919489540157622.08051045984238
471410.73318436208073.26681563791933
481413.47657030310170.523429696898287
491012.4928832681393-2.49288326813925
501410.30859000597343.69140999402656
511612.38084677736453.61915322263549
52910.3311312602836-1.33113126028360
531010.8707416084980-0.870741608497983
5468.95238850757755-2.95238850757755
55812.2038395228516-4.20383952285163
561312.10404421920380.89595578079617
571011.2351117594681-1.23511175946814
5889.44894107058361-1.44894107058361
5979.42023655011952-2.42023655011952
60159.099473037801155.90052696219885
61910.3202251862657-1.32022518626566
621010.4703110563730-0.470311056372986
631210.21240247943841.78759752056159
641311.09463634624101.90536365375896
65108.389583039984281.61041696001572
661112.7342671772141-1.73426717721407
67813.0797870240608-5.07978702406078
68910.2732587110929-1.27325871109288
69138.566162531468874.43383746853113
701110.91803501620510.081964983794875
71812.1043711517382-4.10437115173819
72910.7993499124626-1.79934991246258
73912.4941788852770-3.49417888527697
741512.03952305704532.96047694295469
75911.1990295197620-2.19902951976197
761011.2245326179846-1.22453261798456
77148.907686334145835.09231366585417
781210.77913847554751.22086152445255
791211.01095560484470.98904439515531
801111.7981786439418-0.798178643941795
811411.58989329210942.41010670789061
82610.5536648652350-4.55366486523497
831210.70772494096071.29227505903928
84810.4283093099733-2.42830930997330
851411.58330601366422.41669398633578
861110.16675345995470.833246540045342
871010.6214311267376-0.621431126737633
881410.36455675006043.63544324993963
891212.5709059197225-0.570905919722476
901010.2719412554038-0.271941255403843
911411.62392896985222.37607103014776
9259.03569863933689-4.03569863933689
93119.892712663348651.10728733665135
941010.2249529416797-0.224952941679739
95911.0959319633787-2.09593196337875
961012.2405277693925-2.24052776939253
971612.81127746709133.1887225329087
981312.12318195989030.876818040109663
99910.2719412554038-1.27194125540384
1001010.8022899178237-0.802289917823686
1011011.0747300033089-1.07473000330895
10279.31934989282313-2.31934989282313
10399.6906124162215-0.690612416221491
104810.1112325667103-2.11123256671029
1051411.96486442311442.03513557688556
1061411.10483515253602.89516484746398
107810.8360423401348-2.83604234013482
108911.3690259139327-2.36902591393273
1091411.62790317547072.37209682452934
110149.718768083242134.28123191675787
11189.00359060524915-1.00359060524915
112812.3334920351347-4.33349203513474
113811.7086439115059-3.7086439115059
114711.0303984395142-4.03039843951424
11569.56971641339212-3.56971641339212
11689.31801059858277-1.31801059858277
11769.41817233073623-3.41817233073623
1181110.10598458250550.894015417494522
1191411.42553733033182.57446266966823
1201110.33975119400920.660248805990849
1211112.6050029319880-1.60500293198795
122119.098155582112111.90184441788789
1231411.11111733699822.88888266300185
124810.3741672069406-2.3741672069406
1252011.02188351741408.97811648258605
126119.933313780985351.06668621901465
12789.4218590997916-1.42185909979160
1281110.95308305565400.0469169443460286
1291010.2501072688166-0.250107268816644
1301413.51425325392860.485746746071372
1311111.2285068236030-0.228506823602986
13299.82656895151806-0.826568951518058
13399.89269082479732-0.892690824797324
13489.73895768160593-1.73895768160593
1351010.8952105064633-0.895210506463252
1361310.94671769811792.05328230188211
137139.883429139002783.11657086099722
138129.946920282035322.05307971796468
139810.2851771468168-2.28517714681681
1401311.58331019479561.41668980520444
1411412.98822756821291.01177243178710
1421212.5077417092243-0.507741709224296
1431411.05452274752522.94547725247484
1441511.23118123095243.76881876904764
1451310.55923978197412.44076021802585
1461612.37285887015633.62714112984365
147912.1436766522372-3.14367665223718
148910.5890398372182-1.58903983721818
14999.69993961767-0.699939617670003
150810.9924103947043-2.99241039470428
151710.9666458796013-3.9666458796013
1521611.71847210816394.28152789183612
1531112.974860645492-1.97486064549199
154910.0970061521426-1.09700615214265
1551110.13963199319130.860368006808658
15699.56633055718845-0.566330557188446
1571412.48065973843231.51934026156772
1581310.91006894754832.08993105245171
1591612.95013451177773.04986548822233


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.2669434620135040.5338869240270090.733056537986496
90.9019544080636520.1960911838726970.0980455919363483
100.841208729400620.3175825411987610.158791270599381
110.7954734167480.4090531665040010.204526583252000
120.7131607261755160.5736785476489690.286839273824484
130.7930321262806130.4139357474387740.206967873719387
140.730236194729650.53952761054070.26976380527035
150.6491306027866050.7017387944267910.350869397213395
160.7033720684209920.5932558631580150.296627931579008
170.7218337120588240.5563325758823530.278166287941176
180.6751081110102950.649783777979410.324891888989705
190.6050399788550010.7899200422899970.394960021144999
200.5685994992127460.8628010015745080.431400500787254
210.5494090709533110.9011818580933770.450590929046689
220.5298330976599810.9403338046800390.470166902340019
230.5161460912712410.9677078174575190.483853908728759
240.4528915946628620.9057831893257250.547108405337138
250.3858371915935680.7716743831871350.614162808406432
260.3285941225581070.6571882451162150.671405877441893
270.2723303710210310.5446607420420610.727669628978969
280.2451950836752430.4903901673504850.754804916324757
290.2080080614153690.4160161228307370.791991938584631
300.1651979867669820.3303959735339650.834802013233018
310.1542896032668880.3085792065337750.845710396733112
320.1906217805033490.3812435610066980.809378219496651
330.1569679566684020.3139359133368030.843032043331598
340.1955457986526700.3910915973053410.80445420134733
350.1570148379188360.3140296758376720.842985162081164
360.1554459933178610.3108919866357220.844554006682139
370.1680072199597080.3360144399194150.831992780040292
380.617209331802850.7655813363943010.382790668197150
390.573540186823990.852919626352020.42645981317601
400.5211332443082420.9577335113835150.478866755691758
410.4966105871898410.9932211743796810.503389412810159
420.473274636731760.946549273463520.52672536326824
430.4208455071438450.841691014287690.579154492856155
440.3706631727029100.7413263454058190.62933682729709
450.3271924897021580.6543849794043160.672807510297842
460.3173419064417620.6346838128835250.682658093558238
470.3417083727373780.6834167454747570.658291627262622
480.2975835406255260.5951670812510520.702416459374474
490.2964127516206910.5928255032413810.70358724837931
500.3415938042743040.6831876085486070.658406195725696
510.3961996070407960.7923992140815920.603800392959204
520.3609591475731840.7219182951463680.639040852426816
530.3191609301986970.6383218603973940.680839069801303
540.3256007557863370.6512015115726740.674399244213663
550.4096887561455790.8193775122911580.590311243854421
560.3668573946184430.7337147892368850.633142605381557
570.331973804849140.663947609698280.66802619515086
580.3011673775845290.6023347551690590.69883262241547
590.2924356718981580.5848713437963160.707564328101842
600.4855912158979260.9711824317958510.514408784102074
610.448231864555890.896463729111780.55176813544411
620.4027765853855870.8055531707711730.597223414614413
630.3822801562462960.7645603124925910.617719843753704
640.3630370207234860.7260740414469720.636962979276514
650.3357710291414420.6715420582828840.664228970858558
660.3111283553714830.6222567107429670.688871644628517
670.4381829519855380.8763659039710760.561817048014462
680.4040184794695650.808036958939130.595981520530435
690.4910176227348730.9820352454697460.508982377265127
700.4443144808845170.8886289617690350.555685519115483
710.5147664922656630.9704670154686750.485233507734337
720.4919461578256730.9838923156513460.508053842174327
730.5293544357506580.9412911284986840.470645564249342
740.5459893559728110.9080212880543780.454010644027189
750.5328910135641840.9342179728716320.467108986435816
760.4979593621614470.9959187243228940.502040637838553
770.6367510441414210.7264979117171570.363248955858579
780.6025792499394750.794841500121050.397420750060525
790.5636926111287430.8726147777425140.436307388871257
800.5247085893500520.9505828212998950.475291410649948
810.5177227329477980.9645545341044040.482277267052202
820.6139895213347230.7720209573305540.386010478665277
830.5798066820082730.8403866359834550.420193317991727
840.5725900391151870.8548199217696270.427409960884813
850.5628985790873730.8742028418252540.437101420912627
860.522489091285690.955021817428620.47751090871431
870.4787677514735610.9575355029471220.521232248526439
880.5278789044295240.9442421911409510.472121095570476
890.485624558151220.971249116302440.51437544184878
900.4395421973993780.8790843947987550.560457802600622
910.4310677650834820.8621355301669640.568932234916518
920.4884974775383270.9769949550766540.511502522461673
930.4518038372761690.9036076745523380.548196162723831
940.4054943503605680.8109887007211350.594505649639432
950.3895746277703560.7791492555407120.610425372229644
960.3845566247344880.7691132494689750.615443375265512
970.3972333270318460.7944666540636910.602766672968154
980.3556968181434410.7113936362868820.644303181856559
990.3215116730608320.6430233461216640.678488326939168
1000.2837170610805940.5674341221611870.716282938919406
1010.2516148594572860.5032297189145710.748385140542714
1020.2398159878856990.4796319757713990.7601840121143
1030.2055098523706870.4110197047413730.794490147629313
1040.1931254765749190.3862509531498390.80687452342508
1050.1763853501202330.3527707002404660.823614649879767
1060.1825323783977330.3650647567954660.817467621602267
1070.1866757129805150.3733514259610300.813324287019485
1080.1823248036841970.3646496073683950.817675196315803
1090.1727280766762270.3454561533524550.827271923323773
1100.2344217412479150.4688434824958290.765578258752085
1110.2005429760386190.4010859520772390.79945702396138
1120.2890126074978290.5780252149956580.710987392502171
1130.3645710518279080.7291421036558160.635428948172092
1140.4520551831606430.9041103663212850.547944816839357
1150.5434119512200940.9131760975598130.456588048779906
1160.4986325447560840.9972650895121680.501367455243916
1170.5200104962628560.9599790074742890.479989503737144
1180.4713005317717970.9426010635435950.528699468228203
1190.4555951688087770.9111903376175540.544404831191223
1200.4096494165949590.8192988331899180.590350583405041
1210.3817009137364340.7634018274728670.618299086263566
1220.3651317242883280.7302634485766560.634868275711672
1230.3550213483885560.7100426967771120.644978651611444
1240.3714591514183860.7429183028367720.628540848581614
1250.8879528356689090.2240943286621830.112047164331091
1260.8642019267447870.2715961465104260.135798073255213
1270.8315738306449980.3368523387100040.168426169355002
1280.7888014454115460.4223971091769090.211198554588454
1290.740357774068280.5192844518634410.259642225931721
1300.6871873280878750.6256253438242510.312812671912125
1310.6358321339687440.7283357320625130.364167866031256
1320.5780303858964830.8439392282070340.421969614103517
1330.5148787700863790.9702424598272410.485121229913621
1340.4670790209218570.9341580418437140.532920979078143
1350.4163713319240130.8327426638480270.583628668075987
1360.3812882134547730.7625764269095460.618711786545227
1370.430010625865820.860021251731640.56998937413418
1380.4166673195936650.833334639187330.583332680406335
1390.4336839695246890.8673679390493780.566316030475311
1400.3619303852806910.7238607705613820.638069614719309
1410.2913488195244590.5826976390489180.708651180475541
1420.2448634162807560.4897268325615130.755136583719244
1430.2303894797359330.4607789594718670.769610520264067
1440.2435468686517700.4870937373035410.75645313134823
1450.2142421327334540.4284842654669090.785757867266546
1460.2884900704698980.5769801409397960.711509929530102
1470.3205215644794340.6410431289588690.679478435520566
1480.2307917467747150.461583493549430.769208253225285
1490.1495430675617540.2990861351235080.850456932438246
1500.1649302798042870.3298605596085730.835069720195713
1510.4968480048416170.9936960096832350.503151995158383


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/16ii61290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/16ii61290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/26ii61290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/26ii61290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/3zs0r1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/3zs0r1290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/4zs0r1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/4zs0r1290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/5zs0r1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/5zs0r1290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/6sjzu1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/6sjzu1290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/72sgx1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/72sgx1290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/82sgx1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/82sgx1290544173.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/92sgx1290544173.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905452502qviomya2rkvhvk/92sgx1290544173.ps (open in new window)


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