Home » date » 2010 » Nov » 24 »

Workshop 7 DMA

*Unverified author*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 10:44:23 +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/24/t129059541509outp55uv9cse8.htm/, Retrieved Wed, 24 Nov 2010 11:43:35 +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/24/t129059541509outp55uv9cse8.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:
DMA
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12 24 14 8 25 11 8 17 6 8 18 12 9 18 8 7 16 10 4 20 10 11 16 11 7 18 16 7 17 11 12 23 13 10 30 12 10 23 8 8 18 12 8 15 11 4 12 4 9 21 9 8 15 8 7 20 8 11 31 14 9 27 15 11 34 16 13 21 9 8 31 14 8 19 11 9 16 8 6 20 9 9 21 9 9 22 9 6 17 9 6 24 10 16 25 16 5 26 11 7 25 8 9 17 9 6 32 16 6 33 11 5 13 16 12 32 12 7 25 12 10 29 14 9 22 9 8 18 10 5 17 9 8 20 10 8 15 12 10 20 14 6 33 14 8 29 10 7 23 14 4 26 16 8 18 9 8 20 10 4 11 6 20 28 8 8 26 13 8 22 10 6 17 8 4 12 7 8 14 15 9 17 9 6 21 10 7 19 12 9 18 13 5 10 10 5 29 11 8 31 8 8 19 9 6 9 13 8 20 11 7 28 8 7 19 9 9 30 9 11 29 15 6 26 9 8 23 10 6 13 14 9 21 12 8 19 12 6 28 11 10 23 14 8 18 6 8 21 12 10 20 8 5 23 14 7 21 11 5 21 10 8 15 14 14 28 12 7 19 10 8 26 14 6 10 5 5 16 11 6 22 10 10 19 9 12 31 10 9 31 16 12 29 13 7 19 9 8 22 10 10 23 10 6 15 7 10 20 9 10 18 8 10 23 14 5 25 14 7 21 8 10 24 9 11 25 14 6 17 14 7 13 8 12 28 8 11 21 8 11 25 7 11 9 6 5 16 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
ParDoubt[t] = + 6.5359359075337 + 0.0360025588876879ParCritism[t] + 0.188139523215922ParConcern[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.53593590753370.8989617.270500
ParCritism0.03600255888768790.0799970.450.6533020.326651
ParConcern0.1881395232159220.0378414.97182e-061e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.396660143948058
R-squared0.157339269796894
Adjusted R-squared0.146535927101983
F-TEST (value)14.5639432386979
F-TEST (DF numerator)2
F-TEST (DF denominator)156
p-value1.58823556339893e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.58721008230779
Sum Squared Residuals1044.21033755923


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11411.48331517136812.51668482863190
21111.5274444590333-0.527444459033265
3610.0223282733059-4.02232827330589
41210.21046779652181.78953220347819
5810.2464703554095-2.24647035540950
6109.798186191202280.201813808797724
71010.4427366074029-0.442736607402901
8119.942196426753031.05780357324697
91610.17446523763415.82553476236588
10119.98632571441821.01367428558180
111311.29517564815221.70482435184783
121212.5401471928883-0.540147192888252
13811.2231705303768-3.22317053037680
141210.21046779652181.78953220347819
15119.646049226874041.35395077312596
1648.93762042167553-4.93762042167552
17910.8108889250573-1.81088892505726
1889.64604922687404-1.64604922687404
19810.5507442840660-2.55074428406596
201412.76428927499191.23571072500814
211511.93972606435283.06027393564720
221613.32870784463962.67129215536037
23910.9548991606080-1.95489916060801
241412.65628159832881.34371840167120
251110.39860731973770.601392680262269
2689.87019130897765-1.87019130897765
27910.5147417251783-1.51474172517828
28910.8108889250573-1.81088892505726
29910.9990284482732-1.99902844827319
3099.95032315553051-0.95032315553051
311011.2672998180420-1.26729981804197
321611.81546493013484.18453506986523
331111.6075763055861-0.607576305586123
34811.4914419001456-3.49144190014558
35910.0583308321936-1.05833083219357
361612.77241600376933.22758399623065
371112.9605555269853-1.96055552698527
38169.161762503779136.83823749622087
391212.9884313570955-0.988431357095472
401211.49144190014560.508558099854423
411412.35200766967231.64799233032767
42910.9990284482732-1.99902844827319
431010.2104677965218-0.210467796521808
4499.91432059664282-0.914320596642822
451010.5867468429537-0.586746842953653
46129.646049226874042.35395077312596
471410.65875196072903.34124803927097
481412.96055552698531.03944447301473
491012.2800025518970-2.28000255189695
501411.11516285371372.88483714628627
511611.57157374669844.42842625330156
52910.2104677965218-1.21046779652181
531010.5867468429537-0.586746842953653
5468.7494808984596-2.7494808984596
55812.5238937353333-4.52389373533329
561311.71558398224921.28441601775081
571010.9630258893855-0.963025889385498
5889.95032315553051-1.95032315553051
5978.93762042167552-1.93762042167552
60159.457909703658125.54209029634188
61910.0583308321936-1.05833083219357
621010.7028812483942-0.7028812483942
631210.36260476085001.63739523914996
641310.24647035540952.75352964459050
65108.597343934131371.40265606586863
661112.1719948752339-1.17199487523389
67812.6562815983288-4.6562815983288
68910.3986073197377-1.39860731973773
69138.445206969803134.55479303019687
701110.58674684295370.413253157046347
71812.0558604697933-4.05586046979334
72910.3626047608500-1.36260476085004
73912.5041446340006-3.50414463400056
741512.38801022856002.61198977143998
75911.6435788644738-2.64357886447381
761011.1511654126014-1.15116541260142
77149.197765062666824.80223493733318
781210.81088892505731.18911107494274
791210.39860731973771.60139268026227
801112.0198579109057-1.01985791090566
811411.22317053037682.77682946962320
82610.2104677965218-4.21046779652181
831210.77488636616961.22511363383042
84810.6587519607290-2.65875196072903
851411.04315773593842.95684226406164
861110.73888380728190.261116192718113
871010.6668786895065-0.666878689506512
88149.646049226874044.35395077312596
891212.3078783820072-0.307878382007158
901010.3626047608500-0.362604760850043
911411.71558398224922.28441601775081
9258.63334649301905-3.63334649301905
93119.72618107342691.2738189265731
941010.8910207716101-0.891020771610122
95910.4706124375131-1.47061243751311
961012.8002918338795-2.80029183387955
971612.69228415721653.30771584278351
981312.42401278744770.575987212552295
99910.3626047608500-1.36260476085004
1001010.9630258893855-0.963025889385498
1011011.2231705303768-1.22317053037680
10279.57404410909867-2.57404410909867
103910.6587519607290-1.65875196072903
104810.2824729142972-2.28247291429718
1051411.22317053037682.77682946962320
1061411.41943678237022.5805632176298
107810.7388838072819-2.73888380728189
108911.4113100535927-2.41131005359272
1091411.63545213569632.36454786430367
110149.950323155530514.04967684446949
11189.23376762155451-1.23376762155451
112812.2358732642318-4.23587326423178
113810.8828940428326-2.88289404283264
114711.6354521356963-4.63545213569633
11568.62521976424157-2.62521976424157
11689.7261810734269-1.7261810734269
117610.3986073197377-4.39860731973773
118119.950323155530511.04967684446949
1191411.56344701792102.43655298207905
1201110.44273660740290.557263392597099
1211112.1359923163462-1.13599231634620
122119.421907144770431.57809285522957
1231411.07103356604862.92896643395144
12489.57404410909866-1.57404410909867
1252010.36260476085009.63739523914996
1261110.58674684295370.413253157046347
12789.50203899132329-1.50203899132329
1281110.58674684295370.413253157046347
1291010.2464703554095-0.246470355409496
1301413.03256064476060.967439355239358
1311111.0710335660486-0.071033566048561
13299.83418875008996-0.834188750089964
13399.91432059664282-0.914320596642822
13489.69017851453921-1.69017851453921
1351010.7748863661696-0.774886366169575
1361311.78758910002461.21241089997544
1371310.13846267874642.86153732125357
1381210.24647035540951.75352964459050
139810.0583308321936-2.05833083219357
1401311.14303868382391.85696131617606
1411412.50414463400061.49585536599944
1421212.5401471928883-0.540147192888252
1431411.77133564246962.22866435753040
1441510.66687868950654.33312131049349
1451310.88289404283262.11710595716736
1461612.20799743412163.79200256587842
147912.6922841572165-3.69228415721649
148910.5507442840660-1.55074428406596
14999.87019130897765-0.870191308977652
150811.0350310071609-3.03503100716087
151710.6227494018413-3.62274940184134
1521612.09186302868103.90813697131897
1531113.9372557019526-2.93725570195257
154910.8910207716101-1.89102077161012
1551110.76675963739210.233240362607908
15699.95032315553051-0.95032315553051
1571412.09186302868101.90813697131897
1581311.03503100716091.96496899283913
1591612.94430206943033.0556979305697


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.6760157354056920.6479685291886150.323984264594308
70.5374907830732780.9250184338534440.462509216926722
80.4270463147070350.854092629414070.572953685292965
90.8442361575875740.3115276848248530.155763842412426
100.7745854789927660.4508290420144680.225414521007234
110.6921474964182430.6157050071635150.307852503581757
120.6229937569522840.7540124860954320.377006243047716
130.6884602621487960.6230794757024090.311539737851204
140.6276752501398880.7446494997202240.372324749860112
150.5475922065409660.9048155869180680.452407793459034
160.7069713869931740.5860572260136510.293028613006826
170.6737866344216440.6524267311567110.326213365578356
180.6249058395685640.7501883208628730.375094160431436
190.5946311383389850.810737723322030.405368861661015
200.5268389605761660.9463220788476680.473161039423834
210.5376471164046940.9247057671906120.462352883595306
220.4866541175969120.9733082351938240.513345882403088
230.493317639982020.986635279964040.50668236001798
240.4287316013551730.8574632027103460.571268398644827
250.3702301622875770.7404603245751550.629769837712423
260.3280415869366970.6560831738733950.671958413063303
270.2837612446250650.5675224892501310.716238755374935
280.2577019427262940.5154038854525870.742298057273706
290.2405366442286780.4810732884573560.759463355771322
300.1956758321698940.3913516643397880.804324167830106
310.1640932066137620.3281864132275240.835906793386238
320.1774191343649710.3548382687299410.82258086563503
330.1412889728695990.2825779457391970.858711027130401
340.1702148628400180.3404297256800360.829785137159982
350.1384453609487420.2768907218974850.861554639051258
360.1553259888613420.3106519777226830.844674011138658
370.1522518502688970.3045037005377930.847748149731103
380.5782196523489540.8435606953020920.421780347651046
390.5484810605316790.9030378789366410.451518939468321
400.4975608509151160.9951217018302330.502439149084884
410.4582630447996770.9165260895993530.541736955200323
420.4385710690562120.8771421381124240.561428930943788
430.3872168011381810.7744336022763620.612783198861819
440.3403388440720260.6806776881440520.659661155927974
450.2953155741047530.5906311482095060.704684425895247
460.2954149416394740.5908298832789490.704585058360526
470.3190480267752600.6380960535505210.68095197322474
480.2824065665769890.5648131331539780.717593433423011
490.276840559081910.553681118163820.72315944091809
500.2915627826314250.5831255652628510.708437217368575
510.3910312849947830.7820625699895660.608968715005217
520.3540293997623050.708058799524610.645970600237695
530.3115420669554640.6230841339109280.688457933044536
540.3042223062659360.6084446125318720.695777693734064
550.4175766021526730.8351532043053460.582423397847327
560.3802956877516160.7605913755032320.619704312248384
570.3413685147316630.6827370294633270.658631485268337
580.3202628701638430.6405257403276850.679737129836157
590.2972401193356280.5944802386712560.702759880664372
600.4731492451829830.9462984903659660.526850754817017
610.4328442585647870.8656885171295740.567155741435213
620.3903344803743960.7806689607487930.609665519625604
630.3636474803902740.7272949607805470.636352519609726
640.3705181216783950.741036243356790.629481878321605
650.3410498157255050.6820996314510110.658950184274495
660.3099141975534460.6198283951068920.690085802446554
670.4079292422343610.8158584844687210.59207075776564
680.3758751121270710.7517502242541420.624124887872929
690.4667247143202310.9334494286404620.533275285679769
700.4220179216479180.8440358432958360.577982078352082
710.4853401898653290.9706803797306570.514659810134671
720.4518685821872620.9037371643745240.548131417812738
730.4875609171316620.9751218342633240.512439082868338
740.4885449922184690.9770899844369380.511455007781531
750.4898505822083470.9797011644166940.510149417791653
760.4531049938497910.9062099876995830.546895006150209
770.5641888152936190.8716223694127620.435811184706381
780.528134508471770.943730983056460.47186549152823
790.5000232724717640.9999534550564710.499976727528236
800.4633953829488630.9267907658977260.536604617051137
810.4691652554351970.9383305108703950.530834744564803
820.5424272927470930.9151454145058130.457572707252907
830.5067165598033580.9865668803932850.493283440196643
840.5081964957179250.983607008564150.491803504282075
850.5201144928333420.9597710143333170.479885507166658
860.4745954496388490.9491908992776990.525404550361151
870.4319947967123190.8639895934246390.56800520328768
880.5209195180409270.9581609639181460.479080481959073
890.4759948265380850.951989653076170.524005173461915
900.4309854838658750.861970967731750.569014516134125
910.4189690883019510.8379381766039010.581030911698049
920.4548547246886360.9097094493772720.545145275311364
930.4219059020437740.8438118040875480.578094097956226
940.3818945138153680.7637890276307360.618105486184632
950.3507055290061610.7014110580123210.649294470993839
960.3644418141230830.7288836282461660.635558185876917
970.3838311190007070.7676622380014130.616168880999293
980.3412748825673440.6825497651346870.658725117432656
990.3092079842440690.6184159684881380.690792015755931
1000.2740572829270750.5481145658541490.725942717072925
1010.2443821946379860.4887643892759720.755617805362014
1020.2397000553099960.4794001106199910.760299944690004
1030.2177355185435980.4354710370871950.782264481456402
1040.2084046729679550.416809345935910.791595327032045
1050.2099712084256070.4199424168512130.790028791574393
1060.2065445512969120.4130891025938250.793455448703087
1070.20897971502640.41795943005280.7910202849736
1080.2051837411059690.4103674822119390.79481625889403
1090.1954200636245300.3908401272490590.80457993637547
1100.2464132807813850.4928265615627690.753586719218615
1110.2149295064382180.4298590128764360.785070493561782
1120.2894163883487180.5788327766974360.710583611651282
1130.3038169366834590.6076338733669180.696183063316541
1140.4312258739559350.862451747911870.568774126044065
1150.4349183748065550.869836749613110.565081625193445
1160.4043926549807140.8087853099614280.595607345019286
1170.5194381788537050.961123642292590.480561821146295
1180.4731413375927590.9462826751855180.526858662407241
1190.4539818330893060.9079636661786110.546018166910694
1200.4041476015389770.8082952030779540.595852398461023
1210.3624184503065840.7248369006131670.637581549693417
1220.3279450168063530.6558900336127050.672054983193647
1230.3228678573724790.6457357147449580.677132142627521
1240.2915995757689980.5831991515379970.708400424231002
1250.9126303900847780.1747392198304440.0873696099152222
1260.8871010751416030.2257978497167940.112898924858397
1270.8605825176538120.2788349646923770.139417482346188
1280.8247280963614510.3505438072770980.175271903638549
1290.7824521458568850.435095708286230.217547854143115
1300.7365348499674850.526930300065030.263465150032515
1310.6847539498577860.6304921002844280.315246050142214
1320.6314066602391830.7371866795216330.368593339760817
1330.5726670992737340.8546658014525330.427332900726266
1340.5267844258272090.9464311483455820.473215574172791
1350.4702448525504340.9404897051008690.529755147449566
1360.4096730939348020.8193461878696030.590326906065198
1370.4266936761532660.8533873523065330.573306323846734
1380.3883102532558280.7766205065116550.611689746744172
1390.3604053181737250.720810636347450.639594681826275
1400.3085399538702210.6170799077404410.69146004612978
1410.2575255565194200.5150511130388390.74247444348058
1420.2058420678381170.4116841356762350.794157932161883
1430.163012304997710.326024609995420.83698769500229
1440.2942013020184390.5884026040368780.705798697981561
1450.2628098534789830.5256197069579660.737190146521017
1460.4329759598940180.8659519197880360.567024040105982
1470.5134841365147880.9730317269704230.486515863485212
1480.4142148826179090.8284297652358180.585785117382091
1490.3134788028536610.6269576057073220.686521197146339
1500.3438716228662450.687743245732490.656128377133755
1510.479229128400880.958458256801760.52077087159912
1520.729408874907190.541182250185620.27059112509281
1530.8448707500846260.3102584998307470.155129249915374


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/24/t129059541509outp55uv9cse8/10fvur1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/10fvur1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/1qcxx1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/1qcxx1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/2qcxx1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/2qcxx1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/3qcxx1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/3qcxx1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/413xi1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/413xi1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/513xi1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/513xi1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/613xi1290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/613xi1290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/7uue31290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/7uue31290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/84lv61290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/84lv61290595452.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/94lv61290595452.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t129059541509outp55uv9cse8/94lv61290595452.ps (open in new window)


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