Home » date » 2010 » Nov » 29 »

Multiple Lineair Regression Paper Finding Friends

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 29 Nov 2010 11:22:54 +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/29/t1291029806rydptbu51ady215.htm/, Retrieved Mon, 29 Nov 2010 12:23:40 +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/29/t1291029806rydptbu51ady215.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 «
66 73 68 5 2 54 58 54 12 1 82 68 41 11 1 61 62 49 6 1 65 65 49 12 1 77 81 72 11 1 66 73 78 12 1 66 64 58 7 2 66 68 58 8 1 48 51 23 13 1 57 68 39 12 1 80 61 63 13 1 60 69 46 12 1 70 73 58 12 1 85 61 39 11 2 59 62 44 12 2 72 63 49 12 1 70 69 57 12 1 74 47 76 11 2 70 66 63 13 2 51 58 18 9 1 70 63 40 11 2 71 69 59 11 1 72 59 62 11 2 50 59 70 9 1 69 63 65 11 2 73 65 56 12 2 66 65 45 12 1 73 71 57 10 2 58 60 50 12 1 78 81 40 12 2 83 67 58 12 1 76 66 49 9 2 77 62 49 9 1 79 63 27 12 1 71 73 51 14 2 79 55 75 12 2 60 59 65 11 1 73 64 47 9 1 70 63 49 11 2 42 64 65 7 1 74 73 61 15 1 68 54 46 11 1 83 76 69 12 1 62 74 55 12 2 79 63 78 9 2 61 73 58 12 2 86 67 34 11 2 64 68 67 11 2 75 66 45 8 1 59 62 68 7 2 82 71 49 12 2 61 63 19 8 1 69 75 72 10 1 60 77 59 12 1 59 62 46 15 2 81 74 56 12 1 65 67 45 12 2 60 56 53 12 2 60 60 67 12 2 45 58 73 8 2 75 65 46 10 1 84 49 70 14 2 77 61 38 10 1 64 66 54 12 2 54 64 46 14 2 72 65 46 6 2 56 46 45 11 1 67 65 47 10 2 81 81 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Vrienden_Vinden[t] = + 9.02573160599013 + 0.0372125888611801Groepsgevoel[t] -0.000142551277212557`Non-verbale_communicatie`[t] -0.0171637167682930Uitingsangst[t] + 0.260679787657076Geslacht[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.025731605990131.534295.882700
Groepsgevoel0.03721258886118010.015622.38240.0185370.009268
`Non-verbale_communicatie`-0.0001425512772125570.0208-0.00690.9945420.497271
Uitingsangst-0.01716371676829300.011838-1.44990.1493190.07466
Geslacht0.2606797876570760.3050940.85440.3943190.197159


Multiple Linear Regression - Regression Statistics
Multiple R0.240728215051863
R-squared0.057950073522056
Adjusted R-squared0.0312252529127526
F-TEST (value)2.16839897147458
F-TEST (DF numerator)4
F-TEST (DF denominator)141
p-value0.0756037482134682
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.76827713079384
Sum Squared Residuals440.879365591678


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1510.8255830626617-5.82558306266173
21210.36078251258481.63921748741521
31111.6244378059135-0.624437805913516
4610.7065190133457-4.70651901334566
51210.85494171495871.14505828504125
61110.90444647518680.0955535248132316
71210.39326610732171.60673389267827
8710.9985031918396-3.99850319183958
9810.7372531990737-2.73725319907365
101310.67058005817532.32941994182472
111210.72845051792061.27154948207940
121311.17340871822921.82659128177080
131210.71979971584891.28020028415113
141210.88539079813231.11460920186769
151112.0320806526312-1.03208065263121
161210.97859220712181.02140779287815
171211.11571493954140.884285060458567
181210.90312472000951.09687527999055
191110.98968037261240.0103196273876398
201311.06124986088841.93875013911159
21910.8670385496598-1.86703854965980
221111.4564430003908-0.456443000390786
231110.90600987533400.0939901246659525
241111.1538366143196-0.153836614319551
2599.93717013757017-0.937170137570168
261110.99013749232230.00986250767771873
271211.29317619612720.706823803872786
281210.96080917089311.0391908291069
291011.2751571716956-1.27515717169565
301210.57800263254831.42199736745174
311211.75157778829040.248422211709599
321211.37000976099090.629990239009073
33911.5248174288116-2.52481742881159
34911.3019204351245-2.30192043512455
351211.75380483047210.246195169527861
361411.30342919202862.69657080797138
371211.19176662346890.808233376531147
381110.39511461002340.604885389976566
39911.1871124106620-2.18711241066199
401111.3019695494761-0.301969549476149
4179.72457525413613-2.72457525413613
421510.98275000327224.01724999672785
431111.0196386958965-0.0196386958965047
441211.17992591504480.82007408495521
451210.89971847392761.10028152607239
46911.1391350629463-2.13913506294627
471210.81115728603881.18884271396123
481112.1542565176706-1.15425651767058
491110.76903435809370.230965641906268
50811.2955799193665-3.29557991936651
51710.5666630046828-3.56666300468281
521211.74738020559260.25261979440739
53811.2212879651172-3.22128796511724
541010.6076010719606-0.607601071960603
551210.49553098764341.50446901235663
561510.94426477358534.05573522641474
571211.32891415786470.671085842135335
581211.18399126713460.81600873286543
591210.86218665273171.13781334726834
601210.62132441286671.37867558713329
6189.96043838189368-1.96043838189368
621011.2785587538754-1.27855875387543
631411.46450345927952.53549654072051
641011.4908638708530-1.49086387085298
651210.99244777863601.00755222136403
661410.75791672672493.24208327327507
67611.4276007749490-5.42760077494896
681110.59139175654830.408608243451663
691011.2243741138748-1.22437411387477
701412.12067130639831.87932869360166
711210.91135253215161.08864746784840
721311.24153783064311.75846216935694
731111.0315523277833-0.0315523277833113
741111.1076296786765-0.107629678676501
751211.07764704301700.922352956983023
761311.73480759557341.26519240442660
771210.50504176128041.49495823871958
78810.4324057791145-2.4324057791145
791211.43294343176650.567056568233486
801111.3842836585326-0.384283658532567
811011.1847040235206-1.18470402352063
821210.83720779308161.16279220691840
831111.1617746600052-0.161774660005211
841211.26744578640870.732554213591312
851211.12162313756580.878376862434226
861010.4858926473004-0.485892647300355
871211.63654863232070.363451367679258
881211.21411645407130.785883545928694
891111.4261457962986-0.426145796298554
901010.6997120500736-0.699712050073586
911211.11703203081670.882967969183311
921110.79711004889580.202889951104171
931210.32588487393941.67411512606065
941210.22710481992941.77289518007056
951010.0509803030922-0.0509803030922393
961111.0676698218659-0.06766982186588
971010.9906539191775-0.99065391917747
981111.1593171585123-0.159317158512255
991110.68132847786820.318671522131839
1001211.02299029873510.977009701264861
1011111.0564236309260-0.056423630926047
1021111.1488678330800-0.148867833079976
10379.56158888852492-2.56158888852492
1041210.36135271769361.63864728230636
105810.6279303827059-2.62793038270586
1061011.024268596328-1.02426859632799
1071210.97206935353911.02793064646089
1081110.95849888457940.0415011154205855
1091311.32778873221821.67221126778178
110911.0538670357403-2.05386703574034
1111110.55534904378310.444650956216860
1121310.17182974905222.82817025094777
113810.6009413238678-2.60094132386780
1141211.67909455019540.320905449804646
1151110.50329701617350.49670298382647
1161110.87807207190710.121927928092897
1171210.76307238181571.23692761818427
1181311.11443197804651.88556802195348
1191111.0490852562275-0.0490852562275203
1201010.5981940559184-0.598194055918356
1211010.8762735485465-0.876273548546547
1221010.7095513838495-0.70955138384953
1231211.04900114710600.95099885289397
1241211.12111137461260.878888625387354
1251310.83186980016612.16813019983389
1261110.85059225317960.149407746820375
1271110.51979709090740.480202909092637
1281211.06450889179100.935491108209021
129911.2254607458388-2.22546074583881
1301111.5437305545888-0.543730554588838
1311211.20844424424980.791555755750213
1321211.04905579034920.950944209650763
1331311.32603932320931.67396067679073
134610.6716213747002-4.67162137470023
1351111.4464647863746-0.446464786374606
1361011.3508699748150-1.35086997481498
1371211.79164140269580.208358597304168
1381110.94539486313380.0546051368662412
1391211.13035718376940.869642816230557
1401210.98979394761211.01020605238787
141711.5361570566770-4.53615705667703
1421211.19013545336170.809864546638266
1431211.52480244424030.475197555759668
144910.8623142194376-1.86231421943762
1451210.65962829759401.34037170240601
1461211.15812297004090.841877029959108


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.9546032819130090.09079343617398260.0453967180869913
90.956904392026490.0861912159470180.043095607973509
100.9883192492621170.02336150147576610.0116807507378830
110.978786374127620.04242725174475880.0212136258723794
120.9788567810180640.04228643796387290.0211432189819364
130.9703292946025870.0593414107948270.0296707053974135
140.9581730540541280.08365389189174340.0418269459458717
150.9676128664074140.06477426718517220.0323871335925861
160.9890040926437310.02199181471253710.0109959073562686
170.9821689812361380.03566203752772310.0178310187638615
180.9744543869213660.05109122615726840.0255456130786342
190.965843380938010.06831323812397830.0341566190619892
200.9880208768912450.02395824621751080.0119791231087554
210.9896004742579620.02079905148407500.0103995257420375
220.9854103840110710.02917923197785770.0145896159889289
230.977917314275380.04416537144924090.0220826857246205
240.968542383304090.06291523339181770.0314576166959089
250.9611820140251120.07763597194977640.0388179859748882
260.9499247272973230.1001505454053530.0500752727026765
270.9429210878027640.1141578243944730.0570789121972365
280.9268451999377740.1463096001244520.0731548000622261
290.9065839573505480.1868320852989040.0934160426494519
300.889586744128960.220826511742080.11041325587104
310.8782458086535850.2435083826928300.121754191346415
320.8467749080806080.3064501838387840.153225091919392
330.8571826292597480.2856347414805030.142817370740252
340.8937838304709980.2124323390580040.106216169529002
350.8653368203360150.2693263593279710.134663179663985
360.9207649563215990.1584700873568030.0792350436784013
370.9058693407355170.1882613185289670.0941306592644835
380.8820096712956320.2359806574087370.117990328704368
390.8967583973008420.2064832053983160.103241602699158
400.8708688622612840.2582622754774310.129131137738716
410.8951657348671390.2096685302657220.104834265132861
420.9575925049870320.08481499002593650.0424074950129682
430.9444320107787470.1111359784425070.0555679892212533
440.9301841628279470.1396316743441050.0698158371720527
450.924536057487730.1509278850245400.0754639425122699
460.927880274641270.1442394507174610.0721197253587305
470.9213777497761240.1572445004477520.0786222502238761
480.9087447361998550.1825105276002900.0912552638001448
490.8879750761716250.2240498476567510.112024923828375
500.9359417279691140.1281165440617720.0640582720308858
510.9667886083478550.06642278330428950.0332113916521447
520.956949625223830.0861007495523410.0430503747761705
530.9750620969769970.04987580604600540.0249379030230027
540.9683610158659320.06327796826813510.0316389841340676
550.9652781746071210.06944365078575760.0347218253928788
560.991111787235690.01777642552862090.00888821276431046
570.9881412050236980.0237175899526050.0118587949763025
580.9849097572338930.03018048553221420.0150902427661071
590.982327988142470.03534402371506040.0176720118575302
600.9800772672455740.03984546550885280.0199227327544264
610.981354744542450.03729051091510160.0186452554575508
620.9782273429530840.04354531409383160.0217726570469158
630.983788978754790.03242204249041930.0162110212452097
640.9820986227969130.03580275440617330.0179013772030867
650.9780840806046540.04383183879069160.0219159193953458
660.9890777904300520.02184441913989620.0109222095699481
670.9995975854436540.0008048291126923020.000402414556346151
680.9993936583029240.001212683394152130.000606341697076066
690.9992843369627210.001431326074557210.000715663037278604
700.9992961459415690.001407708116862860.00070385405843143
710.9991001183630980.001799763273803430.000899881636901716
720.9990781286407910.001843742718417650.000921871359208823
730.9986109396134530.002778120773093340.00138906038654667
740.9979419678462630.004116064307473680.00205803215373684
750.9973044490103860.005391101979228740.00269555098961437
760.9967076375049980.006584724990003530.00329236249500177
770.9964666993107180.00706660137856330.00353330068928165
780.997680734056760.004638531886478920.00231926594323946
790.9966938094190270.006612381161946320.00330619058097316
800.9952889094323120.00942218113537650.00471109056768825
810.9946669489172510.01066610216549750.00533305108274873
820.993560133992160.01287973201567980.0064398660078399
830.9910660166284840.01786796674303230.00893398337151616
840.9882640185480.02347196290399840.0117359814519992
850.985123692505320.02975261498935810.0148763074946790
860.9813278304378440.03734433912431190.0186721695621559
870.9756026658768130.04879466824637310.0243973341231866
880.968329872683010.06334025463398120.0316701273169906
890.9597287812785760.08054243744284750.0402712187214238
900.9507920266667130.09841594666657340.0492079733332867
910.9419852554475820.1160294891048360.0580147445524182
920.9257937255912040.1484125488175930.0742062744087963
930.9239694389586130.1520611220827740.0760305610413871
940.9297675068647360.1404649862705280.070232493135264
950.9108218700111310.1783562599777370.0891781299888687
960.8878276060451620.2243447879096770.112172393954838
970.8694050722561230.2611898554877550.130594927743877
980.8440840502825170.3118318994349670.155915949717483
990.8108101618215750.3783796763568510.189189838178425
1000.7966537961291470.4066924077417050.203346203870853
1010.756252054175180.4874958916496390.243747945824819
1020.7130563061908670.5738873876182660.286943693809133
1030.7717388756332160.4565222487335690.228261124366784
1040.7554322916985320.4891354166029370.244567708301468
1050.8016141948730720.3967716102538570.198385805126929
1060.772404275532390.455191448935220.22759572446761
1070.753800127421110.4923997451577810.246199872578891
1080.7070083753514990.5859832492970030.292991624648501
1090.6876566573315640.6246866853368710.312343342668436
1100.6818743685272320.6362512629455360.318125631472768
1110.6282024148279950.743595170344010.371797585172005
1120.6909990250915210.6180019498169580.309000974908479
1130.7567738688568590.4864522622862830.243226131143141
1140.7181805321670220.5636389356659550.281819467832978
1150.664608180594640.6707836388107210.335391819405361
1160.6093992050992080.7812015898015850.390600794900792
1170.5750278342566570.8499443314866860.424972165743343
1180.6127427829618430.7745144340763140.387257217038157
1190.551992729830360.896014540339280.44800727016964
1200.4910093283489740.982018656697950.508990671651026
1210.4378004652811560.8756009305623130.562199534718844
1220.385092036303690.770184072607380.61490796369631
1230.3246471553579730.6492943107159460.675352844642027
1240.2666361849760040.5332723699520090.733363815023996
1250.3036041217235880.6072082434471760.696395878276412
1260.2428704234405390.4857408468810790.75712957655946
1270.1871519459139580.3743038918279150.812848054086043
1280.158545138323240.317090276646480.84145486167676
1290.1631465900648390.3262931801296790.83685340993516
1300.1188470959551250.237694191910250.881152904044875
1310.08806430391400180.1761286078280040.911935696085998
1320.06600334472135570.1320066894427110.933996655278644
1330.05269911186119830.1053982237223970.947300888138802
1340.3160199118153040.6320398236306090.683980088184696
1350.2313043977817500.4626087955634990.76869560221825
1360.2169176245777060.4338352491554130.783082375422294
1370.1340441551650760.2680883103301530.865955844834924
1380.07198771329521960.1439754265904390.92801228670478


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level140.106870229007634NOK
5% type I error level420.320610687022901NOK
10% type I error level590.450381679389313NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/102fk31291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/102fk31291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/1vena1291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/1vena1291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/26nmc1291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/26nmc1291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/36nmc1291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/36nmc1291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/46nmc1291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/46nmc1291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/5hx4x1291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/5hx4x1291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/6hx4x1291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/6hx4x1291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/796301291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/796301291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/896301291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/896301291029762.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/92fk31291029762.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291029806rydptbu51ady215/92fk31291029762.ps (open in new window)


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