Home » date » 2010 » Nov » 22 »

Mini-Tutorial Determistic 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: Mon, 22 Nov 2010 22:57:36 +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/22/t1290466610f9r8hb6baj9m97s.htm/, Retrieved Mon, 22 Nov 2010 23:56:50 +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/22/t1290466610f9r8hb6baj9m97s.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 «
13 26 9 15 6 25 25 16 20 9 15 6 25 24 19 21 9 14 13 19 21 15 31 14 10 8 18 23 14 21 8 10 7 18 17 13 18 8 12 9 22 19 19 26 11 18 5 29 18 15 22 10 12 8 26 27 14 22 9 14 9 25 23 15 29 15 18 11 23 23 16 15 14 9 8 23 29 16 16 11 11 11 23 21 16 24 14 11 12 24 26 17 17 6 17 8 30 25 15 19 20 8 7 19 25 15 22 9 16 9 24 23 20 31 10 21 12 32 26 18 28 8 24 20 30 20 16 38 11 21 7 29 29 16 26 14 14 8 17 24 19 25 11 7 8 25 23 16 25 16 18 16 26 24 17 29 14 18 10 26 30 17 28 11 13 6 25 22 16 15 11 11 8 23 22 15 18 12 13 9 21 13 14 21 9 13 9 19 24 15 25 7 18 11 35 17 12 23 13 14 12 19 24 14 23 10 12 8 20 21 16 19 9 9 7 21 23 14 18 9 12 8 21 24 7 18 13 8 9 24 24 10 26 16 5 4 23 24 14 18 12 10 8 19 23 16 18 6 11 8 17 26 16 28 14 11 8 24 24 16 17 14 12 6 15 21 14 29 10 12 8 25 23 20 12 4 15 4 27 28 14 25 12 12 7 29 23 14 28 12 16 14 27 22 11 20 14 14 10 18 24 15 17 9 17 9 25 21 16 17 9 13 6 22 23 14 20 10 10 8 26 23 16 31 14 17 11 23 20 14 21 10 12 8 16 23 12 19 9 13 8 27 21 16 23 1 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
Confidence[t] = + 13.1859586294866 + 0.00507128374736726Concern[t] -0.278644023837285Doubts[t] + 0.101708935008028ParentalExpectations[t] + 0.00158176421768097ParentalCriticism[t] + 0.0217139022837344PersonalStandards[t] + 0.149270127306556Organization[t] -0.00580718049086313t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)13.18595862948661.5712318.392100
Concern0.005071283747367260.0376310.13480.8929890.446495
Doubts-0.2786440238372850.068906-4.04388.6e-054.3e-05
ParentalExpectations0.1017089350080280.0627261.62150.1071310.053566
ParentalCriticism0.001581764217680970.0789030.020.9840340.492017
PersonalStandards0.02171390228373440.0490430.44280.6586160.329308
Organization0.1492701273065560.0498942.99170.0032720.001636
t-0.005807180490863130.003975-1.4610.1462160.073108


Multiple Linear Regression - Regression Statistics
Multiple R0.467944300630389
R-squared0.218971868492464
Adjusted R-squared0.180470481728008
F-TEST (value)5.68737614133464
F-TEST (DF numerator)7
F-TEST (DF denominator)142
p-value8.27082807408619e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.05762788096972
Sum Squared Residuals601.204214509241


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.6139339620755-3.6139339620755
21616.4284289517939-0.428428951793902
31915.75896267394413.24103732605593
41514.27273000294930.727269997050687
51414.9908715999515-0.99087159995147
61315.5618278304180-2.56182783041797
71915.36731259025123.63268740974878
81516.2926454201209-1.29264542012085
91416.1516874861911-2.15168748619105
101514.87608661280810.123913387191945
111615.05342053980540.946579460194623
121614.90261885879041.09738114120961
131614.87109617980081.12890382019920
141717.6438820433499-0.643882043349945
151512.59138599222082.40861400777919
161516.2927411904873-1.29274119048733
172017.18874310776822.81125689223178
181817.10374247406860.896257525931451
191617.3087435631608-1.30874356316084
201614.68885066141361.31114933858640
211914.82638281459434.17361718540565
221614.72979194333711.27020805666289
231716.18768812404350.812311875956463
241715.28199507867011.71800492132989
251614.96657906331531.03342093668469
261513.51548239413651.48451760586348
271415.9593647322043-1.95936473220427
281516.3453704832468-1.34537048324680
291214.9497710710292-2.94977107102921
301415.1440545555275-1.14405455552749
311615.41015185153950.589848148460479
321415.8552520838496-1.85525208384961
33714.3947565390464-7.39475653904638
341013.2588380286264-3.25883802862638
351414.6057826689751-0.605782668975087
361616.7779311438682-0.777931143868164
371614.44714167152571.55285832847428
381613.84086027391322.15913972608680
391415.5293273996257-1.52932739962571
402018.19775072770691.80224927229308
411415.0254137008972-1.02541370089720
421415.2600305293303-1.26003052933029
431114.5497352383586-3.54973523835864
441515.9296663006850-0.929666300684979
451615.74567663527090.25432336472913
461415.2613316147310-1.26133161473104
471614.40048820905041.59951179094956
481415.2410673846754-1.24106738467539
491215.5457832660431-3.54578326604307
501615.02239758906250.977602410937516
51913.9633980484456-4.96339804844555
521414.4875496896335-0.487549689633468
531615.74082223373790.259177766262083
541615.16097165221750.839028347782451
551515.2122243633186-0.212224363318575
561614.85218195556211.14781804443789
571213.5401323121032-1.54013231210324
581616.5217287955254-0.521728795525386
591616.1761543938631-0.176154393863125
601416.3933353283843-2.39333532838426
611612.60166062609213.39833937390794
621715.98242043166971.01757956833026
631814.70708719140913.29291280859092
641815.42492209146172.5750779085383
651214.5025949683924-2.50259496839241
661615.86873026178830.131269738211660
671014.3910440418816-4.39104404188163
681412.70959490873481.29040509126520
691815.41795566482222.58204433517785
701816.26536224998631.73463775001372
711615.52902898553460.470971014465363
721615.48255315243530.517446847564721
731614.72713599459531.27286400540465
741314.6752984396829-1.67529843968288
751615.06708088307580.932919116924178
761614.77443750951251.22556249048753
772015.94826522085514.05173477914486
781615.23874193227670.761258067723293
791512.80632370505442.19367629494562
801515.2913349665646-0.291334966564635
811615.79559610480690.204403895193115
821414.0345813427015-0.0345813427015287
831513.22160008398891.77839991601113
841214.9066365866886-2.90663658668858
851715.96011267920371.03988732079633
861615.12893565859660.871064341403366
871513.04450655814651.95549344185345
881314.3081944139494-1.30819441394942
891615.85884744133050.141152558669501
901615.20547358205450.794526417945482
911616.1312662650405-0.131266265040474
921615.77139693422660.228603065773409
931415.5486865554169-1.54868655541693
941614.06738901091211.93261098908791
951615.04225815286020.95774184713982
962016.26923400136883.73076599863119
971515.3992262599508-0.39922625995077
981613.99803265653902.00196734346102
991314.2957655650165-1.29576556501655
1001715.76722896107091.23277103892914
1011614.06796835866581.93203164133423
1021213.2356636412037-1.23566364120369
1031614.91118004979671.08881995020325
1041615.14223871775070.857761282249325
1051715.34788600859241.65211399140764
1061313.0595149855268-0.0595149855268156
1071215.7081076497185-3.7081076497185
1081815.64434891431622.35565108568384
1091413.53878609067220.461213909327788
1101414.3394650263327-0.339465026332685
1111313.6382368874932-0.638236887493229
1121615.27739379034880.722606209651224
1131312.49040834857980.509591651420171
1141615.12155930219660.878440697803391
1151314.6830274621508-1.68302746215077
1161615.64260342692470.35739657307529
1171514.52045701566670.479542984333252
1181615.09332107964920.906678920350833
1191514.73166092779320.268339072206798
1201715.41961934864581.58038065135420
1211515.6157457213473-0.615745721347312
1221213.4724342652028-1.47243426520282
1231614.21337020989311.78662979010686
1241013.9459293229077-3.94592932290766
1251614.17459228440591.82540771559412
1261414.4995566223463-0.499556622346274
1271516.0999575797433-1.09995757974331
1281314.2367854122844-1.23678541228445
1291515.1040846437896-0.104084643789639
1301113.4618815468193-2.46188154681932
1311213.9762152487714-1.97621524877138
132814.2452353733339-6.24523537333395
1331615.94610480563500.0538951943649715
1341514.52114730100840.478852698991634
1351715.03374386097661.96625613902335
1361615.09277118989810.907228810101923
1371014.6538827628817-4.65388276288175
1381813.62556109614214.37443890385786
1391313.5183347163529-0.518334716352945
1401513.96704884882421.03295115117577
1411614.29294612637521.70705387362481
1421614.62245754610241.37754245389761
1431413.07992271192390.920077288076148
1441012.7967484861264-2.7967484861264
1451715.61168184975191.38831815024812
1461313.9868871063324-0.98688710633238
1471515.4647590285849-0.46475902858487
1481615.54708424560700.452915754392974
1491214.9184477267086-2.91844772670861
1501313.2806196571575-0.280619657157512


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.798435715866370.4031285682672600.201564284133630
120.707198649259250.58560270148150.29280135074075
130.5774558765531190.8450882468937620.422544123446881
140.7073133062600850.585373387479830.292686693739915
150.6130769368468480.7738461263063040.386923063153152
160.5109737287250960.9780525425498080.489026271274904
170.5199932659239040.960013468152190.480006734076095
180.5275315483622660.9449369032754680.472468451637734
190.4383921470985840.8767842941971680.561607852901416
200.3908452827100780.7816905654201560.609154717289922
210.4807324880819690.9614649761639380.519267511918031
220.4720047257216390.9440094514432780.527995274278361
230.4002948513613740.8005897027227480.599705148638626
240.3331478519644830.6662957039289650.666852148035517
250.2726280969911760.5452561939823530.727371903008823
260.2511793073185380.5023586146370750.748820692681462
270.2117053375924100.4234106751848210.78829466240759
280.3093001132286800.6186002264573610.69069988677132
290.3952484392685460.7904968785370910.604751560731454
300.3354702217321420.6709404434642840.664529778267858
310.3034234874165570.6068469748331140.696576512583443
320.2563244114728610.5126488229457220.743675588527139
330.9027997142746970.1944005714506050.0972002857253027
340.9254614644471350.149077071105730.074538535552865
350.9067820621691220.1864358756617570.0932179378308783
360.9054430917875890.1891138164248230.0945569082124114
370.9008195911375840.1983608177248320.099180408862416
380.9024829925666130.1950340148667740.097517007433387
390.8815664027554320.2368671944891360.118433597244568
400.9128438833859410.1743122332281180.0871561166140589
410.8913043349684840.2173913300630320.108695665031516
420.8697489981912340.2605020036175320.130251001808766
430.9128557318453830.1742885363092330.0871442681546167
440.8919307471773830.2161385056452350.108069252822618
450.8705429907103970.2589140185792070.129457009289603
460.8465778900271680.3068442199456640.153422109972832
470.83263113338310.33473773323380.1673688666169
480.8057258620822610.3885482758354780.194274137917739
490.8448127569043740.3103744861912520.155187243095626
500.8295941746489240.3408116507021520.170405825351076
510.9241543763646710.1516912472706570.0758456236353285
520.91411551933180.17176896133640.0858844806682
530.9071344989774580.1857310020450830.0928655010225417
540.9008276512647320.1983446974705370.0991723487352683
550.8843056644760580.2313886710478840.115694335523942
560.8842977948510360.2314044102979280.115702205148964
570.8737941755942010.2524116488115980.126205824405799
580.8508113022144440.2983773955711120.149188697785556
590.8257666685369810.3484666629260380.174233331463019
600.8405189348417160.3189621303165670.159481065158284
610.8808613020196070.2382773959607850.119138697980393
620.8664298147141770.2671403705716460.133570185285823
630.8981576420134160.2036847159731680.101842357986584
640.911499158410150.1770016831796990.0885008415898493
650.9288745029750210.1422509940499580.0711254970249788
660.9137878620066140.1724242759867730.0862121379933863
670.9686890573666470.06262188526670620.0313109426333531
680.9612327068766150.07753458624676960.0387672931233848
690.9683374765138190.06332504697236260.0316625234861813
700.966614289194330.06677142161133940.0333857108056697
710.9572718971792620.08545620564147680.0427281028207384
720.9462996267948650.1074007464102690.0537003732051345
730.9341590093874020.1316819812251960.0658409906125981
740.9402259851270950.1195480297458100.0597740148729049
750.9277869284640030.1444261430719930.0722130715359965
760.9127134413872910.1745731172254170.0872865586127086
770.9454238039222360.1091523921555290.0545761960777644
780.930522578093350.1389548438133010.0694774219066503
790.923983828488460.1520323430230780.0760161715115392
800.9080962216360620.1838075567278770.0919037783639384
810.886308905548570.2273821889028620.113691094451431
820.8629328056316030.2741343887367940.137067194368397
830.8512155191410860.2975689617178290.148784480858915
840.898164608510480.2036707829790380.101835391489519
850.878849756688890.2423004866222210.121150243311110
860.8524142384255070.2951715231489860.147585761574493
870.8365843560118680.3268312879762630.163415643988132
880.8302104917558580.3395790164882830.169789508244142
890.8058242904977490.3883514190045030.194175709502251
900.7699074644680670.4601850710638660.230092535531933
910.7397421788418510.5205156423162970.260257821158149
920.6992061596194480.6015876807611050.300793840380552
930.7319464359879020.5361071280241950.268053564012098
940.7185007459614050.5629985080771890.281499254038595
950.6755861209394140.6488277581211730.324413879060587
960.7200083909317790.5599832181364420.279991609068221
970.6817544722413160.6364910555173680.318245527758684
980.6798761639493770.6402476721012460.320123836050623
990.6698271769478890.6603456461042210.330172823052111
1000.6298258151226130.7403483697547730.370174184877386
1010.612705925785720.774588148428560.38729407421428
1020.5848311088414930.8303377823170140.415168891158507
1030.5345760667212040.9308478665575910.465423933278796
1040.5006872476006140.9986255047987730.499312752399386
1050.4788566097751880.9577132195503760.521143390224812
1060.4252286811587290.8504573623174580.574771318841271
1070.5960176213921830.8079647572156340.403982378607817
1080.5812673006609830.8374653986780330.418732699339017
1090.5634096549546140.8731806900907710.436590345045386
1100.5104555234159960.9790889531680080.489544476584004
1110.4577631629963820.9155263259927640.542236837003618
1120.4022974006256520.8045948012513040.597702599374348
1130.3652397151661370.7304794303322750.634760284833862
1140.3270278104378830.6540556208757660.672972189562117
1150.3143425162332730.6286850324665450.685657483766727
1160.2625022142515840.5250044285031690.737497785748416
1170.2349119361555900.4698238723111810.76508806384441
1180.2384623044619220.4769246089238450.761537695538078
1190.1922560573699630.3845121147399270.807743942630037
1200.1654865445057420.3309730890114840.834513455494258
1210.1318053978431570.2636107956863140.868194602156843
1220.1175650634449040.2351301268898080.882434936555096
1230.1096300331914650.2192600663829310.890369966808535
1240.1487489103081330.2974978206162660.851251089691867
1250.1197989180792960.2395978361585910.880201081920704
1260.0974198920173480.1948397840346960.902580107982652
1270.07215659811990340.1443131962398070.927843401880097
1280.06114204778532510.1222840955706500.938857952214675
1290.04126167398646230.08252334797292460.958738326013538
1300.04260742681352830.08521485362705650.957392573186472
1310.03538380005275650.0707676001055130.964616199947243
1320.4867881378309470.9735762756618940.513211862169053
1330.4018347865886140.8036695731772270.598165213411386
1340.3138224074129510.6276448148259020.686177592587049
1350.2650629733648620.5301259467297240.734937026635138
1360.1821450162668210.3642900325336420.817854983733179
1370.6259121609031890.7481756781936210.374087839096811
1380.5196886158262670.9606227683474660.480311384173733
1390.3828297753134530.7656595506269060.617170224686547


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 level80.062015503875969OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/10yscv1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/10yscv1290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/199x21290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/199x21290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/22iwn1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/22iwn1290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/32iwn1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/32iwn1290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/42iwn1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/42iwn1290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/5d9w71290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/5d9w71290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/6d9w71290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/6d9w71290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/7njva1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/7njva1290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/8njva1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/8njva1290466645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/9yscv1290466645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290466610f9r8hb6baj9m97s/9yscv1290466645.ps (open in new window)


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