Home » date » 2010 » Dec » 19 »

*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: Sun, 19 Dec 2010 14:57:09 +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/19/t12927705422fufup2jnwxddj7.htm/, Retrieved Sun, 19 Dec 2010 15:55:42 +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/19/t12927705422fufup2jnwxddj7.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 «
9 24 14 11 12 24 26 9 25 11 7 8 25 23 9 17 6 17 8 30 25 9 18 12 10 8 19 23 9 18 8 12 9 22 19 9 16 10 12 7 22 29 10 20 10 11 4 25 25 10 16 11 11 11 23 21 10 18 16 12 7 17 22 10 17 11 13 7 21 25 10 23 13 14 12 19 24 10 30 12 16 10 19 18 10 23 8 11 10 15 22 10 18 12 10 8 16 15 10 15 11 11 8 23 22 10 12 4 15 4 27 28 10 21 9 9 9 22 20 10 15 8 11 8 14 12 10 20 8 17 7 22 24 10 31 14 17 11 23 20 10 27 15 11 9 23 21 10 34 16 18 11 21 20 10 21 9 14 13 19 21 10 31 14 10 8 18 23 10 19 11 11 8 20 28 10 16 8 15 9 23 24 10 20 9 15 6 25 24 10 21 9 13 9 19 24 10 22 9 16 9 24 23 10 17 9 13 6 22 23 10 24 10 9 6 25 29 10 25 16 18 16 26 24 10 26 11 18 5 29 18 10 25 8 12 7 32 25 10 17 9 17 9 25 21 10 32 16 9 6 29 26 10 33 11 9 6 28 22 10 13 16 12 5 17 22 10 32 12 18 12 28 22 10 25 12 12 7 29 23 10 29 14 18 10 26 30 10 22 9 14 9 25 23 10 18 10 15 8 14 17 10 17 9 16 5 25 23 10 20 10 10 8 26 23 10 15 12 11 8 20 25 10 20 14 14 10 18 24 10 33 14 9 6 32 24 10 29 10 12 8 25 23 10 23 14 17 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 time9 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PersonalStandards[t] = + 21.4357024204095 -1.45276649903959Month[t] + 0.316958593741161ConcernOverMistakes[t] -0.333187590337108DoubtsAboutActions[t] + 0.191039573493092ParentalExpectations[t] + 0.0627374930000941ParentalCriticism[t] + 0.402168449432824Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)21.435702420409514.5448371.47380.1426120.071306
Month-1.452766499039591.43617-1.01160.3133580.156679
ConcernOverMistakes0.3169585937411610.0546365.801200
DoubtsAboutActions-0.3331875903371080.107323-3.10450.0022740.001137
ParentalExpectations0.1910395734930920.1019661.87360.0629110.031455
ParentalCriticism0.06273749300009410.1307550.47980.6320530.316026
Organization0.4021684494328240.0717285.606900


Multiple Linear Regression - Regression Statistics
Multiple R0.607615158935307
R-squared0.369196181367979
Adjusted R-squared0.344296030632504
F-TEST (value)14.8270661206077
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.65010235978025e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.39721020256090
Sum Squared Residuals1754.23764837835


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.6138488238001-0.613848823800054
22523.70875657428131.29124342571867
33025.55375840983424.44624159016584
41921.7299775482354-2.72997754823537
52221.89887075183880.101129248161214
62224.4947878920103-2.49478789201030
72522.32192991771072.67807008228931
82319.55139660567833.44860339432171
91718.8616338924006-1.86163389240061
102121.6081581721366-0.608158172136559
111922.9460931429700-3.94609314297004
121923.3415843538843-4.34158435388433
131523.1091004893105-8.10910048931047
141617.0598634537332-1.05986345373318
152319.44839398236973.55160601763033
162723.75605035207493.24394964792511
172220.89284217263911.10715782736088
181416.4262722590528-2.42627225905275
192223.9205865689109-1.92058656891091
202324.0502817323101-1.05028173231011
212321.57971578948241.42028421051756
222124.5258219063525-3.52582190635246
231922.5011584615378-3.50115846153778
241823.7312975871567-5.73129758715665
252023.1292390539313-3.12923905393126
262322.39614803296030.603851967039729
272523.14258233858751.85741766141248
281923.2656742643428-4.26567426434278
292423.75358312913040.246416870869606
302221.40745896094500.592541039054967
312524.94183392942060.0581660705793739
322623.59555582541382.40444417458621
332922.47532925124256.5246707487575
343224.95235011958417.04764988041592
352521.55549283505203.44450716494796
362924.27187178902884.72812821097121
372824.64609453672423.35390546327581
381717.1513659376946-0.151365937694621
392826.09172947208431.90827052791568
402922.815262859376.18473714063001
412627.5663511196490-1.56635111964903
422523.37150398214421.62849601785579
431419.4857734007385-5.48577340073851
442521.91784018842423.08215981157578
452621.57750341735234.42249658264768
462020.3217117403310-0.321711740331039
471821.5365547854093-3.53655478540926
483224.45086866457857.54913133542148
492524.81220990800890.187790091991051
502521.66583145981333.33416854018673
512320.67615004774362.32384995225638
522122.0610214166261-1.06102141662611
532023.9704248115026-3.97042481150262
541516.2273390230278-1.22733902302779
553027.00044594456182.99955405543824
562425.2747820523711-1.27478205237109
572624.20217354955211.79782645044788
582319.44839398236973.55160601763033
592221.22817099311880.771829006881173
601415.7677534776693-1.76775347766932
612422.20896876531791.79103123468213
622422.74427419500541.25572580499461
632223.0420213929707-1.04202139297071
642420.02685025430543.97314974569459
651918.41074457443350.589255425566478
663126.53287026422214.46712973577795
672226.3236311521052-4.32363115210522
682721.36251423556195.63748576443811
691917.77025802805371.22974197194631
702522.23969229937402.76030770062605
712024.6967205525091-4.69672055250909
722121.3399553474551-0.339955347455079
732727.3047176538651-0.304717653865059
742324.4807218762822-1.48072187628224
752525.4465023504673-0.446502350467311
762022.1061214466963-2.10612144669634
772119.27802353316051.72197646683950
782222.4571510668245-0.457151066824549
792323.0071803395339-0.00718033953388612
802523.82545986199081.17454013800924
812523.50289634143811.49710365856187
821723.67388151301-6.67388151301
831921.3990371014657-2.39903710146571
842523.91775947441811.0822405255819
851922.2340110089722-3.2340110089722
862023.0469428181477-3.04694281814765
872522.32192991771072.67807008228932
882320.88193121040192.11806878959806
892724.56729093613372.43270906386632
901720.7755495787316-3.7755495787316
911723.3128313618560-6.31283136185604
921919.9684697480727-0.968469748072705
931719.5972293995572-2.59722939955719
942221.83463813800140.165361861998561
952123.5189207711728-2.51892077117284
963228.62293857722793.37706142277205
972124.6961550923205-3.69615509232055
982124.4054976510909-3.40549765109090
991821.1087371690687-3.10873716906870
1001821.1758655275826-3.17586552758262
1012322.80471515317580.1952848468242
1021920.4445404817782-1.44454048177819
1031923.3415843538843-4.34158435388433
1042122.2884658145770-1.28846581457704
1052023.9251540933176-3.92515409331759
1061718.6150255237399-1.6150255237399
1071820.0850890021707-2.08508900217065
1081920.6597714936709-1.65977149367094
1092222.1686194723098-0.168619472309782
1101518.7461445369008-3.74614453690075
1111418.7358362980932-4.7358362980932
1121826.5789032103476-8.57890321034757
1132421.35150474897642.64849525102359
1143523.465377527417511.5346224725825
1152919.22984257956219.77015742043792
1162121.7631189139737-0.76311891397371
1172520.31105615451584.68894384548418
1181920.2772110491958-1.27721104919578
1192223.2496498346081-1.24964983460807
1201316.5896022137004-3.58960221370041
1212622.87070602877323.12929397122682
1221716.84672677252460.153273227475435
1232520.22236721872764.77763278127244
1242020.5737892482138-0.573789248213824
1251918.28818917911940.711810820880556
1262122.5815928414669-1.58159284146685
1272220.81030410675321.18969589324682
1282422.64186074880681.35813925119322
1292122.9769873651409-1.97698736514093
1302625.36059124699770.639408753002286
1312420.62872196681303.37127803318703
1321620.2205988808453-4.22059888084532
1332322.16914766925720.830852330742773
1341820.5340546775684-2.53405467756842
1351622.2765411580797-6.27654115807966
1362624.11339448028621.88660551971376
1371918.99412227154620.00587772845380561
1382116.89138276834694.10861723165309
1392122.1399879062222-1.13998790622216
1402218.69027685034743.30972314965263
1412319.66652086802713.33347913197293
1422924.75921857812254.24078142187747
1432119.71180153324621.28819846675377
1442119.86936130936121.13063869063880
1452322.01822028410130.981779715898743
1462722.89873825592584.10126174407416
1472525.1885762485626-0.188576248562635
1482120.83248773988400.167512260116049
1491017.0659887783828-7.06598877838282
1502022.5609237171829-2.56092371718294
1512622.4286748054243.57132519457600
1522423.66245251565030.337547484349669
1532931.4012790263770-2.40127902637696
1541918.75943855938290.240561440617139
1552422.26189367864811.73810632135187
1562220.89284217263911.10715782736088
1572423.37362982885910.626370171140913
1582221.89036223785610.109637762143861
1591923.3415843538843-4.34158435388433


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.1693529978890640.3387059957781280.830647002110936
110.4808702394969370.9617404789938740.519129760503063
120.4105951303182850.821190260636570.589404869681715
130.8351376755722480.3297246488555040.164862324427752
140.7592548058087510.4814903883824970.240745194191249
150.741589083809880.5168218323802410.258410916190121
160.6620660083330310.6758679833339370.337933991666969
170.6023425850956190.7953148298087630.397657414904381
180.5860691642801580.8278616714396850.413930835719842
190.5093811210731280.9812377578537440.490618878926872
200.5060884625239430.9878230749521150.493911537476057
210.5025107261092510.9949785477814970.497489273890749
220.4330517182482980.8661034364965960.566948281751702
230.3733783013216430.7467566026432860.626621698678357
240.3921100919398470.7842201838796930.607889908060153
250.3613726535909810.7227453071819620.638627346409019
260.2995969162120720.5991938324241430.700403083787928
270.2589441261652150.517888252330430.741055873834785
280.2507495347536050.501499069507210.749250465246395
290.2083629254609230.4167258509218460.791637074539077
300.1633408924243650.3266817848487310.836659107575635
310.1340808698201560.2681617396403110.865919130179844
320.1696096592964520.3392193185929050.830390340703548
330.2878873000796520.5757746001593040.712112699920348
340.5752697914283330.8494604171433350.424730208571667
350.5556048776453330.8887902447093340.444395122354667
360.6329578841888580.7340842316222840.367042115811142
370.6309265622794160.7381468754411680.369073437720584
380.5852097809680890.8295804380638220.414790219031911
390.5533067285814820.8933865428370350.446693271418518
400.6487905178969670.7024189642060650.351209482103033
410.6156105305148840.7687789389702330.384389469485116
420.5734188641384860.8531622717230280.426581135861514
430.6591788655360560.6816422689278890.340821134463945
440.6357310576756320.7285378846487360.364268942324368
450.6704680572078230.6590638855843540.329531942792177
460.6212437550923540.7575124898152920.378756244907646
470.6116224029958430.7767551940083140.388377597004157
480.7281150290782360.5437699418435290.271884970921765
490.687828453348110.6243430933037790.312171546651890
500.6773672682030070.6452654635939850.322632731796993
510.6408487109654550.7183025780690890.359151289034545
520.5977115411479550.804576917704090.402288458852045
530.6239434708997540.7521130582004930.376056529100247
540.5858938453441380.8282123093117240.414106154655862
550.6443195153834980.7113609692330040.355680484616502
560.6087682482522640.7824635034954720.391231751747736
570.5717343176906620.8565313646186760.428265682309338
580.5908446703747140.8183106592505730.409155329625286
590.5454403516159360.9091192967681290.454559648384064
600.5049255047986610.9901489904026770.495074495201339
610.4727374431339020.9454748862678040.527262556866098
620.4323436646578370.8646873293156740.567656335342163
630.3906788052227630.7813576104455270.609321194777237
640.4275507970020860.8551015940041720.572449202997914
650.3830731059788110.7661462119576220.616926894021189
660.4075982734205890.8151965468411770.592401726579411
670.462982871674260.925965743348520.53701712832574
680.5472277830665740.9055444338668520.452772216933426
690.5077185389925510.9845629220148990.492281461007449
700.4924164169969110.9848328339938210.507583583003089
710.5505719306719050.898856138656190.449428069328095
720.5041379104346410.9917241791307190.495862089565359
730.4603857896445670.9207715792891340.539614210355433
740.4241509739186670.8483019478373340.575849026081333
750.3894699100421040.7789398200842080.610530089957896
760.3617219479251220.7234438958502440.638278052074878
770.3350432397515740.6700864795031470.664956760248426
780.2941839737370750.588367947474150.705816026262925
790.2558264821042270.5116529642084530.744173517895773
800.2271075468913450.454215093782690.772892453108655
810.2003292232377440.4006584464754880.799670776762256
820.3002185142560040.6004370285120090.699781485743996
830.2794346561466810.5588693122933610.72056534385332
840.2466009579504050.493201915900810.753399042049595
850.2463814470433660.4927628940867310.753618552956634
860.2400445048772550.480089009754510.759955495122745
870.2375725049245950.475145009849190.762427495075405
880.2200271606839240.4400543213678480.779972839316076
890.2051185639969640.4102371279939280.794881436003036
900.2080931090507220.4161862181014450.791906890949278
910.2925209717556560.5850419435113120.707479028244344
920.2542738521379590.5085477042759190.74572614786204
930.2340380672345110.4680761344690220.765961932765489
940.2020235369166780.4040470738333550.797976463083322
950.1870405683804070.3740811367608140.812959431619593
960.1892709722649180.3785419445298350.810729027735082
970.193174047368750.38634809473750.80682595263125
980.1929095824077960.3858191648155930.807090417592204
990.1820854132917980.3641708265835960.817914586708202
1000.1740962087851230.3481924175702460.825903791214877
1010.1448562320058950.2897124640117910.855143767994105
1020.1210591284403950.2421182568807890.878940871559605
1030.1367988450061870.2735976900123730.863201154993813
1040.114274724131450.22854944826290.88572527586855
1050.128432766157670.256865532315340.87156723384233
1060.1068801016609640.2137602033219270.893119898339036
1070.09296525306694940.1859305061338990.90703474693305
1080.08229885747335610.1645977149467120.917701142526644
1090.06602874233879910.1320574846775980.9339712576612
1100.06482596515925680.1296519303185140.935174034840743
1110.07624016321697280.1524803264339460.923759836783027
1120.2914259751588490.5828519503176980.708574024841151
1130.2721916857832220.5443833715664450.727808314216778
1140.7553430897160330.4893138205679340.244656910283967
1150.9450305656269860.1099388687460270.0549694343730137
1160.9290277377567780.1419445244864440.070972262243222
1170.9692720037993330.06145599240133470.0307279962006674
1180.9614611343119240.07707773137615150.0385388656880757
1190.9533171534666920.09336569306661660.0466828465333083
1200.9562333580188220.08753328396235540.0437666419811777
1210.9507688339958920.0984623320082150.0492311660041075
1220.93380129228910.1323974154218000.0661987077108998
1230.9420688906002640.1158622187994720.0579311093997359
1240.9216980576941830.1566038846116350.0783019423058174
1250.9117436769331290.1765126461337430.0882563230668713
1260.8853678092504540.2292643814990920.114632190749546
1270.8812504292499460.2374991415001070.118749570750053
1280.8511756433288570.2976487133422860.148824356671143
1290.8167797814259610.3664404371480780.183220218574039
1300.7797097596800440.4405804806399130.220290240319956
1310.7652420611319220.4695158777361570.234757938868079
1320.7679035420249730.4641929159500540.232096457975027
1330.7380632889334290.5238734221331420.261936711066571
1340.6811050930174950.6377898139650090.318894906982505
1350.8356271358586930.3287457282826140.164372864141307
1360.8068229854820110.3863540290359770.193177014517989
1370.746635571453490.506728857093020.25336442854651
1380.8057949676141560.3884100647716870.194205032385843
1390.7507816288572220.4984367422855570.249218371142778
1400.6878314098662460.6243371802675070.312168590133754
1410.6321079586268730.7357840827462550.367892041373127
1420.64812255570380.70375488859240.3518774442962
1430.6315880801037920.7368238397924150.368411919896208
1440.5656160162217080.8687679675565850.434383983778292
1450.4574222630123210.9148445260246430.542577736987679
1460.4362192101257340.8724384202514690.563780789874265
1470.3911238858113190.7822477716226380.608876114188681
1480.2716471399701960.5432942799403920.728352860029804
1490.7597718542400230.4804562915199530.240228145759977


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 level50.0357142857142857OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/103kdf1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/103kdf1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/1w0f31292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/1w0f31292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/2w0f31292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/2w0f31292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/37sfo1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/37sfo1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/47sfo1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/47sfo1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/57sfo1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/57sfo1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/6ijer1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/6ijer1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/7tadc1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/7tadc1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/8tadc1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/8tadc1292770614.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/9tadc1292770614.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927705422fufup2jnwxddj7/9tadc1292770614.ps (open in new window)


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