Home » date » 2009 » Dec » 13 »

paper - multiple regression - link 3

*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, 13 Dec 2009 04:12:30 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6.htm/, Retrieved Sun, 13 Dec 2009 12:14:29 +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/2009/Dec/13/t1260702856w5slm9f6t0zzcn6.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
100.00 100.00 103.53 102.62 108.36 107.62 115.20 103.46 123.51 103.61 132.87 106.10 130.55 107.13 136.68 108.82 140.63 112.93 143.47 109.35 124.10 108.75 111.49 110.83 119.93 110.95 131.79 114.96 136.61 120.45 141.79 122.89 142.23 120.43 146.74 121.76 154.85 122.78 148.44 125.32 154.18 128.68 149.10 127.91 152.22 125.52 149.34 127.56 160.94 127.90 176.16 130.75 195.12 133.57 186.07 135.83 200.78 135.26 208.15 135.99 209.56 139.12 203.33 137.64 198.84 138.59 200.63 138.32 206.47 135.99 196.68 136.96 203.81 137.13 190.18 138.67 187.50 143.04 187.62 143.98 168.92 144.09 164.78 144.97 175.98 147.77 174.70 149.73 166.95 153.11 161.76 151.58 149.65 149.04 137.42 154.70 142.60 154.91 146.94 159.08 152.52 168.01 147.47 164.17 146.15 163.77 152.04 163.49 144.42 166.13 138.15 166.15 125.94 170.05 112.61 167.37 111.48 164.80 95.25 169.53 105.38 168.17 109.59 172.45 99.07 177.81 92.07 175.38 89.10 175.64 86.36 178.80 95.39 180.49 95.27 182.71 98.56 185.7 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 32.692139819348 + 1.28981479437032X[t] + 0.144892381334993M1[t] + 1.73658903653866M2[t] -0.550465623628254M3[t] + 0.621836851411566M4[t] + 2.96612775017956M5[t] + 3.54060389137733M6[t] + 6.75112864261287M7[t] + 5.90591649878049M8[t] + 0.100824026717422M9[t] + 3.89912416000683M10[t] + 7.93909788953396M11[t] -2.06872918563815t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.69213981934835.6211440.91780.3604240.180212
X1.289814794370320.3744943.44420.000770.000385
M10.14489238133499311.6639620.01240.9901080.495054
M21.7365890365386611.9038840.14590.8842370.442119
M3-0.55046562362825411.98989-0.04590.9634510.481726
M40.62183685141156611.9191970.05220.9584720.479236
M52.9661277501795611.8969750.24930.8035050.401753
M63.5406038913773311.8957010.29760.7664520.383226
M76.7511286426128711.8993430.56740.5714450.285723
M85.9059164987804911.8982290.49640.6204660.310233
M90.10082402671742212.0160820.00840.9933180.496659
M103.8991241600068311.8998520.32770.7436910.371845
M117.9390978895339611.9355950.66520.5071170.253558
t-2.068729185638150.52147-3.96710.0001196e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.469536623350642
R-squared0.220464640667523
Adjusted R-squared0.143106169894071
F-TEST (value)2.84990949876923
F-TEST (DF numerator)13
F-TEST (DF denominator)131
p-value0.00122249412706421
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation29.1235780132500
Sum Squared Residuals111111.946314495


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1100159.749782452077-59.7497824520768
2103.53162.652064682893-59.1220646828931
3108.36164.745354808939-56.3853548089388
4115.2158.48329855376-43.28329855376
5123.51158.952332486045-35.4423324860454
6132.87160.669718279587-27.7997182795871
7130.55163.140023083386-32.5900230833859
8136.68162.405868756401-25.7258687564012
9140.63159.833185903562-19.2031859035620
10143.47156.945219887367-13.4752198873675
11124.1158.142575554634-34.0425755546343
12111.49150.817563251752-39.3275632517525
13119.93149.048504222774-29.1185042227737
14131.79153.743629017764-21.9536290177642
15136.61156.468928393052-19.8589283930522
16141.79158.719649780717-16.9296497807174
17142.23155.822267099696-13.5922670996963
18146.74156.043467731768-9.3034677317684
19154.85158.500874387624-3.65087438762354
20148.44158.863062635854-10.4230626358536
21154.18155.323018687237-1.14301868723665
22149.1156.059432243223-6.95943224322275
23152.22154.948019428567-2.72801942856666
24149.34147.571414533911.76858546608999
25160.94146.08611475969314.8538852403072
26176.16149.28505439321426.8749456067863
27195.12148.56654826753346.5534517324671
28186.07150.58510299221135.4848970077885
29200.78150.12547027255050.6545297274498
30208.15149.572782028058.5772179719998
31209.56154.75169789997754.8083021000233
32203.33149.92883067483853.4011693251619
33198.84143.28033307178955.5596669282113
34200.63144.6616540249655.9683459750401
35206.47143.62763009796662.8423699020339
36196.68134.87092337333361.8090766266668
37203.81133.16635508407370.643644915927
38190.18134.67563733696955.5043626630313
39187.5135.95634414256251.543655857438
40187.62136.27234333867251.3476566613283
41168.92136.68978467918232.2302153208177
42164.78136.33056865378828.4494313462122
43175.98141.08384564362234.8961543563779
44174.7140.69794131111734.0020586888826
45166.95137.18369365838829.7663063416121
46161.76136.93984797065224.8201520293475
47149.65135.63496293684114.0150370631591
48137.42132.9274875978054.49251240219524
49142.6131.27451190031911.3254880996806
50146.94136.17600706240910.7639929375909
51152.52143.3382693303319.18173066966907
52147.47137.4889538093519.9810461906494
53146.15137.2485896047328.90141039526766
54152.04135.39318841786816.6468115821317
55144.42139.9400950406034.47990495939671
56138.15137.0519500070201.09804999297984
57125.94134.208406047363-8.26840604736318
58112.61132.481273346102-19.871273346102
59111.48131.137693868459-19.6576938684593
6095.25127.230690770659-31.9806907706587
61105.38123.552705846012-18.1727058460119
62109.59128.596080635482-19.0060806354824
6399.07131.153704087502-32.0837040875022
6492.07127.123027426584-35.0530274265841
6589.1127.73394098625-38.6339409862501
6686.36130.31550269202-43.95550269202
6795.39133.637085260103-38.2470852601032
6895.27133.586532774135-38.3165327741348
6998.56129.607951795432-31.0479517954319
70101.79128.035596869495-26.2455968694951
71102.02128.639637731352-26.6196377313516
7298.21122.913995773489-24.7039957734890
73104.42120.809584897974-16.3895848979739
74105.62124.537348597187-18.9173485971867
75109.46124.489546164578-15.0295461645785
76110.94121.955054665130-11.0150546651299
77113.09121.804977496117-8.71497749611747
78109.58124.154372538901-14.5743725389007
79111.41126.934232893348-15.5242328933483
80109.83125.155328582924-15.3253285829237
81110.58121.357321675433-10.7773216754327
82109.04121.822874124601-12.782874124601
83107.8119.950470581266-12.1504705812665
84109.79115.978976743747-6.18897674374743
85110.76114.326001046262-3.56600104626201
86112.64118.453607331730-5.81360733172959
87114.17115.748786422719-1.57878642271852
88115.99117.573868928242-1.58386892824155
89119.01117.9010232331461.10897676685382
90117.92118.444677563811-0.524677563810919
91115.92122.153204570205-6.23320457020526
92120.75122.257429859561-1.50742985956122
93124.94138.761107815459-13.8211078154590
94129.17141.290363935620-12.1203639356198
95128.14138.205534485577-10.0655344855772
96134.18133.2666795522800.913320447719609
97131.74133.832185301112-2.09218530111194
98134.32136.025069395024-1.70506939502400
99137.8140.65929466598-2.85929466598001
100141.79137.0284605913174.76153940868333
101142.75136.7107074990366.03929250096385
102144.3137.2930562735327.00694372646804
103145.49144.4453887808951.04461121910497
104138.21143.066327056725-4.85632705672518
105139.02139.281218297178-0.261218297177833
106141.91137.321918932934.58808106706998
107144.95133.66957097336411.2804290266356
108146.11130.16241046181915.9475895381813
109150.96125.96849961942424.9915003805762
110148.2129.95422627751118.2457737224894
111152.12138.93512740549513.1848725945054
112154.74132.09265449284922.6473455071509
113150.8131.22028103898919.5797189610106
114152.6135.15614827884817.4438517211519
115158.74137.71674011825321.0232598817473
116161.83136.81490986825.0150901320001
117162.4135.50624551364426.8937544863564
118156.11134.99153871909121.1184612809095
119154.93128.50159821191026.4284017880898
120157.18126.29715064267930.8828493573214
121159.85120.68444352647639.1655564735237
122154.4123.90917945588530.4908205441154
123151.57124.36440479308127.2055952069192
124133.34119.79200591852713.5479940814729
125131.2114.09572513372217.1042748662776
126124.17117.6317497873266.5382502126738
127133.19116.27130465184516.9186953481548
128130.94116.13046513027114.8095348697291
129119.58112.5646248857667.01537511423354
130118.55105.52345523170013.0265447683004
131119.96102.60630170492517.3536982950749
132108.42101.7045670780076.71543292199257
13395.93102.515137637769-6.58513763776925
13488.83104.192095813933-15.3620958139332
13584.98104.853691518229-19.8736915182287
13681.61111.515579502640-29.9055795026404
13772.84112.074900470532-39.2349004705318
13874.72113.224767754550-38.5047677545505
13983.4120.325507670139-36.9255076701387
14087.42119.591353343154-32.171353343154
14186.33121.042892648750-34.7128926487502
14294.28122.346824714259-28.0668247142592
14398.81125.466004425138-26.6560044251378
144100.96121.288140220519-20.3281402205195
14599.14124.446173706035-25.3061737060353


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.004666093956477890.009332187912955780.995333906043522
180.002350127496517570.004700254993035140.997649872503482
190.0003975031603614590.0007950063207229180.999602496839639
200.0002193736604546270.0004387473209092550.999780626339545
216.85159217903825e-050.0001370318435807650.99993148407821
224.54154331249988e-059.08308662499977e-050.999954584566875
232.27113173819099e-054.54226347638197e-050.999977288682618
244.54853812350786e-059.09707624701572e-050.999954514618765
256.29302029737019e-050.0001258604059474040.999937069797026
260.0001108236451308690.0002216472902617380.99988917635487
270.0002802150934122960.0005604301868245920.999719784906588
280.0001680254848436520.0003360509696873050.999831974515156
290.0002615432042888880.0005230864085777760.999738456795711
300.0002469207391196220.0004938414782392440.99975307926088
310.0002624307963477580.0005248615926955160.999737569203652
320.0001293096857246670.0002586193714493340.999870690314275
338.72186896849832e-050.0001744373793699660.999912781310315
344.69367364643406e-059.38734729286811e-050.999953063263536
353.44459612235950e-056.889192244719e-050.999965554038776
362.34915126026657e-054.69830252053315e-050.999976508487397
372.00178196198469e-054.00356392396938e-050.99997998218038
389.22043344337917e-050.0001844086688675830.999907795665566
390.0005455183946588580.001091036789317720.999454481605341
400.001494414386817490.002988828773634970.998505585613183
410.017148607862370.034297215724740.98285139213763
420.09592137383180020.1918427476636000.9040786261682
430.1912589159434450.382517831886890.808741084056555
440.3066501022766620.6133002045533240.693349897723338
450.5004590769413340.9990818461173320.499540923058666
460.6823487678072980.6353024643854030.317651232192702
470.8153050247715660.3693899504568690.184694975228434
480.915158946075640.1696821078487210.0848410539243603
490.9550602529408170.0898794941183670.0449397470591835
500.9712068131757930.05758637364841310.0287931868242065
510.9758854361887040.04822912762259170.0241145638112959
520.9818353089779880.03632938204402390.0181646910220119
530.9854702399534710.02905952009305720.0145297600465286
540.9904355512538880.01912889749222490.00956444874611244
550.9935292855770330.01294142884593350.00647071442296675
560.9959534959638390.008093008072322690.00404650403616135
570.9976422551948650.004715489610269260.00235774480513463
580.9989813903790340.002037219241931250.00101860962096563
590.9994342262088970.001131547582206280.00056577379110314
600.9996845979930830.0006308040138338930.000315402006916946
610.9997556218402670.0004887563194656420.000244378159732821
620.9997709789953270.0004580420093460710.000229021004673036
630.9998686378376740.0002627243246530070.000131362162326503
640.99994597038810.0001080592238009415.40296119004704e-05
650.9999774874067444.50251865129332e-052.25125932564666e-05
660.9999903255225761.93489548476382e-059.67447742381908e-06
670.9999940498236321.19003527353767e-055.95017636768837e-06
680.999995764447378.47110526090719e-064.23555263045359e-06
690.9999951973349249.60533015255845e-064.80266507627922e-06
700.9999938761989671.22476020659492e-056.1238010329746e-06
710.999992594464811.48110703808655e-057.40553519043273e-06
720.9999910904511171.78190977662922e-058.90954888314612e-06
730.9999866866179172.66267641657596e-051.33133820828798e-05
740.9999826600351333.46799297341047e-051.73399648670523e-05
750.999975163129544.96737409182542e-052.48368704591271e-05
760.9999611697412077.7660517586249e-053.88302587931245e-05
770.9999371001729710.0001257996540576456.28998270288226e-05
780.9999033563708310.0001932872583375379.66436291687684e-05
790.9998606160074870.0002787679850251810.000139383992512590
800.9998050481928470.0003899036143059390.000194951807152970
810.9996905407806980.0006189184386032040.000309459219301602
820.999538419422850.0009231611542998140.000461580577149907
830.9993758631616970.001248273676606520.00062413683830326
840.999148254449970.001703491100059370.000851745550029687
850.9988175487029450.002364902594110820.00118245129705541
860.9984884140747820.003023171850436160.00151158592521808
870.9978541798419760.004291640316048170.00214582015802409
880.9969844294051760.006031141189648120.00301557059482406
890.995725196564390.008549606871217910.00427480343560896
900.993974323001850.01205135399629880.00602567699814939
910.9927909447387870.01441811052242580.0072090552612129
920.9917163669037050.01656726619259040.00828363309629519
930.9957908577977060.008418284404588320.00420914220229416
940.9972424025156490.005515194968702810.00275759748435140
950.9983022843006950.003395431398610660.00169771569930533
960.9987914787753420.002417042449316640.00120852122465832
970.9992802605301350.001439478939730790.000719739469865396
980.9994752458623420.001049508275315730.000524754137657867
990.9995887110865590.0008225778268827060.000411288913441353
1000.9995388103951980.0009223792096034990.000461189604801749
1010.9994100828392710.001179834321457340.000589917160728671
1020.9991871835879360.001625632824128030.000812816412064014
1030.9991924889962130.001615022007573410.000807511003786706
1040.999563113113390.0008737737732199140.000436886886609957
1050.9997466367295780.0005067265408439910.000253363270421995
1060.9998779745521330.0002440508957331510.000122025447866575
1070.999958474180048.30516399209289e-054.15258199604644e-05
1080.999990102418361.97951632820818e-059.8975816410409e-06
1090.9999964436189637.11276207496605e-063.55638103748303e-06
1100.999998063282083.87343584077805e-061.93671792038903e-06
1110.9999990699254421.86014911527108e-069.3007455763554e-07
1120.9999980394303773.92113924660873e-061.96056962330437e-06
1130.9999959399029138.12019417388826e-064.06009708694413e-06
1140.9999905023880051.89952239904769e-059.49761199523846e-06
1150.9999824803499973.50393000055203e-051.75196500027602e-05
1160.9999665816761236.68366477550678e-053.34183238775339e-05
1170.9999175771547650.0001648456904688838.24228452344413e-05
1180.999931896572310.0001362068553782526.81034276891262e-05
1190.999974619931415.07601371811786e-052.53800685905893e-05
1200.9999967819785236.43604295389104e-063.21802147694552e-06
1210.9999948284814641.03430370724634e-055.17151853623171e-06
1220.99998137959363.72408127995358e-051.86204063997679e-05
1230.99994549136340.0001090172731989575.45086365994783e-05
1240.9998638447749140.0002723104501728260.000136155225086413
1250.999440004885470.001119990229060190.000559995114530093
1260.9982434093264390.003513181347122910.00175659067356145
1270.9931411386158330.01371772276833500.00685886138416749
1280.9700804228044080.05983915439118470.0299195771955923


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level920.821428571428571NOK
5% type I error level1020.910714285714286NOK
10% type I error level1050.9375NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/10106t1260702744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/10106t1260702744.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/1m0yd1260702743.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/1m0yd1260702743.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/2bkw81260702743.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/2bkw81260702743.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/3pk7i1260702743.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/3pk7i1260702743.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/47jvs1260702743.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/47jvs1260702743.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/5tl7j1260702743.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/5tl7j1260702743.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/6i6c01260702744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/6i6c01260702744.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/7hh1b1260702744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/7hh1b1260702744.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/8eg6s1260702744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/8eg6s1260702744.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/9w5951260702744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260702856w5slm9f6t0zzcn6/9w5951260702744.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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