Home » date » 2010 » Nov » 30 »

mini tutorial workshop 4

*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, 30 Nov 2010 17:13: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/30/t12911372125dwa52b42q1yrar.htm/, Retrieved Tue, 30 Nov 2010 18:13:32 +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/30/t12911372125dwa52b42q1yrar.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:
enkel trend (geen month meer opgenomen)
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 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
Parental.Expectations[t] = + 5.84398572246926 + 0.0895090012114705Concern.over.Mistakes[t] -0.12590016401359Doubts.about.actions[t] + 0.665601272609036Parental.Criticism[t] + 0.118116470483094Personal.Standards[t] -0.0820356250087838Organization[t] + 0.00239657305847149t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.843985722469261.8923913.08810.0023950.001197
Concern.over.Mistakes0.08950900121147050.0483231.85230.065920.03296
Doubts.about.actions-0.125900164013590.087456-1.43960.1520430.076022
Parental.Criticism0.6656012726090360.0865197.693100
Personal.Standards0.1181164704830940.0634461.86170.0645790.032289
Organization-0.08203562500878380.063311-1.29580.1970250.098512
t0.002396573058471490.0048260.49660.6201670.310084


Multiple Linear Regression - Regression Statistics
Multiple R0.639019153846926
R-squared0.408345478983241
Adjusted R-squared0.384990695258896
F-TEST (value)17.4844470324754
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.44249065417534e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.70203430228648
Sum Squared Residuals1109.75038435138


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11114.9210803410871-3.92108034108708
2713.0925046624711-6.09250466247108
31713.43484114830363.56515885169636
41011.6361358131956-1.63613581319559
51213.4902262264019-1.49022622640187
61210.91024567370431.08975432629570
7119.956366345265971.04363365473403
81114.2259452167972-3.22594521679717
91210.32471943386711.67528056613286
101311.09346683268811.90653316731189
111414.554926132076-0.554926132076005
121614.4707970824631.52920291753701
131113.5496229211280-2.54962292112802
141011.9620371324013-1.96203713240128
151112.0743727841591-1.07437278415910
161510.00739054312184.99260945687818
17913.5795763177156-4.57957631771556
181112.2165710111153-1.21657101111528
191711.96141558138145.03858441861859
201715.30167424463891.69832575536110
211113.4068964786110-2.40689647861104
221815.08696112539692.91303887460312
231415.8199758100445-1.81997581004447
241012.4777674916039-2.47776749160385
251111.6098113580877-0.609811358087717
261513.0694746036461.930525396354
271511.54343614067583.45656385932416
281312.92344670987430.0765532901256699
291613.68797026156852.31202973843148
301311.00978506977631.99021493022365
31911.3749801486981-2.3749801486981
321817.89579206050390.104207939496122
331812.14214761764445.85785238235565
341213.544038263138-1.54403826313799
351713.53699241436273.46300758563734
36912.0662067965594-3.06620679655941
37912.9976392204493-3.99763922044934
38128.615472501287393.38452749871261
391816.78063083699541.21936916300456
401212.8645388840027-0.864538884002747
411814.04137616519633.95862383480374
421413.83724218181170.162757818188253
431511.88303388814043.11696611185962
441610.73208523143525.26791476856481
451012.9920289324247-2.99202893242469
461111.4223100984825-0.422310098482497
471412.79745657883181.20254342116819
48912.9546956639666-3.95469566396656
491213.6890797650787-1.68907976507872
501712.14929165222254.85070834777746
5159.6892712670686-4.68927126706859
521212.2830691280004-0.283069128000385
531211.89232456895000.107675431050021
5469.32418084441337-3.32418084441337
552422.68965502899551.31034497100449
561212.4492980602770-0.449298060277037
571212.8716633115142-0.871663311514151
581411.52105784540212.47894215459789
5979.14216034017986-2.14216034017986
601311.01827443022941.98172556977065
611213.1530443433647-1.15304434336469
621311.47280856443711.52719143556287
631411.38184557961942.61815442038062
64812.828178032706-4.828178032706
65119.321251270270651.67874872972935
66911.7415669730691-2.74156697306911
671113.7266513741233-2.72665137412326
681313.3657289960723-0.365728996072312
69109.365158091843760.634841908156238
701112.6438553743722-1.64385537437222
711212.7299476991651-0.729947699165077
72911.8369439427810-2.83694394278103
731514.61773402225600.382265977744037
741814.88006414833353.11993585166653
751512.11349002974252.88650997025749
761212.7902221279907-0.790222127990721
77139.852699458110013.14730054188999
781413.01992428220640.980075717793584
791011.8856399256721-1.88563992567208
801312.29879744445700.701202555543019
811313.7281754848096-0.728175484809557
821112.0961296798454-1.09612967984536
831312.17602771345800.823972286541977
841614.46834605945851.53165394054155
8589.7010565910997-1.7010565910997
861611.59756154450354.40243845549648
871111.1033545592561-0.103354559256068
88911.2973727503253-2.29737275032527
891617.7555095598081-1.75550955980811
901211.44578746190510.554212538094877
911411.99064078497222.00935921502779
92810.5990252105176-2.59902521051758
9399.5632762181969-0.563276218196896
941511.73091746258863.26908253741136
951113.5607264409179-2.56072644091785
962117.22385021004133.77614978995873
971413.25679643088580.743203569114158
981815.78282181142442.21717818857561
991211.71137325392810.28862674607195
1001312.68606918923390.313930810766054
1011514.53568841111990.464311588880138
1021211.06484249415880.93515750584118
1031914.45368343121064.54631656878938
1041514.02886488629010.971135113709867
1051113.0310396357798-2.03103963577984
1061110.67859718688980.321402813110241
1071012.3636065048675-2.36360650486749
1081314.7876214558746-1.78762145587455
1091514.77776314408220.222236855917843
110129.909266051022032.09073394897797
1111211.02058365545970.979416344540333
1121615.75590936662380.244090633376166
113915.5029829815267-6.50298298152667
1141817.5347037737850.465296226215003
115815.0299439185223-7.02994391852227
1161310.38652814750612.6134718524939
1171714.19887800207352.80112199792652
118911.0607927299636-2.06079272996361
1191513.22441945442241.77558054557755
12089.66830879116794-1.66830879116794
121711.2734798663308-4.27347986633081
1221211.35921075474920.640789245250814
1231415.0612088247332-1.06120882473319
124610.7816409078796-4.78164090787956
125810.1787563197468-2.17875631974678
1261712.46966883373184.53033116626818
127109.775896647811870.224103352188126
1281112.5827045162717-1.58270451627169
1291412.84323511208061.15676488791943
1301113.6916827520720-2.69168275207195
1311315.4220010557674-2.42200105576743
1321211.95130149286600.0486985071339539
1331110.46304041764660.536959582353384
13499.49175140350905-0.491751403509054
1351212.1160648040677-0.116064804067656
1362014.78270876620055.2172912337995
1371210.74388419576701.25611580423302
1381313.6794670666938-0.679467066693821
1391213.1935634194986-1.19356341949856
1401216.5328463645447-4.53284636454473
141914.6631617883371-5.66316178833711
1421515.6353737848601-0.635373784860085
1432421.54442448495362.45557551504643
144710.0198760511055-3.01987605110552
1451714.66798477882912.33201522117085
1461111.9891411384082-0.98914113840824
1471715.22260586388961.77739413611038
1481112.3546993714627-1.35469937146269
1491212.6052306846408-0.605230684640806
1501414.5430980313602-0.543098031360177
1511114.3714030662813-3.37140306628126
1521612.89086470931643.10913529068361
1532113.93265506932007.06734493067997
1541412.30254759873151.69745240126850
1552016.46763210194833.53236789805169
1561311.12147511371201.87852488628796
1571113.1546479026359-2.15464790263593
1581514.00493148670860.995068513291381
1591918.00230511188590.997694888114127


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5685567672945950.862886465410810.431443232705405
110.5881478258663750.823704348267250.411852174133625
120.6146633404593940.7706733190812110.385336659540606
130.6122101565599090.7755796868801820.387789843440091
140.5735876366778760.8528247266442480.426412363322124
150.6360412209590630.7279175580818730.363958779040937
160.5593670190677810.8812659618644380.440632980932219
170.7132071093083570.5735857813832870.286792890691643
180.6363065925473140.7273868149053710.363693407452686
190.6626307949591750.674738410081650.337369205040825
200.6142024564239770.7715950871520460.385797543576023
210.6533696275372550.693260744925490.346630372462745
220.6587421838333470.6825156323333070.341257816166653
230.6106820443634250.7786359112731510.389317955636575
240.7191999098545570.5616001802908870.280800090145443
250.7061223173048410.5877553653903170.293877682695159
260.6478815319027980.7042369361944050.352118468097202
270.5977422450502390.8045155098995220.402257754949761
280.5402405023789140.9195189952421710.459759497621086
290.4805921850204660.9611843700409310.519407814979534
300.4262231332001420.8524462664002850.573776866799858
310.5928803749931290.8142392500137410.407119625006871
320.538313306321370.923373387357260.46168669367863
330.5608530413830250.878293917233950.439146958616975
340.6658486094141270.6683027811717460.334151390585873
350.6444935085813960.7110129828372090.355506491418604
360.7298330872489220.5403338255021570.270166912751078
370.8061854515017610.3876290969964780.193814548498239
380.7813992387856260.4372015224287490.218600761214374
390.7502938130805660.4994123738388680.249706186919434
400.7319659548601880.5360680902796230.268034045139812
410.762262649378110.475474701243780.23773735062189
420.7291158241869430.5417683516261140.270884175813057
430.7029684378983050.5940631242033910.297031562101695
440.7404265653036210.5191468693927570.259573434696379
450.8184459490207750.3631081019584500.181554050979225
460.8095397723096090.3809204553807820.190460227690391
470.7733563332198430.4532873335603130.226643666780157
480.8228570485236230.3542859029527540.177142951476377
490.8079591287540090.3840817424919830.192040871245991
500.8495765867530710.3008468264938570.150423413246929
510.9162090006149440.1675819987701120.083790999385056
520.903157844270720.1936843114585600.0968421557292802
530.8818592051034170.2362815897931660.118140794896583
540.9185902407682280.1628195184635440.081409759231772
550.9005152127095330.1989695745809330.0994847872904667
560.8786533949823120.2426932100353760.121346605017688
570.8595056158104010.2809887683791980.140494384189599
580.8480702537751190.3038594924497620.151929746224881
590.8523847222445380.2952305555109230.147615277755462
600.8317084649139950.3365830701720110.168291535086005
610.813370426579540.3732591468409190.186629573420459
620.78886308636940.42227382726120.2111369136306
630.7816916502675240.4366166994649520.218308349732476
640.8636737373020640.2726525253958720.136326262697936
650.84779699066210.3044060186758000.152203009337900
660.8446411969486230.3107176061027540.155358803051377
670.8443726195890090.3112547608219830.155627380410991
680.8175749285527540.3648501428944920.182425071447246
690.792981400627210.414037198745580.20701859937279
700.7705146885110340.4589706229779320.229485311488966
710.7427355439494640.5145289121010730.257264456050536
720.7453204553359790.5093590893280430.254679544664021
730.7141166963735740.5717666072528520.285883303626426
740.7293836828771410.5412326342457180.270616317122859
750.7331857321997880.5336285356004240.266814267800212
760.6983759280372950.6032481439254090.301624071962705
770.7257762861004310.5484474277991380.274223713899569
780.6909315992567750.618136801486450.309068400743225
790.6678297631666580.6643404736666840.332170236833342
800.6268390250810210.7463219498379580.373160974918979
810.584460849725280.8310783005494390.415539150274719
820.548768565172630.9024628696547390.451231434827369
830.5056868999079110.9886262001841770.494313100092089
840.4726793024995210.9453586049990410.52732069750048
850.4438132076632660.8876264153265320.556186792336734
860.5205927479517030.9588145040965950.479407252048297
870.4764957433600370.9529914867200730.523504256639963
880.4583581527149020.9167163054298040.541641847285098
890.4360922610810630.8721845221621250.563907738918937
900.3912713201490890.7825426402981780.608728679850911
910.3694963032647340.7389926065294690.630503696735266
920.3647898116034880.7295796232069770.635210188396512
930.3227310818182440.6454621636364890.677268918181756
940.3429200968279730.6858401936559470.657079903172027
950.3379700996571110.6759401993142230.662029900342889
960.3714366890430110.7428733780860230.628563310956989
970.3302631351893190.6605262703786380.669736864810681
980.3084648028825510.6169296057651010.69153519711745
990.2682202929800010.5364405859600020.731779707019999
1000.2303106533655810.4606213067311620.769689346634419
1010.1973785451709420.3947570903418830.802621454829058
1020.1734476373741750.3468952747483490.826552362625825
1030.2482712570831830.4965425141663670.751728742916817
1040.2252346754784180.4504693509568370.774765324521582
1050.2030118131397500.4060236262794990.79698818686025
1060.1759049670645400.3518099341290810.82409503293546
1070.1651245116222900.3302490232445800.83487548837771
1080.1473552655030620.2947105310061240.852644734496938
1090.1220091253399450.2440182506798910.877990874660055
1100.1235514524136750.2471029048273510.876448547586325
1110.1107932002191020.2215864004382030.889206799780898
1120.0891952574293560.1783905148587120.910804742570644
1130.2116166195627390.4232332391254790.78838338043726
1140.1872704634427160.3745409268854320.812729536557284
1150.3898182056016550.779636411203310.610181794398345
1160.3979969443358340.7959938886716680.602003055664166
1170.4539404341671920.9078808683343840.546059565832808
1180.4123794342364820.8247588684729640.587620565763518
1190.3961801249889370.7923602499778740.603819875011063
1200.3630183840341830.7260367680683670.636981615965817
1210.375697362307630.751394724615260.62430263769237
1220.3725536830361600.7451073660723210.62744631696384
1230.3221889850542990.6443779701085990.6778110149457
1240.4082995218922620.8165990437845230.591700478107738
1250.3600549465428270.7201098930856540.639945053457173
1260.5006496962503150.998700607499370.499350303749685
1270.4538629738470970.9077259476941940.546137026152903
1280.4051681770585710.8103363541171420.594831822941429
1290.3543311421102830.7086622842205670.645668857889717
1300.3514696766855760.7029393533711520.648530323314424
1310.3200235005884730.6400470011769450.679976499411527
1320.2636552676204650.527310535240930.736344732379535
1330.2145076217910960.4290152435821910.785492378208904
1340.1683795156430710.3367590312861410.83162048435693
1350.1286572145436690.2573144290873390.87134278545633
1360.2558489335491630.5116978670983260.744151066450837
1370.3105530562230900.6211061124461810.68944694377691
1380.3130881347647830.6261762695295650.686911865235217
1390.2473497863242180.4946995726484360.752650213675782
1400.2484295799373890.4968591598747780.751570420062611
1410.4144364341598390.8288728683196770.585563565840161
1420.3682947785164820.7365895570329640.631705221483518
1430.2971531873033250.594306374606650.702846812696675
1440.2488994799308820.4977989598617640.751100520069118
1450.2758835516272990.5517671032545990.7241164483727
1460.2071661400043660.4143322800087320.792833859995634
1470.1349621109710920.2699242219421830.865037889028908
1480.08565552565604980.1713110513121000.91434447434395
1490.04293947039038270.08587894078076540.957060529609617


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 level10.00714285714285714OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/10x8sr1291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/10x8sr1291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/18odx1291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/18odx1291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/28odx1291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/28odx1291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/31yci1291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/31yci1291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/41yci1291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/41yci1291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/51yci1291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/51yci1291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/6t7u31291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/6t7u31291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/7mgt61291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/7mgt61291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/8mgt61291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/8mgt61291137214.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/9mgt61291137214.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911372125dwa52b42q1yrar/9mgt61291137214.ps (open in new window)


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