Home » date » 2010 » Nov » 23 »

Mini-Tutorial Multiple Regression Interaction Effects

*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 02:24:42 +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/t1290479371ui8ntsxpg4t8ibw.htm/, Retrieved Tue, 23 Nov 2010 03:29:34 +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/t1290479371ui8ntsxpg4t8ibw.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 «
0 13 26 0 9 0 6 0 25 0 25 0 0 16 20 0 9 0 6 0 25 0 24 0 0 19 21 0 9 0 13 0 19 0 21 0 1 15 31 31 14 14 8 8 18 18 23 23 0 14 21 0 8 0 7 0 18 0 17 0 0 13 18 0 8 0 9 0 22 0 19 0 0 19 26 0 11 0 5 0 29 0 18 0 0 15 22 0 10 0 8 0 26 0 27 0 0 14 22 0 9 0 9 0 25 0 23 0 0 15 29 0 15 0 11 0 23 0 23 0 1 16 15 15 14 14 8 8 23 23 29 29 0 16 16 0 11 0 11 0 23 0 21 0 1 16 24 24 14 14 12 12 24 24 26 26 0 17 17 0 6 0 8 0 30 0 25 0 1 15 19 19 20 20 7 7 19 19 25 25 1 15 22 22 9 9 9 9 24 24 23 23 0 20 31 0 10 0 12 0 32 0 26 0 1 18 28 28 8 8 20 20 30 30 20 20 0 16 38 0 11 0 7 0 29 0 29 0 1 16 26 26 14 14 8 8 17 17 24 24 0 19 25 0 11 0 8 0 25 0 23 0 0 16 25 0 16 0 16 0 26 0 24 0 1 17 29 29 14 14 10 10 26 26 30 30 0 17 28 0 11 0 6 0 25 0 22 0 1 16 15 15 11 11 8 8 23 23 22 22 0 15 18 0 12 0 9 0 21 0 13 0 1 14 21 21 9 9 9 9 19 19 24 24 0 15 25 0 7 0 11 0 35 0 17 0 1 12 23 23 13 13 12 12 19 19 24 24 0 14 23 0 10 0 8 0 20 0 21 0 0 16 19 0 9 0 7 0 21 0 23 0 1 14 18 18 9 9 8 8 21 21 24 24 1 7 18 18 13 13 9 9 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
Selfconfidence[t] = + 13.6904599062833 -3.23857734904733Gender[t] + 0.00877329489010884ConcernMistakes[t] + 0.0239140039291088ConcernMistakes_G[t] -0.212820358169707DoubtsActions[t] -0.186727182614101DoubtsActions_G[t] + 0.0272883965522743ParentalCriticism[t] + 0.0569766005229586ParentalCriticism_G[t] + 0.0323243960587162PersonalStandards[t] -0.038112033503889PersonalStandards_G[t] + 0.117975229950911Organization[t] + 0.20126225687406Organization_G[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)13.69045990628331.8180717.530200
Gender-3.238577349047332.978129-1.08750.2787320.139366
ConcernMistakes0.008773294890108840.0478080.18350.8546660.427333
ConcernMistakes_G0.02391400392910880.0775340.30840.7582180.379109
DoubtsActions-0.2128203581697070.09557-2.22690.0275780.013789
DoubtsActions_G-0.1867271826141010.146837-1.27170.2056310.102815
ParentalCriticism0.02728839655227430.0873950.31220.7553290.377665
ParentalCriticism_G0.05697660052295860.1448950.39320.6947590.34738
PersonalStandards0.03232439605871620.0612680.52760.5986310.299316
PersonalStandards_G-0.0381120335038890.104694-0.3640.7163910.358195
Organization0.1179752299509110.0630281.87180.0633540.031677
Organization_G0.201262256874060.1142741.76120.0804160.040208


Multiple Linear Regression - Regression Statistics
Multiple R0.478100989985447
R-squared0.228580556625065
Adjusted R-squared0.16709060099373
F-TEST (value)3.71736414961047
F-TEST (DF numerator)11
F-TEST (DF denominator)138
p-value0.000117570465484218
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.07435659787837
Sum Squared Residuals593.80783073229


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11315.9244033794531-2.92440337945306
21615.75378838016150.246211619838472
31915.40570838471253.59429161528748
41513.78392794922151.21607205077851
51414.9505730477062-0.950573047706224
61315.3440780002771-2.34407800027713
71914.77494524113994.22505475886011
81515.999341490788-0.99934149078803
91415.7352249296477-1.73522492964765
101514.50964384584730.490356154152711
111615.1474179018380.852582098162033
121615.01092198505290.98907801494712
131614.81516348159181.18483651840823
141716.70010357334940.299896426650644
151511.54281745781763.45718254218244
161515.5370191361718-0.537019136171766
172016.26342587740953.7365741225905
181816.06716715255251.93283284744751
191616.2325291023858-0.232529102385761
201613.94551657939552.05448342060446
211915.30861570142633.69138429857371
221614.61312070900561.38687929099442
231716.07544465394690.924555346053067
241715.16238356304121.83761643695884
251614.11139811641461.88860188358541
261513.75262079183411.24737920816588
271415.8525075114034-1.85250751140338
281515.8571549046436-0.857154904643638
291214.5724869371323-2.57248693713228
301415.1063170296204-1.10631702962038
311615.52503066763790.474969332362088
321415.6586053429802-1.65860534298015
33714.1273172645846-7.12731726458463
341012.774635684856-2.77463568485596
351414.1523005086941-0.152300508694102
361616.4066349494271-0.406634949427065
371613.97037771491782.02962228508223
381612.53666371028763.46333628971245
391415.5565292391564-1.55652923915643
402018.36538338831181.6346166116882
411414.2389702289017-0.238970228901665
421415.2325191694071-1.23251916940708
431114.5725694031111-3.57256940311107
441515.4554079952953-0.455407995295286
451615.51252007736410.487479922635864
461414.9762567257839-0.976256725783944
471614.38608510394451.61391489605552
481415.0668203990549-1.06682039905489
491214.6988543566534-2.69885435665342
501615.17908575004510.820914249954856
51912.1697546075229-3.16975460752286
521414.6423117000206-0.64231170002056
531615.6665110538090.333488946191029
541615.12842673932450.871573260675543
551514.66667809658470.333321903415258
561615.27555275672870.724447243271338
571213.1065870035093-1.10658700350926
581616.033474846882-0.0334748468819896
591616.0260662005621-0.0260662005620591
601416.382009611696-2.38200961169597
611613.61488363624442.38511636375564
621716.82382410369630.176175896303671
631814.7969444827113.20305551728899
641816.07726217868251.92273782131755
651215.0086158419986-3.00861584199858
661616.0120576157256-0.0120576157256189
671013.9285122580368-3.92851225803681
681413.1794330586540.820566941345987
691815.8790955135382.12090448646198
701817.19567895318620.80432104681376
711615.1712267921680.828773207831987
721615.60436645883820.395633541161823
731614.66197370671971.33802629328028
741314.5023013137842-1.50230131378418
751615.11469691181190.885303088188091
761614.68692594844121.31307405155878
772016.81753509642473.18246490357525
781615.25786701090110.742132989098926
791511.12251361523673.87748638476326
801515.5863505207698-0.586350520769762
811615.71193949753540.288060502464623
821413.69020992604350.309790073956472
831513.77924205137411.22075794862592
841214.9870395642523-2.98703956425231
851716.44350754792480.556492452075229
861615.50069968687760.499300313122432
871513.79966087489011.20033912510991
881314.3893691806829-1.38936918068286
891615.5822048689880.41779513101199
901615.31779382142010.682206178579898
911615.94873195631020.0512680436898163
921616.4773001309686-0.477300130968617
931415.2449713483551-1.24497134835508
941614.35648462914031.64351537085972
951613.82303040367332.17696959632668
962016.07576232454033.92423767545967
971516.1749351449768-1.17493514497681
981614.4190961684961.58090383150398
991313.0649088565378-0.0649088565377565
1001715.90582375460641.09417624539357
1011613.9189831153022.08101688469799
1021213.3258665170576-1.32586651705765
1031614.98964050379221.01035949620776
1041615.24535995192170.75464004807832
1051715.3422836638551.65771633614501
1061311.83021664830251.16978335169754
1071215.6929676906234-3.69296769062342
1081816.00002275169481.99997724830517
1091414.407654319102-0.407654319101987
1101414.696283475394-0.696283475394039
1111314.2191130615465-1.21911306154654
1121615.45978601422330.540213985776681
1131313.3858924291833-0.385892429183331
1141615.01494112382570.98505887617433
1151315.1798782726753-2.17987827267529
1161615.89285645908290.10714354091714
1171514.74712297311490.252877026885079
1181615.56727526362370.432724736376266
1191514.43710220848230.562897791517722
1201715.77119228261.22880771740001
1211516.0576682223147-1.05766822231465
1221214.1003992829567-2.10039928295671
1231614.24525373550411.75474626449588
1241014.5407968772968-4.54079687729676
1251614.99166720736071.00833279263933
1261414.2729181932461-0.272918193246106
1271516.2239857707387-1.22398577073869
1281313.9311249183268-0.931124918326784
1291514.6056473722260.394352627774
1301114.2537990121-3.25379901210002
1311214.4104160847048-2.41041608470483
132813.9681560904257-5.96815609042569
1331615.97425470435470.025745295645268
1341515.5948091988777-0.594809198877692
1351715.54288778872171.45711221127833
1361614.87909479824011.12090520175987
1371015.2055609650956-5.20556096509563
1381814.16168583417853.83831416582149
1391313.7430386209006-0.743038620900636
1401514.74196046059950.258039539400483
1411614.11139811641461.88860188358541
1421615.10899260202320.891007397976815
1431414.2015700030607-0.201570003060701
1441013.9523220553945-3.95232205539449
1451716.44350754792480.556492452075229
1461315.1489044608854-2.14890446088543
1471516.0576682223147-1.05766822231465
1481615.77492957798370.225070422016346
1491215.5326927633043-3.53269276330432
1501314.0179669199171-1.01796691991715


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9252540898488040.1494918203023910.0747459101511956
160.858189477374650.2836210452506990.14181052262535
170.7843451536995940.4313096926008130.215654846300406
180.692137037253870.6157259254922610.307862962746131
190.5842199484757810.8315601030484370.415780051524219
200.4846348826363140.9692697652726290.515365117363686
210.6424200809153220.7151598381693560.357579919084678
220.6513534130455790.6972931739088420.348646586954421
230.5844319474111970.8311361051776050.415568052588803
240.5306806361614210.9386387276771580.469319363838579
250.475954927998610.951909855997220.52404507200139
260.4344944510614210.8689889021228410.56550554893858
270.3862629215546370.7725258431092750.613737078445363
280.5798258912323210.8403482175353590.420174108767679
290.6005436438770450.798912712245910.399456356122955
300.5508943156949960.8982113686100090.449105684305004
310.4932815943794010.9865631887588020.506718405620599
320.4331796289109590.8663592578219190.56682037108904
330.9675135736943580.06497285261128410.0324864263056421
340.9737402995410290.05251940091794270.0262597004589713
350.9630327360425120.07393452791497650.0369672639574882
360.9523227727542450.09535445449150920.0476772272457546
370.9513177261880060.09736454762398890.0486822738119944
380.9669707875586770.0660584248826460.033029212441323
390.9632267050996360.07354658980072760.0367732949003638
400.977288405857240.04542318828551850.0227115941427592
410.9682987219825850.06340255603482930.0317012780174147
420.9660046011118640.06799079777627150.0339953988881357
430.981518486049720.03696302790055960.0184815139502798
440.9744908202570120.05101835948597590.025509179742988
450.9662603585080430.06747928298391350.0337396414919567
460.9566165133128280.08676697337434360.0433834866871718
470.9476586333175030.1046827333649940.052341366682497
480.9356501014153850.1286997971692290.0643498985846147
490.9431536750398840.1136926499202330.0568463249601164
500.9279942902526750.1440114194946510.0720057097473255
510.9416906607719550.116618678456090.0583093392280449
520.926063447443730.1478731051125410.0739365525562703
530.9076434874818960.1847130250362080.0923565125181039
540.8925637841264740.2148724317470520.107436215873526
550.8707554193313860.2584891613372280.129244580668614
560.844736885690580.3105262286188410.155263114309421
570.817656868278910.3646862634421820.182343131721091
580.7837893885688910.4324212228622180.216210611431109
590.7449977317934080.5100045364131840.255002268206592
600.7552172653794250.489565469241150.244782734620575
610.7578651441201090.4842697117597820.242134855879891
620.7161777019927420.5676445960145160.283822298007258
630.764909132590240.4701817348195190.23509086740976
640.7607634459269610.4784731081460780.239236554073039
650.8101385429985310.3797229140029370.189861457001469
660.775950610782630.4480987784347410.224049389217371
670.8609571747742460.2780856504515080.139042825225754
680.8363407351803440.3273185296393110.163659264819656
690.840216976686320.3195660466273610.15978302331368
700.8131995475942630.3736009048114750.186800452405737
710.7838900916770190.4322198166459620.216109908322981
720.7466107474601510.5067785050796980.253389252539849
730.7215568101169080.5568863797661850.278443189883092
740.7059966949705940.5880066100588130.294003305029406
750.6862681601305710.6274636797388570.313731839869429
760.6558022452548930.6883955094902140.344197754745107
770.7207792049237390.5584415901525230.279220795076261
780.683709962268520.632580075462960.31629003773148
790.784504448469260.430991103061480.21549555153074
800.7487720519062740.5024558961874530.251227948093726
810.7071985673735380.5856028652529240.292801432626462
820.708155357168050.5836892856638990.29184464283195
830.6802954053479570.6394091893040860.319704594652043
840.7353281211845290.5293437576309420.264671878815471
850.6956199063443790.6087601873112420.304380093655621
860.6528734897835730.6942530204328540.347126510216427
870.626429806222220.747140387555560.37357019377778
880.6006769636214780.7986460727570440.399323036378522
890.5533318223396620.8933363553206760.446668177660338
900.5080263859283060.9839472281433880.491973614071694
910.4559820189620080.9119640379240160.544017981037992
920.4250340651914440.8500681303828870.574965934808556
930.4401375233585350.8802750467170690.559862476641465
940.4411058003969440.8822116007938880.558894199603056
950.4374157166474150.874831433294830.562584283352585
960.5907513660414950.818497267917010.409248633958505
970.5497690780591260.9004618438817480.450230921940874
980.5566153547609420.8867692904781160.443384645239058
990.5066399965993450.986720006801310.493360003400655
1000.4777576050296460.955515210059290.522242394970354
1010.4734849405900070.9469698811800140.526515059409993
1020.447597245682680.8951944913653610.55240275431732
1030.4136361801623160.8272723603246330.586363819837683
1040.3922962952702740.7845925905405490.607703704729726
1050.4066805079447090.8133610158894170.593319492055291
1060.4308567632743460.8617135265486920.569143236725654
1070.547581681343850.90483663731230.45241831865615
1080.5981874196438460.8036251607123080.401812580356154
1090.5754793752850980.8490412494298050.424520624714902
1100.5206273267819220.9587453464361560.479372673218078
1110.469863875666690.939727751333380.53013612433331
1120.4167620118793550.833524023758710.583237988120645
1130.3719357139185180.7438714278370360.628064286081482
1140.361924754328270.7238495086565390.63807524567173
1150.3494050622105590.6988101244211170.650594937789441
1160.2908370498446120.5816740996892240.709162950155388
1170.2678673266195250.535734653239050.732132673380475
1180.2635285689087910.5270571378175810.73647143109121
1190.2549358840650910.5098717681301820.745064115934909
1200.2312800604364790.4625601208729590.76871993956352
1210.1875062337622980.3750124675245950.812493766237703
1220.1647702653084060.3295405306168110.835229734691594
1230.1739643371093540.3479286742187080.826035662890646
1240.2520150730300270.5040301460600540.747984926969973
1250.1962594283955440.3925188567910890.803740571604456
1260.1484159863408890.2968319726817780.851584013659111
1270.1074862372234070.2149724744468140.892513762776593
1280.0961715354672520.1923430709345040.903828464532748
1290.06306165512634850.1261233102526970.936938344873651
1300.04901950714512780.09803901429025560.950980492854872
1310.03517916732024440.07035833464048880.964820832679756
1320.02891853569434670.05783707138869340.971081464305653
1330.0153597818539130.0307195637078260.984640218146087
1340.007022379659338090.01404475931867620.992977620340662
1350.01248050118681110.02496100237362210.987519498813189


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/5ezn11290479068.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/5ezn11290479068.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/6785m1290479068.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/6785m1290479068.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/70hmp1290479068.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/70hmp1290479068.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/80hmp1290479068.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/80hmp1290479068.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/90hmp1290479068.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290479371ui8ntsxpg4t8ibw/90hmp1290479068.ps (open in new window)


 
Parameters (Session):
par1 = 0 ; par2 = 36 ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No 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