Home » date » 2010 » Nov » 23 »

WS7 lineaire trend terugvindbaar?

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 16:01:22 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0.htm/, Retrieved Tue, 23 Nov 2010 17:00:58 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1 24 14 11 12 24 26 1 25 11 7 8 25 23 1 17 6 17 8 30 25 1 18 12 10 8 19 23 1 18 8 12 9 22 19 1 16 10 12 7 22 29 1 20 10 11 4 25 25 1 16 11 11 11 23 21 1 18 16 12 7 17 22 2 17 11 13 7 21 25 2 23 13 14 12 19 24 2 30 12 16 10 19 18 2 23 8 11 10 15 22 2 18 12 10 8 16 15 2 15 11 11 8 23 22 2 12 4 15 4 27 28 2 21 9 9 9 22 20 2 15 8 11 8 14 12 2 20 8 17 7 22 24 3 31 14 17 11 23 20 3 27 15 11 9 23 21 3 34 16 18 11 21 20 3 21 9 14 13 19 21 3 31 14 10 8 18 23 3 19 11 11 8 20 28 3 16 8 15 9 23 24 3 20 9 15 6 25 24 3 21 9 13 9 19 24 3 22 9 16 9 24 23 3 17 9 13 6 22 23 3 24 10 9 6 25 29 3 25 16 18 16 26 24 3 26 11 18 5 29 18 3 25 8 12 7 32 25 3 17 9 17 9 25 21 3 32 16 9 6 29 26 3 33 11 9 6 28 22 3 13 16 12 5 17 22 3 32 12 18 12 28 22 3 25 12 12 7 29 23 3 29 14 18 10 26 30 3 22 9 14 9 25 23 3 18 10 15 8 14 17 3 17 9 16 5 25 23 3 20 10 10 8 26 23 3 15 12 11 8 20 25 3 20 14 14 10 18 24 3 33 14 9 6 32 24 3 29 10 12 8 25 23 3 23 14 17 7 25 21 3 26 16 5 4 23 24 3 18 9 12 8 21 2 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PStandards[t] = + 9.08042770775861 -0.597428406632135Week[t] + 0.334373957930553Consern[t] -0.360543884942166Doubts[t] + 0.194459349122136PExpect[t] + 0.0119042895646452PCritisism[t] + 0.390931450917963Organisation[t] + 0.00518174230172215t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.080427707758612.6759443.39340.0008820.000441
Week-0.5974284066321350.654515-0.91280.3628130.181407
Consern0.3343739579305530.0559695.974300
Doubts-0.3605438849421660.107471-3.35480.0010040.000502
PExpect0.1944593491221360.1016311.91340.0575910.028795
PCritisism0.01190428956464520.1293760.0920.9268090.463405
Organisation0.3909314509179630.0740535.279100
t0.005181742301722150.0117730.44020.6604540.330227


Multiple Linear Regression - Regression Statistics
Multiple R0.610183506023453
R-squared0.372323911023073
Adjusted R-squared0.343226343984408
F-TEST (value)12.7957059271767
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value7.55950857467269e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.41748962153724
Sum Squared Residuals1763.56453231053


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.91166368355730.0883363164426993
22523.33460213111521.66539786888480
33025.19396802774064.80603197225942
41921.227182072629-2.22718207262899
52221.51163653883640.488363461163552
62224.0124885254431-2.01248852544307
72523.56126807797911.43873192202091
82320.38801432689712.61198567310291
91719.7969982021306-2.79699820213060
102122.0403507064565-1.04035070645649
111923.1937377724846-4.1937377724846
121923.9196025188496-4.91960251884957
131523.6177711534672-8.61777115346725
141617.5541194816704-1.55411948167038
152319.84770274067053.15229725932952
162724.44937874751342.55062125248655
172221.42652043222600.573479567773976
181417.0355651132225-3.03556511322252
192224.5586458613607-2.55864586136073
202323.9651407792001-0.965140779200137
212321.47264958189331.52735041810666
222124.4519977168330-3.45199771683305
231922.2710278341914-3.27102783419144
241823.7617337886120-5.76173378861203
252022.9851762942856-2.98517629428555
262322.29488370000350.705116299996546
272523.24130452039131.75869547960871
281923.2276543910732-4.22765439107322
292423.75965668775390.240343312246052
302221.47387772434260.526122275657441
312525.0268845962352-0.0268845962352194
322623.11769676997042.88230323002964
332922.78343600419466.2165639958054
343225.12944808421456.87055191578553
352521.53147379919773.46852620080228
362924.39172730878144.60827269121862
372824.97027663005263.02972336994737
381717.0567335468342-0.0567335468342169
392826.10728215127051.89271784872955
402922.93650009642026.06349990357978
412627.4970790204123-1.49707902041231
422523.43810063943211.56189936056794
431419.5822090191191-5.58220901911912
442522.11789587436842.88210412563157
452621.63461237948084.36538762051923
462020.2231588132035-0.223158813203451
471821.3953777508513-3.39537775085134
483224.7275070423817.272492957619
492525.0536236683069-0.0536236683069089
502521.78891567746683.21108432253324
512320.87970081827012.12029918172987
522122.1425306938361-1.14253069383612
532024.0196422707286-4.01964227072863
541516.5520832674171-1.55208326741709
553026.77499724555853.22500275444149
562425.3507310413086-1.35073104130858
572624.31818570487871.68181429512134
582421.78303829193712.21696170806288
592221.43745881205180.562541187948228
601415.7502332326531-1.75023323265312
612422.25762815710371.74237184289633
622423.00757687569570.992423124304322
632423.39301237461060.606987625389408
642419.99660295476424.00339704523578
651918.55325412663790.446745873362124
663126.89859864285944.10140135714059
672226.7332028172792-4.73320281727917
682721.58147752496255.41852247503753
691917.75728332536611.24271667463385
702522.37993430303972.62006569696028
712025.1515000704160-5.15150007041597
722121.5943257099521-0.594325709952096
732727.6409800161059-0.640980016105901
742324.5829167645659-1.58291676456588
752525.8872033493752-0.887203349375234
762022.4054240610342-2.40542406103416
772119.35906725792641.64093274207362
782222.5995692004550-0.599569200454971
792323.1009185954322-0.100918595432210
802524.29905915586250.70094084413754
812523.55301386653331.44698613346669
821723.9670181704281-6.96701817042807
831921.6372513714409-2.63725137144088
842524.13928422391230.860715776087668
851921.9444942356742-2.94449423567415
862022.7692487362938-2.76924873629376
872622.13886903879773.86113096120232
882320.29708291878692.70291708121311
892724.06633490888722.93366509111278
901720.5311399253393-3.53113992533928
911723.008381173949-6.00838117394901
921919.7179098799793-0.717909879979266
931719.3576956688508-2.35769566885084
942221.73553107522160.264468924778375
952123.1044347468696-2.10443474686963
963228.33903071882853.66096928117149
972124.3930893880104-3.39308938801039
982124.0609793307881-3.06097933078813
991820.9383194909969-2.93831949099694
1001821.010579958999-3.01057995899901
1012322.54472583844080.455274161559224
1021920.3255523664996-1.32555236649958
1032020.7356914760935-0.735691476093458
1042122.0004204964955-1.00042049649547
1052023.4728914787342-3.47289147873416
1061718.6142593762223-1.61425937622229
1071820.0564207282979-2.05642072829787
1081920.5414084736735-1.54140847367350
1092221.82465644251160.175343557488359
1101518.5119470261793-3.5119470261793
1111418.5729376341405-4.57293763414053
1121826.3857448443021-8.38574484430213
1132421.11346334399852.88653665600147
1143523.394024592310011.6059754076900
1152918.810762106951410.1892378930486
1162121.7272762440235-0.727276244023457
1172520.36090338600404.63909661399597
1182018.26979167021721.73020832978276
1192223.0254596391535-1.02545963915346
1201316.7194203948531-3.71942039485315
1212623.05789146766942.94210853233062
1221716.70988474980960.290115250190362
1232519.91775670998605.08224329001397
1242020.4759765211343-0.475976521134334
1251917.89295046366121.10704953633880
1262122.4575766582009-1.45757665820091
1272220.85461911448081.14538088551921
1282422.47397840082541.52602159917457
1292122.7662384491393-1.76623844913926
1302625.35864023278160.641359767218397
1312420.45545150318623.54454849681379
1321620.1180994027268-4.11809940272676
1332322.18214013973280.817859860267227
1341820.6398744684833-2.63987446848330
1351622.2268334361784-6.22683343617845
1362624.01080523449491.98919476550514
1371918.95584046028060.0441595397194431
1382116.81521814891484.18478185108522
1392122.0339880840301-1.03398808403006
1402218.43755429127063.56244570872936
1412319.73525715553173.26474284446833
1422924.76763865935894.23236134064111
1432119.22348851092311.77651148907692
1442119.85367152879651.14632847120354
1452321.81409736775581.18590263224417
1462722.96822447795544.03177552204464
1472525.4137730395503-0.41377303955029
1482120.94120802167180.0587919783282202
1491017.0906417040770-7.09064170407697
1502022.5999542231388-2.59995422313884
1512622.48351249942653.51648750057351
1522423.66104629857510.338953701424890
1532931.7277367555290-2.72773675552904
1541919.0850685418013-0.0850685418012816
1552422.07795232738661.92204767261340
1561920.7474859458915-1.74748594589149
1572423.43574603435740.564253965642628
1582221.81501098779980.184989012200151
1591723.8153269286905-6.81532692869054


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.4533016503460610.9066033006921230.546698349653939
120.3488170518365660.6976341036731320.651182948163434
130.4616648405720190.9233296811440380.538335159427981
140.3732552361663050.746510472332610.626744763833695
150.6337682161980020.7324635676039970.366231783801998
160.5662001270212350.867599745957530.433799872978765
170.5710861727816630.8578276544366740.428913827218337
180.5466044817465590.9067910365068810.453395518253441
190.458956640215520.917913280431040.54104335978448
200.5720157825578650.855968434884270.427984217442135
210.6129997419714480.7740005160571040.387000258028552
220.547496098147780.905007803704440.45250390185222
230.4833790638691960.9667581277383930.516620936130804
240.4758293343783220.9516586687566430.524170665621678
250.4163477243082500.8326954486165010.58365227569175
260.3729599351786550.7459198703573090.627040064821345
270.3571077944100680.7142155888201360.642892205589932
280.3243545729223730.6487091458447470.675645427077627
290.3034202224533770.6068404449067550.696579777546623
300.2548916027766970.5097832055533940.745108397223303
310.2228834913830680.4457669827661360.777116508616932
320.2574295467004140.5148590934008270.742570453299586
330.3599171415782750.719834283156550.640082858421725
340.4807745139808450.961549027961690.519225486019155
350.4306646228056440.8613292456112880.569335377194356
360.3968688419039060.7937376838078120.603131158096094
370.3444253498562670.6888506997125350.655574650143733
380.3377274459064570.6754548918129150.662272554093543
390.3070875040286080.6141750080572160.692912495971392
400.3046739614148710.6093479228297410.69532603858513
410.3846179016326470.7692358032652940.615382098367353
420.3506365203638680.7012730407277360.649363479636132
430.5861582129720390.8276835740559220.413841787027961
440.5489117092841720.9021765814316560.451088290715828
450.524363790896270.951272418207460.47563620910373
460.4931198472331290.9862396944662580.506880152766871
470.5387295709851720.9225408580296560.461270429014828
480.5909087027173320.8181825945653360.409091297282668
490.5836678180621550.832664363875690.416332181937845
500.5523340914792020.8953318170415970.447665908520798
510.515653763998740.968692472002520.48434623600126
520.503619914705030.992760170589940.49638008529497
530.5870490956995730.8259018086008540.412950904300427
540.5610882627027250.877823474594550.438911737297275
550.551294226761150.89741154647770.44870577323885
560.5436515147821180.9126969704357630.456348485217882
570.4983474692442210.9966949384884410.501652530755779
580.4603039288655770.9206078577311540.539696071134423
590.4139854639268820.8279709278537650.586014536073118
600.3827859754552770.7655719509105530.617214024544723
610.3409469713392710.6818939426785420.659053028660729
620.3076872245496790.6153744490993580.692312775450321
630.2719759739514120.5439519479028240.728024026048588
640.2799193415555790.5598386831111580.720080658444421
650.2423247519973150.4846495039946290.757675248002685
660.2453977616473280.4907955232946570.754602238352672
670.3592648603205870.7185297206411740.640735139679413
680.4071835353582050.814367070716410.592816464641795
690.3669176309950660.7338352619901320.633082369004934
700.3441450640747920.6882901281495830.655854935925208
710.4531448480516430.9062896961032860.546855151948357
720.4116352431232680.8232704862465360.588364756876732
730.3791609237301900.7583218474603790.62083907626981
740.3523879173141540.7047758346283080.647612082685846
750.3255867408135630.6511734816271270.674413259186436
760.3044803810643070.6089607621286140.695519618935693
770.2806802934509850.561360586901970.719319706549015
780.2447610657696670.4895221315393330.755238934230333
790.2119683396941370.4239366793882740.788031660305863
800.189143062476510.378286124953020.81085693752349
810.1769371313309060.3538742626618120.823062868669094
820.2599257873760690.5198515747521370.740074212623931
830.2420153486171940.4840306972343870.757984651382806
840.2087458129903840.4174916259807680.791254187009616
850.2020037875154890.4040075750309780.79799621248451
860.1891449971096160.3782899942192320.810855002890384
870.2092012751562540.4184025503125080.790798724843746
880.2053378193429120.4106756386858250.794662180657088
890.2025804461963260.4051608923926510.797419553803674
900.1961032303615030.3922064607230050.803896769638497
910.2515314887080580.5030629774161160.748468511291942
920.2150907066411480.4301814132822970.784909293358852
930.190901902146040.381803804292080.80909809785396
940.1632588858204940.3265177716409870.836741114179506
950.1427690490328630.2855380980657260.857230950967137
960.1588511866593590.3177023733187180.841148813340641
970.1489613841547240.2979227683094490.851038615845276
980.1351640209495810.2703280418991630.864835979050419
990.1214888434233440.2429776868466880.878511156576656
1000.1106786015085100.2213572030170200.88932139849149
1010.09090318628898860.1818063725779770.909096813711011
1020.07323077135879180.1464615427175840.926769228641208
1030.0578451942135850.115690388427170.942154805786415
1040.04559982332420640.09119964664841290.954400176675794
1050.04644958534457250.0928991706891450.953550414655428
1060.03724611471698790.07449222943397570.962753885283012
1070.03269758235606130.06539516471212260.967302417643939
1080.02995150601174360.05990301202348720.970048493988256
1090.02361176628946780.04722353257893570.976388233710532
1100.02442501235003870.04885002470007730.975574987649961
1110.03421246299686340.06842492599372680.965787537003137
1120.2360703740084260.4721407480168530.763929625991574
1130.2484874123817660.4969748247635330.751512587618233
1140.6063620141047380.7872759717905240.393637985895262
1150.8655382969511720.2689234060976550.134461703048828
1160.8341169301717120.3317661396565770.165883069828288
1170.8634534558770030.2730930882459940.136546544122997
1180.8348589988495530.3302820023008940.165141001150447
1190.8133017296007020.3733965407985950.186698270399298
1200.8694199799610480.2611600400779040.130580020038952
1210.8418279205483640.3163441589032730.158172079451636
1220.8070923045500980.3858153908998040.192907695449902
1230.8145384588473910.3709230823052170.185461541152609
1240.7708436055393750.4583127889212510.229156394460625
1250.7359058964809250.528188207038150.264094103519075
1260.6970705048397860.6058589903204290.302929495160214
1270.64811922451010.7037615509798010.351880775489900
1280.5951621798736210.8096756402527580.404837820126379
1290.5402911950547180.9194176098905650.459708804945282
1300.4887314777594750.977462955518950.511268522240525
1310.4591902305239310.9183804610478620.540809769476069
1320.4835687040517260.9671374081034530.516431295948274
1330.4184951322581110.8369902645162210.58150486774189
1340.3896437667668980.7792875335337950.610356233233103
1350.6915526182958080.6168947634083840.308447381704192
1360.6220628052285660.7558743895428680.377937194771434
1370.6079278099595270.7841443800809460.392072190040473
1380.5512885798104490.8974228403791020.448711420189551
1390.5750834569839050.849833086032190.424916543016095
1400.4974788087903150.994957617580630.502521191209685
1410.434405115735450.86881023147090.56559488426455
1420.3902369038925690.7804738077851370.609763096107431
1430.4085351048911450.817070209782290.591464895108855
1440.3488716857208150.6977433714416290.651128314279185
1450.2497884710759780.4995769421519560.750211528924022
1460.2124661337828710.4249322675657420.787533866217129
1470.1721604707498720.3443209414997440.827839529250128
1480.09517859111361450.1903571822272290.904821408886386


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/1x3gb1290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/1x3gb1290528071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/2x3gb1290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/2x3gb1290528071.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/48cfw1290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/48cfw1290528071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/58cfw1290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/58cfw1290528071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/68cfw1290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/68cfw1290528071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/7jmez1290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/7jmez1290528071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/8cdw21290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/8cdw21290528071.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/9cdw21290528071.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052804265a62tsc8hrbsh0/9cdw21290528071.ps (open in new window)


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