Home » date » 2010 » Dec » 15 »

Multiple Regression Analysis

*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: Wed, 15 Dec 2010 00:08:12 +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/Dec/15/t1292372740wtnetgr7szn910g.htm/, Retrieved Wed, 15 Dec 2010 01:25:43 +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/Dec/15/t1292372740wtnetgr7szn910g.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 25 25 16 20 9 15 25 24 19 21 9 14 19 21 15 31 14 10 18 23 14 21 8 10 18 17 13 18 8 12 22 19 19 26 11 18 29 18 15 22 10 12 26 27 14 22 9 14 25 23 15 29 15 18 23 23 16 15 14 9 23 29 16 16 11 11 23 21 16 24 14 11 24 26 17 17 6 17 30 25 15 19 20 8 19 25 15 22 9 16 24 23 20 31 10 21 32 26 18 28 8 24 30 20 16 38 11 21 29 29 16 26 14 14 17 24 19 25 11 7 25 23 16 25 16 18 26 24 17 29 14 18 26 30 17 28 11 13 25 22 16 15 11 11 23 22 15 18 12 13 21 13 14 21 9 13 19 24 15 25 7 18 35 17 12 23 13 14 19 24 14 23 10 12 20 21 16 19 9 9 21 23 14 18 9 12 21 24 7 18 13 8 24 24 10 26 16 5 23 24 14 18 12 10 19 23 16 18 6 11 17 26 16 28 14 11 24 24 16 17 14 12 15 21 14 29 10 12 25 23 20 12 4 15 27 28 14 25 12 12 29 23 14 28 12 16 27 22 11 20 14 14 18 24 15 17 9 17 25 21 16 17 9 13 22 23 14 20 10 10 26 23 16 31 14 17 23 20 14 21 10 12 16 23 12 19 9 13 27 21 16 23 14 13 25 27 9 15 8 11 14 12 14 24 9 13 19 15 16 28 8 12 20 22 16 16 9 12 16 21 15 19 9 12 18 21 16 21 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Learning[t] = + 12.3537171110201 + 0.0061848539683367Concern[t] -0.277968257641376Doubts[t] + 0.107111545991711Expectations[t] + 0.0278119768219914Standards[t] + 0.156915805748762Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.35371711102011.4349088.609400
Concern0.00618485396833670.0376420.16430.869720.43486
Doubts-0.2779682576413760.06854-4.05568.2e-054.1e-05
Expectations0.1071115459917110.0541971.97640.0500260.025013
Standards0.02781197682199140.0485860.57240.5679290.283964
Organization0.1569158057487620.0486363.22630.0015520.000776


Multiple Linear Regression - Regression Statistics
Multiple R0.455153141765681
R-squared0.20716438245917
Adjusted R-squared0.179635367961225
F-TEST (value)7.52531052190885
F-TEST (DF numerator)5
F-TEST (DF denominator)144
p-value2.64790903370393e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.05867599198798
Sum Squared Residuals610.293144958229


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.237676749569-3.23767674956899
21616.0436518200102-0.0436518200102288
31915.30510584980863.69489415019138
41513.83468655199381.1653134480062
51414.4991527236661-0.499152723666114
61315.11990077253-2.11990077253001
71915.0159121393083.98408786069198
81515.9552780263987-0.955278026398673
91415.7919941762064-1.79199417620643
101514.54030083845940.459699161540607
111614.70917206111121.29082793888877
121614.5081583339971.49184166600298
131614.53612339838541.46387660161461
141717.3692008128715-0.369200812871485
151512.22007925486162.7799207451384
161515.9784052913679-0.97840529136786
172016.98490168122233.01509831877772
181816.84649948443861.1535005155614
191617.1375388881396-1.13753888813958
201614.36131229504571.63868770495427
211914.50483140088674.49516859911328
221614.47794490115941.52205509884059
231716.00011566680810.999884333191923
241715.00913943299321.99086056700677
251614.65888928577741.34111071422255
261513.14583247664171.85416752335834
271415.6687417210632-1.6687417210632
281516.1315563710884-1.13155637108838
291214.6763499444261-2.67634994442608
301414.8530961849425-0.85309618494249
311615.12663397705490.873366022945099
321415.5986995668105-1.59869956681046
33714.1418162827441-7.14181628274409
341013.0082437267695-3.00824372676953
351414.3380319425102-0.338031942510166
361616.5280764979524-0.528076497952433
371614.24703120276121.75296879723879
381613.5650541464572.43494585354299
391415.34309680436-1.34309680435999
402018.06730145310941.93269854689056
411414.8736687804919-0.873668780491858
421415.108129766971-1.10812976697097
431114.3520151480577-3.3520151480577
441515.7685729328424-0.768572932842354
451615.57052242990710.429477570092938
461415.1010220034835-1.10102200348353
471614.25277984079941.74722015920055
481415.0433101812154-1.04331018121537
491215.4081204104562-3.40812041045617
501614.92888941897121.07111058102877
51913.673328209816-4.67332820981603
521414.2750540312293-0.275054031229348
531615.59687277581570.403127224184315
541614.97652255751751.02347744248246
551515.0507010730665-0.0507010730665349
561614.69606824456731.30393175543272
571213.4138868529087-1.41388685290866
581616.4524072391691-0.452407239169051
591616.1207526067982-0.12075260679821
601416.3828093530209-2.38280935302086
611612.44820778440493.55179221559515
621716.00907640991680.990923590083235
631814.58456731182443.41543268817564
641815.3969595382592.60304046174096
651214.4904952319956-2.49049523199564
661615.83286644905690.167133550943142
671014.3182316106513-4.31823161065129
681412.56325186733651.43674813266347
691815.34454781552332.65545218447667
701816.23744442814171.76255557185832
711615.52983334753180.470166652468223
721615.49415318415080.505846815849227
731614.72678178860061.27321821139936
741314.695053449334-1.69505344933404
751615.02966045585260.970339544147362
761614.76823251491641.23176748508362
772015.96852029203344.03147970796663
781615.25786675338360.742133246616405
791512.67811689768522.32188310231477
801515.3452887554362-0.345288755436168
811615.848786012650.151213987349972
821414.1044637626414-0.10446376264139
831513.22784224453531.77215775546466
841214.8664806881124-2.8664806881124
851716.01407447887990.985925521120118
861615.21618492650940.783815073490602
871512.99926956605412.0007304339459
881314.4158407684455-1.4158407684455
891615.97529299834820.0247070016518326
901615.30060554929980.699394450700157
911616.2412567081343-0.241256708134275
921615.87777135687050.122228643129508
931415.6097101492979-1.60971014929793
941614.2266524174371.77334758256299
951615.21842600853780.781573991462233
962016.42873162364333.57126837635668
971515.5416876056774-0.54168760567739
981614.13055145393281.86944854606722
991314.3489714691489-1.34897146914894
1001715.93295226327881.06704773672119
1011614.28622819519541.7137718048046
1021213.3344846738315-1.33448467383146
1031615.06695411684450.933045883155495
1041615.37490425164970.625095748350275
1051715.54132927690151.45867072309846
1061313.1969179746937-0.196917974693656
1071215.8841708509294-3.88417085092944
1081815.85485873199192.14514126800808
1091413.78071547191280.219284528087229
1101414.5468809554179-0.546880955417902
1111313.8035393596059-0.803539359605925
1121615.46015513249160.539844867508437
1131312.62155055136340.378449448636596
1141615.3677978348690.632202165131008
1151314.8762945057604-1.87629450576037
1161615.87048297048350.129517029516503
1171514.7827311702550.217268829745022
1181615.40432032720140.595679672798566
1191514.95160117203790.0483988279620662
1201715.67170214738541.32829785261461
1211515.8851225166506-0.885122516650605
1221213.6514492823763-1.6514492823763
1231614.44089499257921.55910500742083
1241014.2264598280807-4.22645982808073
1251614.32444277908391.67555722091608
1261414.7449208386032-0.744920838603168
1271516.4749559248351-1.4749559248351
1281314.5210053366415-1.52100533664155
1291515.4337746836742-0.433774683674172
1301113.7744896650045-2.7744896650045
1311214.2703404373367-2.27034043733666
132814.6012988711791-6.60129887117906
1331616.2835266176361-0.283526617636069
1341514.88943805437540.110561945624628
1351715.31977707587231.68022292412767
1361615.46195182057760.538048179422432
1371015.0690118825599-5.06901188255991
1381813.89904845203814.1009515479619
1391313.9545025069759-0.954502506975867
1401514.31655510936620.683444890633833
1411614.65888928577741.34111071422255
1421615.02538442459680.974615575403246
1431413.46431869708320.535681302916778
1441013.1271356772014-3.12713567720144
1451716.01407447887990.985925521120118
1461314.4004669878333-1.40046698783329
1471515.8851225166506-0.885122516650605
1481615.97140966250690.0285903374931292
1491215.3026117423253-3.30261174232529
1501313.5543242505955-0.554324250595498


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.5429379238058890.9141241523882220.457062076194111
100.8782424840644570.2435150318710860.121757515935543
110.8054715773140120.3890568453719770.194528422685989
120.7136225982971310.5727548034057380.286377401702869
130.6233169183611440.7533661632777110.376683081638856
140.5527604883604240.8944790232791510.447239511639576
150.5049135992398750.990172801520250.495086400760125
160.4286710421826490.8573420843652980.571328957817351
170.5011234413487380.9977531173025230.498876558651262
180.4215716526882510.8431433053765030.578428347311749
190.3508044341952360.7016088683904720.649195565804764
200.2890814887590660.5781629775181330.710918511240934
210.4810597397834550.962119479566910.518940260216545
220.4321528946505880.8643057893011750.567847105349412
230.3752376605257490.7504753210514970.624762339474251
240.3170794702670440.6341589405340880.682920529732956
250.2601417470678390.5202834941356780.739858252932161
260.22985776075250.4597155215050010.7701422392475
270.1854669203420360.3709338406840720.814533079657964
280.2547917351493580.5095834702987160.745208264850642
290.3356021465636140.6712042931272280.664397853436386
300.2895028172549760.5790056345099520.710497182745024
310.2504853930384210.5009707860768410.74951460696158
320.2141098020209690.4282196040419380.78589019797903
330.9094261850183660.1811476299632690.0905738149816343
340.944197700252120.1116045994957610.0558022997478807
350.9262929240362930.1474141519274150.0737070759637074
360.9110644578259530.1778710843480940.0889355421740472
370.898840474585330.2023190508293390.10115952541467
380.8917690849731230.2164618300537540.108230915026877
390.8724042435772250.255191512845550.127595756422775
400.8951220208537260.2097559582925470.104877979146274
410.8723930886159570.2552138227680860.127606911384043
420.8566894380279990.2866211239440020.143310561972001
430.9150866122308650.169826775538270.0849133877691349
440.8988296872612740.2023406254774520.101170312738726
450.8748880809780870.2502238380438260.125111919021913
460.851054486076210.2978910278475780.148945513923789
470.832913776089190.3341724478216190.16708622391081
480.8059892769270030.3880214461459930.194010723072997
490.8536381961674880.2927236076650240.146361803832512
500.8304473208875730.3391053582248530.169552679112427
510.921722230486860.1565555390262820.0782777695131409
520.9026440305947620.1947119388104760.097355969405238
530.8840677663495610.2318644673008780.115932233650439
540.868652818923370.262694362153260.13134718107663
550.8411532124458020.3176935751083950.158846787554198
560.8300856366730440.3398287266539130.169914363326956
570.8114266934440930.3771466131118130.188573306555907
580.7773134792350430.4453730415299130.222686520764957
590.7388977205508120.5222045588983770.261102279449188
600.7408637060783960.5182725878432080.259136293921604
610.8027346037967810.3945307924064380.197265396203219
620.7800641237570390.4398717524859220.219935876242961
630.8353733647670570.3292532704658860.164626635232943
640.8582630781832530.2834738436334930.141736921816747
650.8720540312033440.2558919375933130.127945968796656
660.8459184053016850.3081631893966290.154081594698315
670.921102758989260.1577944820214810.0788972410107406
680.9097801325394470.1804397349211070.0902198674605535
690.9285371103387360.1429257793225270.0714628896612637
700.9273512898388990.1452974203222020.072648710161101
710.9100990569496530.1798018861006940.0899009430503471
720.8903145240222230.2193709519555550.109685475977777
730.8772879616804150.2454240766391690.122712038319585
740.8679803320250850.2640393359498290.132019667974915
750.8471094065074550.305781186985090.152890593492545
760.8276945494624570.3446109010750870.172305450537543
770.9016377545421740.1967244909156510.0983622454578256
780.8822732696747070.2354534606505860.117726730325293
790.8889703309695450.2220593380609110.111029669030455
800.8647416776462650.2705166447074710.135258322353735
810.8367517783047780.3264964433904430.163248221695222
820.8091335821404330.3817328357191340.190866417859567
830.8092904315258170.3814191369483660.190709568474183
840.8390151565934650.3219696868130710.160984843406535
850.8146821221239090.3706357557521830.185317877876091
860.7858794998325030.4282410003349940.214120500167497
870.7908468922071340.4183062155857330.209153107792866
880.7709983343771450.458003331245710.229001665622855
890.7319643661614710.5360712676770580.268035633838529
900.6958258017065550.6083483965868910.304174198293445
910.6527001459165090.6945997081669830.347299854083491
920.6063521139187350.787295772162530.393647886081265
930.5912668154503650.817466369099270.408733184549635
940.6035007717458190.7929984565083620.396499228254181
950.5673865177002870.8652269645994260.432613482299713
960.6597282194513590.6805435610972820.340271780548641
970.6132829434775550.7734341130448890.386717056522445
980.6333689253685960.7332621492628090.366631074631404
990.6017561034017590.7964877931964830.398243896598241
1000.5748884039008470.8502231921983060.425111596099153
1010.5952356961641640.8095286076716730.404764303835836
1020.5609277239802920.8781445520394160.439072276019708
1030.5244349017789490.9511301964421020.475565098221051
1040.5023676239422660.9952647521154680.497632376057734
1050.5099429026642230.9801141946715540.490057097335777
1060.4577596003550510.9155192007101010.542240399644949
1070.5981103778032150.803779244393570.401889622196785
1080.6099475821095850.780104835780830.390052417890415
1090.612739705342230.774520589315540.38726029465777
1100.5627456126065250.874508774786950.437254387393475
1110.5096866955879080.9806266088241850.490313304412092
1120.4575857951758830.9151715903517660.542414204824117
1130.4297214441993510.8594428883987010.570278555800649
1140.3916848395015550.783369679003110.608315160498445
1150.3751242023464050.750248404692810.624875797653595
1160.3203624982119810.6407249964239620.679637501788019
1170.293603634048720.5872072680974410.70639636595128
1180.2965914524796920.5931829049593840.703408547520308
1190.2457278909257420.4914557818514840.754272109074258
1200.215313423463890.430626846927780.78468657653611
1210.1795921841551140.3591843683102280.820407815844886
1220.1641290072267050.328258014453410.835870992773295
1230.1557556167965690.3115112335931380.844244383203431
1240.2077577791015910.4155155582031820.792242220898409
1250.169605633416940.339211266833880.83039436658306
1260.1332296888157610.2664593776315210.86677031118424
1270.102609410260880.2052188205217590.89739058973912
1280.07911264153698070.1582252830739610.920887358463019
1290.05783197458757050.1156639491751410.94216802541243
1300.04868126665054420.09736253330108850.951318733349456
1310.03719881140397270.07439762280794530.962801188596027
1320.2419942231267280.4839884462534550.758005776873272
1330.1805046963328920.3610093926657830.819495303667108
1340.1312225076734460.2624450153468920.868777492326554
1350.1370962132458770.2741924264917550.862903786754123
1360.1000140355178350.200028071035670.899985964482165
1370.4444857938002940.8889715876005890.555514206199705
1380.6941659436259380.6116681127481240.305834056374062
1390.5768793237534210.8462413524931570.423120676246579
1400.4618090088426160.9236180176852320.538190991157384
1410.3330766975036290.6661533950072590.66692330249637


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 level20.0150375939849624OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/10k8i51292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/10k8i51292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/13g481292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/13g481292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/2e84c1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/2e84c1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/3e84c1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/3e84c1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/4oy2e1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/4oy2e1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/5oy2e1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/5oy2e1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/6oy2e1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/6oy2e1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/7zqkz1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/7zqkz1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/8zqkz1292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/8zqkz1292371681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/9shj21292371681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372740wtnetgr7szn910g/9shj21292371681.ps (open in new window)


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