Home » date » 2010 » Nov » 30 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 30 Nov 2010 14:14:25 +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/30/t12911263790iwwqa5ss1qm5nj.htm/, Retrieved Tue, 30 Nov 2010 15:12:59 +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/30/t12911263790iwwqa5ss1qm5nj.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 «
2 12 2 11 2 14 1 12 2 21 2 12 2 22 2 11 2 10 2 13 1 10 2 8 1 15 2 14 2 10 1 14 1 14 2 11 1 10 2 13 1 7 2 14 2 12 2 14 1 11 2 9 1 11 2 15 2 14 1 13 2 9 1 15 2 10 2 11 1 13 1 8 1 20 1 12 2 10 1 10 1 9 2 14 1 8 1 14 2 11 2 13 2 9 2 11 2 15 1 11 2 10 1 14 1 18 2 14 1 11 2 12 2 13 2 9 1 10 2 15 1 20 1 12 2 12 2 14 2 13 1 11 2 17 1 12 2 13 1 14 1 13 2 15 2 13 1 10 1 11 2 19 2 13 2 17 1 13 1 9 1 11 1 10 2 9 1 12 2 12 2 13 1 13 2 12 2 15 2 22 2 13 2 15 2 13 2 15 2 10 2 11 2 16 2 11 1 11 1 10 2 10 1 16 2 12 1 11 2 16 1 19 2 11 1 16 1 15 2 24 2 14 2 15 2 11 1 15 2 12 1 10 2 14 2 13 2 9 2 15 2 15 2 14 2 11 2 8 2 11 2 11 1 8 2 10 2 11 2 13 1 11 1 20 2 10 1 15 1 12 2 14 1 23 1 14 2 16 2 11 1 12 2 10 1 14 2 12 1 12 2 11 2 12 1 13 1 11 1 19 2 12 2 17 1 9 2 12 2 19 2 18 2 15 2 14 2 11 2 9 2 18 2 16
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 12.2907451492279 + 0.276580143314847x[t] + 0.970866601147538M1[t] -0.485826440139703M2[t] -1.85133518547589M3[t] -0.625659634861006M4[t] + 0.917647323851751M5[t] + 1.2147514458952M6[t] -0.859972086470695M7[t] -1.07783180979365M8[t] -1.89797925849695M9[t] -0.696851311560647M10[t] -1.87216024360439M11[t] + 0.00836588819332487t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.29074514922791.2657899.709900
x0.2765801433148470.5043040.54840.5842170.292108
M10.9708666011475381.1862960.81840.4144440.207222
M2-0.4858264401397031.184941-0.410.6823980.341199
M3-1.851335185475891.184868-1.56250.120310.060155
M4-0.6256596348610061.186105-0.52750.5986430.299321
M50.9176473238517511.184790.77450.4398570.219929
M61.21475144589521.186091.02420.3074290.153714
M7-0.8599720864706951.207112-0.71240.4773260.238663
M8-1.077831809793651.208852-0.89160.3740460.187023
M9-1.897979258496951.206359-1.57330.1177820.058891
M10-0.6968513115606471.206946-0.57740.5645690.282284
M11-1.872160243604391.208743-1.54880.1235540.061777
t0.008365888193324870.0051791.61540.108360.05418


Multiple Linear Regression - Regression Statistics
Multiple R0.364293777347871
R-squared0.132709956214381
Adjusted R-squared0.0565290739899679
F-TEST (value)1.74203753408165
F-TEST (DF numerator)13
F-TEST (DF denominator)148
p-value0.0578919379739506
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.07536929794538
Sum Squared Residuals1399.76865517427


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11213.8231379251985-1.82313792519848
21112.3748107721045-1.37481077210453
31411.01766791496172.98233208503832
41211.97512921045500.0248707895449669
52113.80338220067607.19661779932404
61214.1088522109127-2.10885221091274
72212.04249456674029.95750543325984
81111.8330007316105-0.83300073161054
91011.0212191711006-1.02121917110056
101312.23071300623020.769286993769811
111010.7871898190649-0.787189819064924
12812.9442960941775-4.94429609417748
131513.64694844020351.35305155979650
141412.47520143042441.52479856957557
151011.1180585732816-1.11805857328157
161412.07551986877491.92448013122507
171413.62719271568100.372807284318985
181114.2092428692326-3.20924286923264
191011.8663050817452-1.86630508174522
201311.93339138993041.06660861006956
21710.8450296861056-3.84502968610561
221412.33110366455011.66889633544991
231211.16416062069970.835839379300332
241413.04468675249740.955313247502616
251113.7473390985234-2.7473390985234
26912.5755920887443-3.57559208874433
271110.94186908828660.0581309117133738
281512.45249067040972.54750932959032
291414.0041635173158-0.00416351731575923
301314.0330533842377-1.03305338423769
31912.2432758833800-3.24327588337996
321511.75720190493553.24279809506451
331011.2220004877404-1.22200048774036
341112.4314943228700-1.43149432286999
351310.98797113570472.01202886429528
36812.8684972675024-4.86849726750243
372013.84772975684336.1522702431567
381212.3994026037494-0.399402603749383
391011.3188398899214-1.31883988992137
401012.2763011854147-2.27630118541473
41913.8279740323208-4.82797403232081
421414.4100241858724-0.410024185872432
43812.0670863983850-4.06708639838501
441411.85759256325542.14240743674461
451111.3223911460603-0.322391146060258
461312.53188498118990.468115018810115
47911.3649419373395-2.36494193733946
481113.2454680691372-2.24546806913718
491514.22470055847800.775299441521956
501112.4997932620693-1.49979326206928
511011.4192305482413-1.41923054824127
521412.37669184373461.62330815626537
531813.92836469064074.07163530935929
541414.5104148441923-0.510414844192331
551112.1674770567049-1.16747705670491
561212.2345633648901-0.234563364890132
571311.42278180438021.57721819561984
58912.6322756395098-3.63227563950978
591011.1887524523445-1.18875245234452
601513.34585872745711.65414127254292
612014.04851107348315.9514889265169
621212.6001839203892-0.600183920389179
631211.51962120656120.48037879343883
641412.75366264536941.24633735463063
651314.3053354922755-1.30533549227546
661114.3342253591974-3.33422535919738
671712.54444785833974.45555214166034
681212.0583738798952-0.0583738798951842
691311.52317246270011.47682753729995
701412.45608615451481.54391384548516
711311.28914311066441.71085688933558
721513.44624938577701.55375061422302
731314.4254818751178-1.42548187511784
741012.7005745787091-2.70057457870908
751111.3434317215662-0.343431721566221
761912.85405330368936.14594669631073
771314.4057261505954-1.40572615059535
781714.71119616083212.28880383916787
791312.36825837334470.63174162665529
80912.1587645382151-3.15876453821508
811111.3469829777051-0.346982977705106
821012.5564768128347-2.55647681283473
83911.6661139122992-2.66611391229916
841213.2700599007820-1.27005990078203
851214.5258725334377-2.52587253343774
861313.0775453803438-0.077545380343823
871311.44382237988611.55617762011388
881212.9544439620092-0.95444396200917
891514.50611680891530.493883191084749
902214.81158681915207.18841318084797
911312.74522917497950.254770825020545
921512.53573533984982.46426466015017
931311.72395377933991.27604622066015
941512.93344761446952.06655238553052
951011.7665045706191-1.76650457061906
961113.6470307024168-2.64703070241677
971614.62626319175761.37373680824236
981113.1779360386637-2.17793603866372
991111.5442130382060-0.544213038206017
1001012.7782544770142-2.77825447701422
1011014.6065074672351-4.60650746723515
1021614.63539733415711.36460266584292
1031212.8456198332994-0.845619833299353
1041112.3595458548549-1.35954585485488
1051611.82434443765974.17565556234025
1061912.75725812947456.24274187052547
1071111.8668952289390-0.866895228938958
1081613.47084121742182.52915878257817
1091514.45007370676270.549926293237312
1102413.278326696983610.7216733030164
1111411.92118383984082.07881616015924
1121513.15522527864901.84477472135103
1131114.7068981255550-3.70689812555505
1141514.73578799247700.264212007523024
1151212.9460104916193-0.946010491619252
1161012.4599365131748-2.45993651317478
1171411.92473509597962.07526490402035
1181313.1342289311093-0.134228931109275
119911.9672858872589-2.96728588725886
1201513.84781201905661.15218798094343
1211514.82704450839740.172955491602566
1221413.37871735530350.621282644696481
1231112.0215744981607-1.02157449816066
124813.2556159369689-5.25561593696886
1251114.8072887838749-3.80728878387495
1261115.1127587941117-4.11275879411172
127812.7698210066243-4.7698210066243
1281012.8369073148095-2.83690731480952
1291112.0251257542995-1.02512575429955
1301313.2346195894292-0.234619589429174
1311111.7910964022639-0.791096402263907
1322013.67162253406166.32837746593838
1331014.9274351667173-4.92743516671733
1341513.20252787030861.79747212969143
1351211.84538501316570.154614986834288
1361413.35600659528880.643993404711236
1372314.631099298888.36890070112
1381414.9365693091168-0.936569309116773
1391613.14679180825902.85320819174095
1401112.9372979731294-1.93729797312942
1411211.84893626930460.151063730695401
1421013.3350102477491-3.33501024774907
1431411.89148706058382.10851293941619
1441214.0485933356964-2.04859333569637
1451214.7512456817224-2.75124568172238
1461113.5794986719433-2.57949867194332
1471212.2223558148005-0.222355814800459
1481313.1798171102938-0.179817110293815
1491114.7314899571999-3.7314899571999
1501915.03695996743673.96304003256333
1511213.2471824665789-1.24718246657895
1521713.03768863144933.96231136855068
153911.9493269276245-2.9493269276245
1541213.4354009060690-1.43540090606897
1551912.26845786221856.73154213778145
1561814.14898399401633.85101600598373
1571515.1282164833571-0.128216483357129
1581413.67988933026320.320110669736786
1591112.3227464731204-1.32274647312036
160913.5567879119286-4.55678791192856
1611815.10846075883462.89153924116536
1621615.41393076907140.586069230928583


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.7727060737022150.4545878525955710.227293926297785
180.6491583974359390.7016832051281220.350841602564061
190.8430016690428470.3139966619143060.156998330957153
200.7715933914107030.4568132171785940.228406608589297
210.7036892967511790.5926214064976420.296310703248821
220.6083585738312270.7832828523375460.391641426168773
230.5443249585001970.9113500829996060.455675041499803
240.6065389555542210.7869220888915580.393461044445779
250.525269612846870.949460774306260.47473038715313
260.5204564065705250.959087186858950.479543593429475
270.4845281819235870.9690563638471740.515471818076413
280.41711098766930.83422197533860.5828890123307
290.4382149308519760.8764298617039530.561785069148024
300.4707967029737170.9415934059474350.529203297026283
310.6154103345898670.7691793308202660.384589665410133
320.6676636396375750.664672720724850.332336360362425
330.6182680359127470.7634639281745060.381731964087253
340.5615045389131590.8769909221736820.438495461086841
350.5417112982971060.9165774034057880.458288701702894
360.5148609846287640.9702780307424730.485139015371236
370.7523277095647410.4953445808705170.247672290435259
380.7083244191158860.5833511617682270.291675580884114
390.6645840641654320.6708318716691350.335415935834568
400.6440917449645740.7118165100708510.355908255035426
410.7300739111596920.5398521776806160.269926088840308
420.697348828873940.6053023422521210.302651171126060
430.714529044184320.570941911631360.28547095581568
440.6903620916593110.6192758166813770.309637908340689
450.654142456949130.691715086101740.34585754305087
460.6023941537949030.7952116924101940.397605846205097
470.5800394420673560.8399211158652880.419960557932644
480.5472434754729120.9055130490541760.452756524527088
490.493035554184540.986071108369080.50696444581546
500.4499548775939470.8999097551878940.550045122406053
510.4018319268794220.8036638537588450.598168073120578
520.3687852122742180.7375704245484360.631214787725782
530.4107336814963240.8214673629926490.589266318503676
540.3697524518490310.7395049036980620.630247548150969
550.3232828459984950.646565691996990.676717154001505
560.2823642690783990.5647285381567980.717635730921601
570.2726983756365230.5453967512730450.727301624363477
580.2827576178738790.5655152357477580.717242382126121
590.2433697833610290.4867395667220590.75663021663897
600.2575965367045830.5151930734091670.742403463295417
610.3733038875019090.7466077750038180.626696112498091
620.3315087265828450.6630174531656890.668491273417155
630.2869699599977190.5739399199954370.713030040002281
640.2483770893324140.4967541786648280.751622910667586
650.2304028968148930.4608057936297870.769597103185107
660.2247667213029930.4495334426059870.775233278697007
670.25629745197740.51259490395480.7437025480226
680.2182914177361060.4365828354722120.781708582263894
690.1941000424295070.3882000848590130.805899957570493
700.1775877020117990.3551754040235980.822412297988201
710.1577511120610170.3155022241220330.842248887938983
720.1439100763043540.2878201526087090.856089923695646
730.1393222438561580.2786444877123160.860677756143842
740.1315984621921430.2631969243842870.868401537807857
750.1073474947127630.2146949894255260.892652505287237
760.1731975558443390.3463951116886780.826802444155661
770.1583743295632430.3167486591264860.841625670436757
780.1508796998015390.3017593996030780.849120300198461
790.1255772760471440.2511545520942890.874422723952856
800.1287579640365920.2575159280731840.871242035963408
810.1065241984882040.2130483969764080.893475801511796
820.09910172437515910.1982034487503180.900898275624841
830.09905599197006480.1981119839401300.900944008029935
840.088784503879950.17756900775990.91121549612005
850.08908127476989550.1781625495397910.910918725230104
860.07406107829287780.1481221565857560.925938921707122
870.06238675542485790.1247735108497160.937613244575142
880.05407952384120110.1081590476824020.945920476158799
890.04231830814119220.08463661628238440.957681691858808
900.1198544437892680.2397088875785350.880145556210732
910.09956038882744960.1991207776548990.90043961117255
920.09418146155661460.1883629231132290.905818538443385
930.07798936729506440.1559787345901290.922010632704936
940.0680059789818240.1360119579636480.931994021018176
950.0582735745386880.1165471490773760.941726425461312
960.05922727502688740.1184545500537750.940772724973113
970.05173256250410540.1034651250082110.948267437495895
980.05047329703833550.1009465940766710.949526702961665
990.03951188903678960.07902377807357920.96048811096321
1000.03784631763047780.07569263526095560.962153682369522
1010.05242743238778370.1048548647755670.947572567612216
1020.04239670928438350.0847934185687670.957603290715616
1030.03311020140486120.06622040280972240.966889798595139
1040.02625143944435780.05250287888871560.973748560555642
1050.03323342187440250.0664668437488050.966766578125598
1060.07023856066198570.1404771213239710.929761439338014
1070.05694826365468980.1138965273093800.94305173634531
1080.05127379659894010.1025475931978800.94872620340106
1090.04141533598217550.08283067196435090.958584664017824
1100.3256450019709210.6512900039418420.674354998029079
1110.317512856594480.635025713188960.68248714340552
1120.358425812795160.716851625590320.64157418720484
1130.3611564984096350.722312996819270.638843501590365
1140.3152399123761690.6304798247523380.684760087623831
1150.2771006634033800.5542013268067590.72289933659662
1160.2501170580019760.5002341160039520.749882941998024
1170.2742980249615510.5485960499231020.725701975038449
1180.2515999991630360.5031999983260710.748400000836964
1190.2498462939062300.4996925878124610.75015370609377
1200.2080891538727560.4161783077455110.791910846127244
1210.2163333713332780.4326667426665560.783666628666722
1220.1936187468490530.3872374936981060.806381253150947
1230.1635170921166010.3270341842332020.836482907883399
1240.1648194526306270.3296389052612540.835180547369373
1250.1734958572711670.3469917145423330.826504142728833
1260.1869355344786650.373871068957330.813064465521335
1270.2381430438395170.4762860876790330.761856956160483
1280.2344630713913940.4689261427827890.765536928608606
1290.1879455350848980.3758910701697970.812054464915102
1300.1557207561346840.3114415122693680.844279243865316
1310.1859045484885730.3718090969771460.814095451511427
1320.2360886719182610.4721773438365210.76391132808174
1330.2499211667053610.4998423334107210.75007883329464
1340.2195824026940180.4391648053880360.780417597305982
1350.1696479808638420.3392959617276850.830352019136158
1360.1338258507469760.2676517014939530.866174149253024
1370.5177399679055790.9645200641888420.482260032094421
1380.434185340991440.868370681982880.56581465900856
1390.492788513927280.985577027854560.50721148607272
1400.4796802366643010.9593604733286030.520319763335699
1410.5016746680108020.9966506639783960.498325331989198
1420.3932521896703070.7865043793406140.606747810329693
1430.3555215222393290.7110430444786580.644478477760671
1440.3227155346599620.6454310693199240.677284465340038
1450.2300140101464780.4600280202929570.769985989853522


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 level80.062015503875969OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/10xr3f1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/10xr3f1291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/188om1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/188om1291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/288om1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/288om1291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/3jz671291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/3jz671291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/4jz671291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/4jz671291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/5jz671291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/5jz671291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/6bq5s1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/6bq5s1291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/7bq5s1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/7bq5s1291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/84i4d1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/84i4d1291126451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/94i4d1291126451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911263790iwwqa5ss1qm5nj/94i4d1291126451.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by