Home » date » 2010 » Nov » 23 »

WS7 - Minitutorail blog 4a multicol

*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 19:59:02 +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/t1290542271rpzxw5y8cg9uhlf.htm/, Retrieved Tue, 23 Nov 2010 20:57:54 +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/t1290542271rpzxw5y8cg9uhlf.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 «
12 6 15 4 7 2 2 2 2 9 11 6 15 3 5 4 1 2 2 9 14 13 14 5 7 7 4 3 4 9 12 8 10 3 3 3 1 2 3 9 21 7 10 6 7 7 5 4 4 9 12 9 12 5 7 2 1 2 3 9 22 5 18 6 7 7 1 2 3 9 11 8 12 6 1 2 1 3 4 9 10 9 14 5 4 1 1 2 3 9 13 11 18 5 5 2 1 2 4 9 10 8 9 3 6 6 2 3 3 9 8 11 11 5 4 1 1 2 2 9 15 12 11 7 7 1 3 3 3 9 10 8 17 5 6 1 1 1 3 9 14 7 8 5 2 2 1 3 3 9 14 9 16 3 2 2 1 1 2 9 11 12 21 5 6 2 1 3 3 9 10 20 24 6 7 1 1 2 2 9 13 7 21 5 5 7 2 3 4 9 7 8 14 2 2 1 4 4 5 9 12 8 7 5 7 2 1 3 3 9 14 16 18 4 4 4 2 3 3 9 11 10 18 6 5 2 1 1 1 9 9 6 13 3 5 1 2 2 4 9 11 8 11 5 5 1 3 1 3 9 15 9 13 4 3 5 1 3 4 9 13 9 13 5 5 2 1 3 3 9 9 11 18 2 1 1 1 2 3 9 15 12 14 2 1 3 1 2 1 9 10 8 12 5 3 1 1 3 4 9 11 7 9 2 2 2 2 2 4 9 13 8 12 2 3 5 1 2 2 9 8 9 8 2 2 2 1 2 2 9 20 4 5 5 5 6 1 1 1 9 12 8 10 5 2 4 1 2 3 9 10 8 11 1 3 1 1 3 4 9 10 8 11 5 4 3 1 1 1 9 9 6 12 2 6 6 1 2 3 9 14 8 12 6 2 7 2 3 3 9 8 4 15 1 7 4 1 2 2 9 14 7 12 4 6 1 2 1 4 9 11 14 16 3 5 5 1 1 3 9 13 10 14 2 3 3 1 3 3 9 11 9 17 5 3 2 2 3 2 9 11 8 10 3 4 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Depression[t] = + 7.11427357027146 + 0.0468181164894483CriticParents[t] -0.0610717012753496ExpecParents[t] + 0.586101505807562FutureWorrying[t] + 0.214964224328964SleepDepri[t] + 0.335215733141913ChangesLastYear[t] -0.0863956836856015FreqSmoking[t] + 0.284326292090269FreqHighAlc[t] + 0.192259706857739FreqBeerOrWine[t] + 0.00201094154728408Month[t] + 0.00643775319164656t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.114273570271467.4830870.95070.3434610.171731
CriticParents0.04681811648944830.1166140.40150.6887070.344353
ExpecParents-0.06107170127534960.087154-0.70070.4846850.242343
FutureWorrying0.5861015058075620.1689143.46980.0007010.000351
SleepDepri0.2149642243289640.1422531.51110.1331070.066553
ChangesLastYear0.3352157331419130.1369642.44750.0156810.00784
FreqSmoking-0.08639568368560150.276683-0.31230.7553320.377666
FreqHighAlc0.2843262920902690.3163070.89890.3703220.185161
FreqBeerOrWine0.1922597068577390.2970690.64720.5186170.259309
Month0.002010941547284080.8302470.00240.9980710.499036
t0.006437753191646560.0099360.6480.5181250.259062


Multiple Linear Regression - Regression Statistics
Multiple R0.460266102707896
R-squared0.211844885301915
Adjusted R-squared0.153027339428924
F-TEST (value)3.60172941862223
F-TEST (DF numerator)10
F-TEST (DF denominator)134
p-value0.000291280874432198
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.90976371595358
Sum Squared Residuals1134.54113427912


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11211.80361066753670.196389332463273
21111.5508456162323-0.550845616232324
31414.9635192005732-0.96351920057319
41211.38983138702920.610168612970842
52115.72380492733345.27619507266658
61213.0242257831403-1.02422578314027
72214.73914103423927.26085896576085
81112.7631853318159-1.7631853318159
91011.9412872340357-1.94128723403571
101312.53951407943350.460485920566535
111013.3444378414633-3.34443784146334
12812.0451921235579-4.04519212355785
131514.21933830941780.780661690582233
141011.8890449362461-1.8890449362461
151412.4423213044331.55767869556696
161410.12070637774743.87929362225262
171112.7552121739999-1.75521217399988
181012.9422437533277-2.94224375332767
191314.1009755624887-1.10097556248867
20710.471036383413-3.47103638341297
211213.6636587629925-1.66365876299254
221412.72589433787471.27410566212531
231112.3013828475795-1.3013828475795
24911.1070961196034-2.10709611960338
251111.9385348373061-0.938534837306142
261513.12818394094821.87181605905182
271312.95274474232180.0472552576781619
2899.5097567821449-0.50975678214491
291510.09321150949584.90678849050425
301012.4134271117406-2.41342711174058
311110.54748686788320.452513132116783
321311.34001532746311.65998467253691
33810.4169465784909-2.41694657849088
342013.63998297709066.36001702290945
351212.8818562563983-0.881856256398277
361010.1687193089356-0.168719308935558
371012.2595270712165-2.25952707121649
38912.4573737266206-3.45737372662062
391414.5751431802521-0.575143180252132
40810.9595694415788-2.9595694415788
411411.84116717967242.15883282032757
421112.3649781224478-1.36497812244781
431311.18847797566361.81152202433642
441112.1093159022772-1.10931590227716
451111.817854051164-0.81785405116399
461012.1460502681753-2.14605026817532
471410.60981200053293.39018799946709
481813.72193366418054.27806633581946
491412.48572985545861.51427014454136
501112.9662549813077-1.96625498130772
511211.42413983700630.575860162993728
521313.0811240404095-0.0811240404094553
53913.6873941433871-4.68739414338714
541012.2383282348886-2.23832823488863
551513.48315265996151.51684734003852
562014.1089270547575.89107294524297
571211.67167283671250.328327163287499
581211.98363419765230.0163658023476846
591411.33602903638182.66397096361824
601314.9334498006976-1.93344980069765
611114.3350803358606-3.33508033586061
621713.1778507561683.82214924383195
631212.2093348402978-0.209334840297785
641312.82777848878140.172221511218607
651413.79625447825710.203745521742893
661310.72937200424012.27062799575992
671513.79630612930531.20369387069474
681311.91193669574311.0880633042569
691013.5687290267362-3.56872902673615
701111.2740290370396-0.274029037039564
711312.73222784545520.267772154544794
721714.14058750783382.85941249216623
731312.86792113370160.13207886629842
74912.0559796182532-3.05597961825323
751112.3405120902909-1.34051209029094
761010.2977621453233-0.297762145323322
77910.3067320766891-1.30673207668907
781211.28478180282690.71521819717314
791212.4356251708188-0.435625170818834
801312.36445710385320.63554289614679
811312.42421902165870.575780978341261
822214.51274216260987.48725783739022
831311.9212419896221.07875801037795
841513.73975538893241.26024461106757
851314.1020870449101-1.10208704491012
861511.59525835910293.40474164089706
871011.6879387993883-1.68793879938832
881110.87554908208340.124450917916564
891614.18422351800531.81577648199473
901112.0431181019344-1.04311810193439
911112.4260672197303-1.42606721973026
921012.7077254873256-2.70772548732559
931014.5624853048147-4.56248530481474
941614.22601277902611.77398722097385
951213.3895944532429-1.3895944532429
961113.9190171801555-2.91901718015545
971614.42147511611141.57852488388861
981914.99079640381884.00920359618118
991114.8962880701177-3.89628807011766
1001512.76763183145412.2323681685459
1012416.57203845287527.4279615471248
1021411.69559049867552.30440950132447
1031513.65290418128791.34709581871206
1041114.9181760885708-3.91817608857076
1051513.56221754565711.43778245434289
1061212.9353799338188-0.935379933818797
1071010.847922758518-0.847922758518026
1081413.99734670099230.00265329900766953
109912.9090591348176-3.90905913481764
1101510.7203847872914.27961521270903
111159.79885264963985.20114735036021
1121413.16702254667340.832977453326589
1131114.2205581250718-3.22055812507182
114814.4199190525284-6.41991905252838
1151114.3118270389759-3.31182703897588
116811.8963767425822-3.8963767425822
1171011.3258760802794-1.32587608027941
1181113.7111430389992-2.71114303899924
1191314.1597103656976-1.1597103656976
1201113.8536302177452-2.85363021774524
1212012.7744754538947.22552454610595
1221012.2969266458795-2.29692664587946
1231211.0700909239550.929909076044998
1241412.67605735733231.3239426426677
1252314.12493888596868.8750611140314
1261413.1384993054520.861500694547955
1271615.34574187906710.65425812093294
1281113.5615720081091-2.56157200810915
1291214.3746587974792-2.37465879747916
1301013.7928820084057-3.79288200840569
1311413.91632931947920.083670680520829
132129.99534468174042.00465531825959
1331213.8348264611174-1.83482646111738
1341110.36706850475420.632931495245838
1351212.5528936335421-0.552893633542136
1361315.9196808217229-2.91968082172285
1371716.46245082604380.537549173956198
1381112.6660009479622-1.6660009479622
1391213.8578614879676-1.85786148796757
1401915.28458745390233.71541254609766
1411514.10670732085630.893292679143717
1421413.64649362828310.353506371716863
1431113.8720868687904-2.8720868687904
144910.7770318219383-1.77703182193828
1451812.0129598160055.98704018399503


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
140.683117279334090.633765441331820.31688272066591
150.6476863787357820.7046272425284350.352313621264218
160.74095533278760.5180893344248010.2590446672124
170.6347967133573250.730406573285350.365203286642675
180.5402738700190960.9194522599618080.459726129980904
190.6650294733738910.6699410532522180.334970526626109
200.5878832909087740.8242334181824530.412116709091226
210.5072316577017360.9855366845965280.492768342298264
220.5310751057268380.9378497885463240.468924894273162
230.5805271921548620.8389456156902750.419472807845138
240.5000708274001180.9998583451997650.499929172599882
250.4264338284777590.8528676569555180.573566171522241
260.3867649646160730.7735299292321450.613235035383927
270.3252034678546370.6504069357092750.674796532145363
280.2771548748169060.5543097496338130.722845125183094
290.3311692491839270.6623384983678550.668830750816073
300.2841781284578940.5683562569157870.715821871542106
310.2326170760622440.4652341521244870.767382923937756
320.1894508450077830.3789016900155670.810549154992217
330.1849229017621410.3698458035242810.81507709823786
340.200715394485220.401430788970440.79928460551478
350.2074487609921780.4148975219843570.792551239007822
360.2037880393611560.4075760787223120.796211960638844
370.2555800223492180.5111600446984360.744419977650782
380.3016454712338170.6032909424676330.698354528766183
390.3055733611384010.6111467222768020.694426638861599
400.2774416148186070.5548832296372140.722558385181393
410.3198372116446280.6396744232892550.680162788355372
420.2815353747042890.5630707494085770.718464625295711
430.2902179775797030.5804359551594060.709782022420297
440.2458497944372360.4916995888744710.754150205562764
450.2085256451884160.4170512903768320.791474354811584
460.1837369050395680.3674738100791360.816263094960432
470.1919793902945110.3839587805890220.808020609705489
480.2947524912717660.5895049825435320.705247508728234
490.2677011444364930.5354022888729850.732298855563507
500.2427304247892980.4854608495785960.757269575210702
510.2046051265690840.4092102531381690.795394873430916
520.1683677703668360.3367355407336720.831632229633164
530.2562329663661310.5124659327322630.743767033633869
540.2544463034109190.5088926068218380.745553696589081
550.2344647725406830.4689295450813670.765535227459317
560.3085708196578550.617141639315710.691429180342145
570.2675861778855040.5351723557710090.732413822114496
580.2381431572137320.4762863144274630.761856842786268
590.2084848844346690.4169697688693380.791515115565331
600.2356325605561640.4712651211123280.764367439443836
610.2003609087548960.4007218175097910.799639091245104
620.3213403788717030.6426807577434070.678659621128297
630.2760600013435780.5521200026871570.723939998656422
640.2363456203734940.4726912407469870.763654379626507
650.2000808523129320.4001617046258630.799919147687068
660.1841871406019810.3683742812039620.815812859398019
670.1553548267231280.3107096534462560.844645173276872
680.1297679470840910.2595358941681820.870232052915909
690.1430522263863430.2861044527726860.856947773613657
700.1163024788189320.2326049576378630.883697521181068
710.09319603820139290.1863920764027860.906803961798607
720.09499809708310940.1899961941662190.90500190291689
730.07546007023846550.1509201404769310.924539929761535
740.07648788594883040.1529757718976610.92351211405117
750.06321419092689030.1264283818537810.93678580907311
760.05051232213308460.1010246442661690.949487677866915
770.0445239986615220.0890479973230440.955476001338478
780.0340489520458690.0680979040917380.965951047954131
790.02599383099011710.05198766198023410.974006169009883
800.01963392485934740.03926784971869480.980366075140653
810.0148348959306070.0296697918612140.985165104069393
820.06788011290766020.135760225815320.93211988709234
830.0530635193937850.106127038787570.946936480606215
840.04127527335419870.08255054670839750.9587247266458
850.03357542382960650.06715084765921290.966424576170394
860.03360834538758390.06721669077516770.966391654612416
870.02879964066574520.05759928133149050.971200359334255
880.02127360094837440.04254720189674870.978726399051626
890.0184597707246480.03691954144929590.981540229275352
900.01439520610869490.02879041221738980.985604793891305
910.01164000341427360.02328000682854720.988359996585726
920.01152213048545550.02304426097091090.988477869514545
930.01782286292378790.03564572584757580.982177137076212
940.01375589237036840.02751178474073680.986244107629632
950.01086319397037250.02172638794074490.989136806029628
960.01169790415312370.02339580830624750.988302095846876
970.009813099413022630.01962619882604530.990186900586977
980.01466812493266340.02933624986532690.985331875067337
990.01748879267870570.03497758535741130.982511207321294
1000.01387276480626230.02774552961252470.986127235193738
1010.06661062809741140.1332212561948230.933389371902589
1020.05921331164745920.1184266232949180.94078668835254
1030.04895446013224280.09790892026448550.951045539867757
1040.05053497907492980.101069958149860.94946502092507
1050.04182678130819270.08365356261638550.958173218691807
1060.03118546097318460.06237092194636930.968814539026815
1070.02494519038226150.0498903807645230.975054809617738
1080.01807415594932180.03614831189864360.981925844050678
1090.01658436311658860.03316872623317720.983415636883411
1100.02494334658637730.04988669317275460.975056653413623
1110.03635725633116820.07271451266233630.963642743668832
1120.02927812236736070.05855624473472140.97072187763264
1130.0256292190267610.0512584380535220.97437078097324
1140.04498449143448460.08996898286896930.955015508565515
1150.04141444888053890.08282889776107780.95858555111946
1160.0619724177754280.1239448355508560.938027582224572
1170.04687731787431930.09375463574863850.95312268212568
1180.04060987572036310.08121975144072620.959390124279637
1190.03061688028893390.06123376057786780.969383119711066
1200.06779286143999730.1355857228799950.932207138560003
1210.1451098782449060.2902197564898130.854890121755094
1220.36688392232590.73376784465180.6331160776741
1230.3103871920393480.6207743840786960.689612807960652
1240.2382162745382410.4764325490764830.761783725461759
1250.4882513999026440.9765027998052880.511748600097356
1260.9140162589931310.1719674820137370.0859837410068685
1270.8661778640392850.2676442719214310.133822135960715
1280.7973569132131750.4052861735736490.202643086786825
1290.745745450130310.5085090997393790.25425454986969
1300.6798431248911310.6403137502177380.320156875108869
1310.6104456718132460.7791086563735080.389554328186754


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level190.161016949152542NOK
10% type I error level370.313559322033898NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/10qvc51290542328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/10qvc51290542328.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/4u3ww1290542328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/4u3ww1290542328.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/54ceh1290542328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/54ceh1290542328.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/64ceh1290542328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290542271rpzxw5y8cg9uhlf/64ceh1290542328.ps (open in new window)


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


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


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