Home » date » 2010 » Nov » 30 »

WS7 lineaire trend?

*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:05:31 +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/t1291136661ykd7dwqmu3sjd3r.htm/, Retrieved Tue, 30 Nov 2010 18:04:21 +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/t1291136661ykd7dwqmu3sjd3r.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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PStandards[t] = + 9.08042770775861 -0.59742840663213Week[t] + 0.334373957930553Consern[t] -0.360543884942166Doubts[t] + 0.194459349122136PExpect[t] + 0.0119042895646442PCritisism[t] + 0.390931450917962Organisation[t] + 0.00518174230172207t + 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.597428406632130.654515-0.91280.3628130.181407
Consern0.3343739579305530.0559695.974300
Doubts-0.3605438849421660.107471-3.35480.0010040.000502
PExpect0.1944593491221360.1016311.91340.0575910.028795
PCritisism0.01190428956464420.1293760.0920.9268090.463405
Organisation0.3909314509179620.0740535.279100
t0.005181742301722070.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.91166368355740.0883363164425639
22523.33460213111521.66539786888483
33025.19396802774064.80603197225942
41921.227182072629-2.22718207262898
52221.51163653883640.488363461163561
62224.0124885254431-2.01248852544306
72523.56126807797911.43873192202093
82320.38801432689712.61198567310293
91719.7969982021306-2.79699820213059
102122.0403507064565-1.04035070645649
111923.1937377724846-4.19373777248459
121923.9196025188496-4.91960251884957
131523.6177711534672-8.61777115346725
141617.5541194816704-1.55411948167037
152319.84770274067053.15229725932953
162724.44937874751342.55062125248656
172221.4265204322260.573479567773982
181417.0355651132225-3.03556511322252
192224.5586458613607-2.55864586136073
202323.9651407792001-0.965140779200138
212321.47264958189331.52735041810667
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.22765439107323
292423.75965668775390.240343312246051
302221.47387772434260.526122275657438
312525.0268845962352-0.02688459623522
322623.11769676997042.88230323002964
332922.78343600419466.2165639958054
343225.12944808421456.87055191578552
352521.53147379919773.46852620080227
362924.39172730878144.60827269121863
372824.97027663005263.02972336994737
381717.0567335468342-0.0567335468342179
392826.10728215127041.89271784872955
402922.93650009642026.06349990357978
412627.4970790204123-1.49707902041231
422523.43810063943211.56189936056794
431419.5822090191191-5.58220901911912
442522.11789587436842.88210412563156
452621.63461237948084.36538762051923
462020.2231588132035-0.223158813203450
471821.3953777508513-3.39537775085134
483224.7275070423817.272492957619
492525.0536236683069-0.0536236683069085
502521.78891567746683.21108432253324
512320.87970081827012.12029918172988
522122.1425306938361-1.14253069383611
532024.0196422707286-4.01964227072863
541516.5520832674171-1.55208326741709
553026.77499724555853.2250027544415
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.60698762538941
642419.99660295476424.00339704523579
651918.55325412663790.446745873362123
663126.89859864285944.10140135714059
672226.7332028172792-4.73320281727917
682721.58147752496255.41852247503753
691917.75728332536611.24271667463385
702522.37993430303972.62006569696029
712025.1515000704160-5.15150007041597
722121.5943257099521-0.594325709952094
732727.6409800161059-0.640980016105898
742324.5829167645659-1.58291676456588
752525.8872033493752-0.887203349375234
762022.4054240610342-2.40542406103416
772119.35906725792641.64093274207362
782222.5995692004550-0.599569200454967
792323.1009185954322-0.100918595432204
802524.29905915586250.700940844137541
812523.55301386653331.44698613346670
821723.9670181704281-6.96701817042806
831921.6372513714409-2.63725137144087
842524.13928422391230.860715776087671
851921.9444942356742-2.94449423567416
862022.7692487362938-2.76924873629376
872622.13886903879773.86113096120232
882320.29708291878692.70291708121311
892724.06633490888722.93366509111278
901720.5311399253393-3.53113992533928
911723.008381173949-6.00838117394901
921919.7179098799793-0.717909879979271
931719.3576956688508-2.35769566885085
942221.73553107522160.264468924778369
952123.1044347468696-2.10443474686963
963228.33903071882853.66096928117148
972124.3930893880104-3.39308938801039
982124.0609793307881-3.06097933078813
991820.9383194909969-2.93831949099694
1001821.010579958999-3.01057995899902
1012322.54472583844080.455274161559222
1021920.3255523664996-1.32555236649959
1032020.7356914760935-0.735691476093464
1042122.0004204964955-1.00042049649547
1052023.4728914787342-3.47289147873415
1061718.6142593762223-1.61425937622229
1071820.0564207282979-2.05642072829787
1081920.5414084736735-1.54140847367351
1092221.82465644251160.175343557488359
1101518.5119470261793-3.51194702617930
1111418.5729376341405-4.57293763414053
1121826.3857448443021-8.38574484430213
1132421.11346334399852.88653665600147
1143523.394024592310011.6059754076900
1152918.810762106951410.1892378930486
1162121.7272762440235-0.72727624402346
1172520.36090338600404.63909661399597
1182018.26979167021721.73020832978275
1192223.0254596391535-1.02545963915346
1201316.7194203948531-3.71942039485315
1212623.05789146766942.94210853233062
1221716.70988474980960.290115250190359
1232519.91775670998605.08224329001397
1242020.4759765211343-0.475976521134335
1251917.89295046366121.10704953633881
1262122.4575766582009-1.45757665820091
1272220.85461911448081.14538088551920
1282422.47397840082541.52602159917458
1292122.7662384491393-1.76623844913926
1302625.35864023278160.641359767218398
1312420.45545150318623.54454849681380
1321620.1180994027268-4.11809940272676
1332322.18214013973280.817859860267226
1341820.6398744684833-2.63987446848331
1351622.2268334361784-6.22683343617845
1362624.01080523449491.98919476550514
1371918.95584046028060.0441595397194419
1382116.81521814891484.18478185108522
1392122.0339880840301-1.03398808403006
1402218.43755429127063.56244570872936
1412319.73525715553173.26474284446833
1422924.76763865935894.23236134064111
1432119.22348851092311.77651148907692
1442119.85367152879651.14632847120354
1452321.81409736775581.18590263224418
1462722.96822447795544.03177552204464
1472525.4137730395503-0.413773039550292
1482120.94120802167180.0587919783282198
1491017.0906417040770-7.09064170407698
1502022.5999542231388-2.59995422313884
1512622.48351249942653.51648750057351
1522423.66104629857510.338953701424892
1532931.7277367555290-2.72773675552905
1541919.0850685418013-0.085068541801287
1552422.07795232738661.92204767261340
1561920.7474859458915-1.74748594589149
1572423.43574603435740.564253965642631
1582221.81501098779980.184989012200154
1591723.8153269286905-6.81532692869054


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.453301650346060.906603300692120.54669834965394
120.3488170518365650.6976341036731310.651182948163435
130.4616648405720190.9233296811440380.538335159427981
140.3732552361663060.7465104723326110.626744763833694
150.6337682161980020.7324635676039960.366231783801998
160.5662001270212350.867599745957530.433799872978765
170.5710861727816640.8578276544366730.428913827218336
180.5466044817465580.9067910365068840.453395518253442
190.4589566402155190.9179132804310370.541043359784481
200.5720157825578650.8559684348842690.427984217442135
210.6129997419714460.7740005160571070.387000258028554
220.547496098147780.905007803704440.45250390185222
230.4833790638691960.9667581277383930.516620936130804
240.475829334378320.951658668756640.52417066562168
250.4163477243082510.8326954486165030.583652275691749
260.3729599351786560.7459198703573110.627040064821344
270.3571077944100660.7142155888201320.642892205589934
280.3243545729223730.6487091458447460.675645427077627
290.3034202224533750.606840444906750.696579777546625
300.2548916027766970.5097832055533930.745108397223303
310.2228834913830680.4457669827661350.777116508616932
320.2574295467004140.5148590934008270.742570453299586
330.3599171415782720.7198342831565450.640082858421728
340.4807745139808470.9615490279616930.519225486019154
350.4306646228056470.8613292456112950.569335377194353
360.3968688419039050.793737683807810.603131158096095
370.3444253498562680.6888506997125360.655574650143732
380.3377274459064570.6754548918129150.662272554093543
390.3070875040286100.6141750080572210.69291249597139
400.3046739614148710.6093479228297410.69532603858513
410.3846179016326460.7692358032652930.615382098367354
420.3506365203638680.7012730407277350.649363479636132
430.5861582129720360.8276835740559270.413841787027964
440.5489117092841710.9021765814316580.451088290715829
450.524363790896270.951272418207460.47563620910373
460.493119847233130.986239694466260.50688015276687
470.5387295709851740.9225408580296510.461270429014826
480.5909087027173320.8181825945653360.409091297282668
490.5836678180621550.832664363875690.416332181937845
500.5523340914792060.8953318170415890.447665908520794
510.515653763998740.968692472002520.48434623600126
520.5036199147050280.9927601705899450.496380085294973
530.5870490956995730.8259018086008550.412950904300427
540.5610882627027260.8778234745945490.438911737297274
550.551294226761150.89741154647770.44870577323885
560.5436515147821180.9126969704357640.456348485217882
570.4983474692442220.9966949384884440.501652530755778
580.4603039288655760.9206078577311530.539696071134424
590.4139854639268830.8279709278537670.586014536073117
600.3827859754552760.7655719509105520.617214024544724
610.3409469713392710.6818939426785430.659053028660729
620.3076872245496790.6153744490993580.692312775450321
630.271975973951410.543951947902820.72802402604859
640.2799193415555790.5598386831111570.720080658444421
650.2423247519973160.4846495039946320.757675248002684
660.2453977616473270.4907955232946530.754602238352673
670.3592648603205860.7185297206411710.640735139679414
680.4071835353582060.8143670707164130.592816464641794
690.3669176309950670.7338352619901340.633082369004933
700.3441450640747940.6882901281495870.655854935925206
710.4531448480516430.9062896961032860.546855151948357
720.4116352431232680.8232704862465360.588364756876732
730.3791609237301900.7583218474603810.62083907626981
740.3523879173141530.7047758346283070.647612082685847
750.3255867408135630.6511734816271260.674413259186437
760.3044803810643070.6089607621286150.695519618935693
770.2806802934509840.5613605869019680.719319706549016
780.2447610657696670.4895221315393330.755238934230334
790.2119683396941380.4239366793882760.788031660305862
800.1891430624765100.3782861249530190.81085693752349
810.1769371313309050.353874262661810.823062868669095
820.2599257873760700.5198515747521390.74007421262393
830.2420153486171960.4840306972343910.757984651382804
840.2087458129903840.4174916259807670.791254187009616
850.2020037875154890.4040075750309780.797996212484511
860.1891449971096180.3782899942192360.810855002890382
870.2092012751562530.4184025503125070.790798724843747
880.2053378193429120.4106756386858240.794662180657088
890.2025804461963240.4051608923926490.797419553803676
900.1961032303615030.3922064607230050.803896769638497
910.2515314887080550.503062977416110.748468511291945
920.2150907066411490.4301814132822980.784909293358851
930.1909019021460390.3818038042920770.809098097853961
940.1632588858204930.3265177716409860.836741114179507
950.1427690490328620.2855380980657250.857230950967138
960.1588511866593580.3177023733187160.841148813340642
970.1489613841547240.2979227683094490.851038615845276
980.1351640209495810.2703280418991630.864835979050419
990.1214888434233440.2429776868466880.878511156576656
1000.110678601508510.221357203017020.88932139849149
1010.09090318628898830.1818063725779770.909096813711012
1020.07323077135879140.1464615427175830.926769228641209
1030.0578451942135850.115690388427170.942154805786415
1040.04559982332420620.09119964664841250.954400176675794
1050.04644958534457280.09289917068914560.953550414655427
1060.03724611471698790.07449222943397580.962753885283012
1070.0326975823560610.0653951647121220.967302417643939
1080.02995150601174360.05990301202348710.970048493988256
1090.02361176628946770.04722353257893530.976388233710532
1100.02442501235003860.04885002470007730.975574987649961
1110.03421246299686270.06842492599372540.965787537003137
1120.2360703740084250.472140748016850.763929625991575
1130.2484874123817670.4969748247635330.751512587618233
1140.6063620141047360.7872759717905290.393637985895264
1150.8655382969511720.2689234060976560.134461703048828
1160.8341169301717120.3317661396565760.165883069828288
1170.8634534558770020.2730930882459950.136546544122998
1180.8348589988495520.3302820023008960.165141001150448
1190.8133017296007030.3733965407985930.186698270399297
1200.8694199799610480.2611600400779030.130580020038952
1210.8418279205483630.3163441589032730.158172079451637
1220.8070923045500980.3858153908998040.192907695449902
1230.8145384588473910.3709230823052170.185461541152609
1240.7708436055393750.458312788921250.229156394460625
1250.7359058964809250.528188207038150.264094103519075
1260.6970705048397850.605858990320430.302929495160215
1270.64811922451010.70376155097980.3518807754899
1280.5951621798736220.8096756402527560.404837820126378
1290.5402911950547180.9194176098905650.459708804945282
1300.4887314777594750.977462955518950.511268522240525
1310.4591902305239290.9183804610478570.540809769476071
1320.4835687040517260.9671374081034520.516431295948274
1330.4184951322581110.8369902645162210.581504867741889
1340.3896437667668990.7792875335337980.610356233233101
1350.6915526182958080.6168947634083840.308447381704192
1360.6220628052285640.7558743895428710.377937194771436
1370.6079278099595270.7841443800809450.392072190040473
1380.5512885798104490.8974228403791010.448711420189551
1390.5750834569839050.849833086032190.424916543016095
1400.4974788087903140.9949576175806290.502521191209686
1410.434405115735450.86881023147090.56559488426455
1420.3902369038925680.7804738077851360.609763096107432
1430.4085351048911440.8170702097822890.591464895108855
1440.3488716857208140.6977433714416290.651128314279186
1450.2497884710759780.4995769421519570.750211528924022
1460.2124661337828710.4249322675657410.78753386621713
1470.1721604707498730.3443209414997450.827839529250127
1480.09517859111361460.1903571822272290.904821408886385


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


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/1p0lm1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/1p0lm1291136720.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/2i92p1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/2i92p1291136720.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/3i92p1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/3i92p1291136720.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/4i92p1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/4i92p1291136720.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/5ai1a1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/5ai1a1291136720.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/73ajv1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/73ajv1291136720.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/9wj0y1291136720.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291136661ykd7dwqmu3sjd3r/9wj0y1291136720.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