Home » date » 2010 » Dec » 02 »

*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: Thu, 02 Dec 2010 19:08:37 +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/02/t1291316795i70dxna35zhsokl.htm/, Retrieved Thu, 02 Dec 2010 20:06:35 +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/02/t1291316795i70dxna35zhsokl.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 13 13 14 13 3 1 1 0 9 12 12 8 13 5 1 0 0 9 15 10 12 16 6 0 0 0 9 12 9 7 12 6 2 0 1 9 10 10 10 11 5 0 1 2 9 12 12 7 12 3 0 0 1 9 15 13 16 18 8 1 1 1 9 9 12 11 11 4 1 0 0 9 12 12 14 14 4 4 0 0 9 11 6 6 9 4 0 0 0 9 11 5 16 14 6 0 2 1 9 11 12 11 12 6 2 0 0 9 15 11 16 11 5 0 2 2 9 7 14 12 12 4 1 1 1 9 11 14 7 13 6 0 1 0 9 11 12 13 11 4 0 0 1 9 10 12 11 12 6 1 1 0 9 14 11 15 16 6 2 0 1 9 10 11 7 9 4 1 0 0 9 6 7 9 11 4 1 0 0 9 11 9 7 13 2 0 1 1 9 15 11 14 15 7 1 2 0 9 11 11 15 10 5 1 2 1 9 12 12 7 11 4 2 0 0 9 14 12 15 13 6 1 0 0 9 15 11 17 16 6 1 1 0 9 9 11 15 15 7 1 1 0 9 13 8 14 14 5 2 2 0 9 13 9 14 14 6 0 0 2 9 16 12 8 14 4 1 1 1 9 13 10 8 8 4 0 1 2 9 12 10 14 13 7 1 1 1 9 14 12 14 15 7 1 2 1 9 11 8 8 13 4 0 2 0 9 9 12 11 11 4 1 1 0 9 16 11 16 15 6 2 2 0 9 12 12 10 15 6 1 1 1 9 10 7 8 9 5 1 1 2 9 13 11 14 13 6 1 0 1 9 16 11 16 16 7 1 3 1 9 14 12 13 13 6 0 1 2 9 15 9 5 11 3 1 0 0 9 5 15 8 12 3 1 0 0 9 8 11 10 12 4 1 0 0 9 11 11 8 12 6 0 1 1 9 16 11 13 14 7 2 0 1 9 1 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -0.983357375578938 + 0.089381370655549month[t] + 0.104378264723487FindingFriends[t] + 0.211622867223575KnowingPeople[t] + 0.385193850989471Liked[t] + 0.59441013592851Celebrity[t] + 0.307649945898061bestfriend[t] -0.0324002150208811secondbestfriend[t] + 0.411552931191424thirdbestfriend[t] -0.00181007322403911t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.9833573755789386.011657-0.16360.8702920.435146
month0.0893813706555490.6408420.13950.8892670.444634
FindingFriends0.1043782647234870.0985591.0590.2913270.145664
KnowingPeople0.2116228672235750.064053.3040.0011996e-04
Liked0.3851938509894710.0990383.88940.0001527.6e-05
Celebrity0.594410135928510.1569613.7870.0002220.000111
bestfriend0.3076499458980610.2119911.45120.1488590.074429
secondbestfriend-0.03240021502088110.20236-0.16010.8730140.436507
thirdbestfriend0.4115529311914240.2146121.91770.0571070.028553
t-0.001810073224039110.006864-0.26370.7923890.396194


Multiple Linear Regression - Regression Statistics
Multiple R0.719101919830674
R-squared0.51710757110416
Adjusted R-squared0.487340229596883
F-TEST (value)17.3716410307495
F-TEST (DF numerator)9
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.1026328891003
Sum Squared Residuals645.475499683636


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.20490267115821.79509732884181
21211.05019761674710.949802383252893
31513.12846422596931.87153577403075
41211.45023897093350.549761029066483
51010.9719246015601-0.97192460156013
6129.361223319074252.63877668092575
71516.9268608320424-1.92686083204242
8910.3094079411661-1.30940794116614
91213.0209978602754-1.02099786027543
10117.543366222382263.45663377761774
111113.0149485846245-2.01494858462452
121112.1838317170145-1.18383171701454
131512.29915926881192.70084073118813
14711.4832734656525-4.48327346565248
151111.2781603020676-0.278160302067566
161110.82207607511430.177923924885657
171011.8347311899754-1.8347311899754
181414.8674128169904-0.867412816990424
19108.568239700104991.43176029989501
2069.34255000441309-3.34255000441309
21118.779320926583282.22067907341672
221514.07376263467850.926237365321516
231111.5803388330651-0.580338833065069
24129.741605246585282.25839475341472
251413.08433613908770.91566386091226
261514.52457487353490.475425126465107
27914.3087353508027-5.30873535080274
281312.48340322421540.516596775784642
291313.4529879522718-0.452987952271803
301611.16945199770554.83054800229448
31138.751625274391044.24837472560896
321213.6248490819480-1.62484908194797
331414.5697830251290-0.569783025128966
34119.607901702815571.39209829718443
35910.2281357490962-1.22813574909621
361614.18490715395861.81509284604136
371213.1540413424309-1.15404134243088
38109.713073900468340.286926099531656
391313.1545469131956-0.154546913195554
401615.22877361825290.771226381747057
411413.11518493451990.88481506548013
42158.07058331810846.92941668189161
4359.71510528588547-4.71510528588547
44810.3134380241431-2.31343802414315
451111.1487052586015-0.148705258601458
461614.21750746621971.78249253378025
471714.24753084317852.75246915682148
4898.02879397139070.971206028609305
49911.3995874334900-2.39958743349002
501314.8178416598702-1.81784165987017
511010.8886453480061-0.888645348006095
52611.9910442211409-5.99104422114088
531211.84951904128590.150480958714061
54810.4331664434410-2.43316644344104
551411.80910639081632.19089360918367
561212.8761180336080-0.87611803360804
571111.1092335643711-0.109233564371146
581614.17475705960221.82524294039776
59810.2776291475077-2.27762914750774
601514.65754471011630.342455289883668
6179.1511205984398-2.15112059843980
621613.94641103452322.05358896547681
631412.91304739004521.08695260995478
641613.6614142093312.33858579066899
65910.2507224958308-1.25072249583077
661412.38949858308011.61050141691991
671113.2954002601194-2.29540026011942
681310.42329743640302.57670256359697
691513.01758105458811.98241894541192
7055.82162779891744-0.821627798917437
711512.9383483059032.06165169409700
721311.97378755277511.02621244722485
731113.0575037847135-2.05750378471350
741114.1346593713084-3.13465937130842
751212.2462910576544-0.246291057654353
761213.4605564914878-1.46055649148784
771212.8158509750580-0.815850975058034
781212.1256704010635-0.125670401063511
791411.09863701011072.90136298988933
8068.02152943171598-2.02152943171598
8179.46530618764307-2.46530618764307
821412.63028677016221.36971322983782
831414.0434433176965-0.0434433176964578
841010.9996709892448-0.999670989244845
85139.395760077086323.60423992291368
861212.4552688010383-0.455268801038257
8799.09895259471804-0.0989525947180393
881212.3827335866523-0.382733586652307
891615.11263259648510.887367403514892
901010.8271360363588-0.827136036358805
911413.01494141406290.985058585937122
921013.6743590227115-3.67435902271152
931615.01894942685980.981050573140155
941513.32693852593841.67306147406163
951211.49569137969530.504308620304673
96109.296984320537470.703015679462534
97810.2975523598291-2.29755235982908
9888.4817653155485-0.4817653155485
991112.5542135160764-1.55421351607642
1001313.0145764114289-0.0145764114289043
1011615.89571675069890.104283249301134
1021615.18984535676170.810154643238305
1031415.6944063024031-1.69440630240308
104118.994008885848432.00599111415157
10547.37063441742284-3.37063441742284
1061414.6930170629043-0.693017062904348
107910.5659658154158-1.56596581541582
1081415.2574638574311-1.25746385743106
109810.0167137756442-2.01671377564415
110810.4697500279441-2.46975002794406
1111111.9652097964192-0.965209796419187
1121213.1931382162864-1.19313821628645
1131111.0137981823412-0.0137981823411882
1141413.01971279941670.980287200583342
1151514.40118373768310.598816262316853
1161613.35344329627532.64655670372468
1171612.87311181099953.12688818900048
1181112.6472019672902-1.64720196729016
1191413.36306660288290.636933397117079
1201410.99614951011693.00385048988307
1211211.55541432287830.444585677121667
1221413.05278987026980.94721012973019
123810.8065061752171-2.80650617521712
1241314.2747980236383-1.27479802363834
1251614.50865984660981.49134015339024
1261210.56942807826611.43057192173393
1271615.84107187558260.158928124417358
1281212.6796300217692-0.679630021769198
1291111.2682259994715-0.268225999471477
13045.69832608065274-1.69832608065274
1311616.0766810985428-0.0766810985427848
1321513.06389867075971.93610132924026
1331011.1235806511745-1.12358065117449
1341314.2784553749570-1.27845537495703
1351512.56410719570152.43589280429852
1361210.17419174575751.82580825424246
1371412.84695430395621.15304569604381
138710.3775092422047-3.37750924220472
1391913.70535664916095.29464335083911
1401213.0227660694378-1.02276606943781
1411211.88217334639780.117826653602182
1421313.2070126965691-0.20701269656909
1431512.40761733729642.59238266270357
14488.9046262949945-0.904626294994498
1451211.12112704607510.878872953924874
1461010.3911752139798-0.39117521397978
147811.2623122209065-3.26231222090646
1481014.2774505151922-4.27745051519218
1491514.16090976054150.839090239458519
1501613.96414778300562.03585221699442
1511313.1799642692192-0.179964269219201
1521614.96907963006441.03092036993558
15399.6862486002568-0.686248600256794
1541413.27853356589490.72146643410509
1551413.33556860094170.664431399058301
156129.960881276030932.03911872396907


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.8360017920639080.3279964158721840.163998207936092
140.901958394078540.1960832118429210.0980416059214603
150.879240557644520.2415188847109620.120759442355481
160.8086167936731950.3827664126536100.191383206326805
170.7265851617577060.5468296764845880.273414838242294
180.6667970381310560.6664059237378890.333202961868944
190.6079103465340510.7841793069318980.392089653465949
200.7021283567818560.5957432864362870.297871643218144
210.694192286731520.6116154265369590.305807713268479
220.7453161201656740.5093677596686510.254683879834326
230.6834184238435530.6331631523128940.316581576156447
240.707777132038690.5844457359226210.292222867961310
250.6845357751627280.6309284496745440.315464224837272
260.6260797639906070.7478404720187870.373920236009393
270.8061671630168050.3876656739663910.193832836983195
280.7709756533203480.4580486933593050.229024346679652
290.7170351166570260.5659297666859490.282964883342974
300.8186239096800450.3627521806399110.181376090319955
310.8601566196548290.2796867606903430.139843380345171
320.8296662109924670.3406675780150670.170333789007533
330.7873125932527150.4253748134945710.212687406747286
340.7549054105990880.4901891788018230.245094589400912
350.7364120679992490.5271758640015020.263587932000751
360.7567194634653790.4865610730692420.243280536534621
370.7400780364288230.5198439271423530.259921963571177
380.696462188811620.6070756223767590.303537811188379
390.646302343994340.7073953120113190.353697656005659
400.6025816866541110.7948366266917780.397418313345889
410.5526456395378250.894708720924350.447354360462175
420.8431763007365380.3136473985269240.156823699263462
430.9708149181968720.05837016360625620.0291850818031281
440.9717544762045280.05649104759094410.0282455237954721
450.963116069055830.0737678618883390.0368839309441695
460.9686958461038150.06260830779237010.0313041538961851
470.9750191368960980.04996172620780410.0249808631039020
480.9715922006109850.05681559877802910.0284077993890146
490.968059130521680.06388173895663850.0319408694783192
500.9594327589301220.08113448213975610.0405672410698781
510.9527291428159770.09454171436804560.0472708571840228
520.989272727210280.02145454557943960.0107272727897198
530.98580342590630.02839314818739870.0141965740936994
540.9891549151957050.02169016960858970.0108450848042948
550.9927678910020530.01446421799589430.00723210899794715
560.9902117190816380.01957656183672420.00978828091836208
570.9865131544645910.02697369107081790.0134868455354090
580.9858478311767560.02830433764648900.0141521688232445
590.9890595788110890.02188084237782300.0109404211889115
600.9878590335761450.02428193284771070.0121409664238553
610.9877983317135950.02440333657281050.0122016682864053
620.989447218573090.02110556285381870.0105527814269094
630.9878855753545760.02422884929084840.0121144246454242
640.9882874413655620.02342511726887590.0117125586344380
650.987659898327960.02468020334407930.0123401016720396
660.9856703082117070.02865938357658690.0143296917882935
670.9873147163489450.02537056730210930.0126852836510546
680.9888699062937610.02226018741247730.0111300937062387
690.988298091441910.02340381711618100.0117019085580905
700.9850823550256860.02983528994862900.0149176449743145
710.9855569406129760.02888611877404700.0144430593870235
720.9821643168462680.03567136630746360.0178356831537318
730.9824987923777140.0350024152445720.017501207622286
740.9874030103962650.02519397920747040.0125969896037352
750.9833495355852780.03330092882944390.0166504644147220
760.9801562422371860.03968751552562760.0198437577628138
770.9742931165743890.05141376685122290.0257068834256115
780.966661732462630.06667653507474120.0333382675373706
790.9756401282116540.04871974357669240.0243598717883462
800.97399429858950.05201140282099960.0260057014104998
810.9749669441903630.05006611161927370.0250330558096368
820.9729834829159950.05403303416800970.0270165170840049
830.9644489453169550.07110210936609090.0355510546830455
840.9552105811569720.08957883768605670.0447894188430283
850.9819980737612210.03600385247755770.0180019262387789
860.9760140750782780.04797184984344370.0239859249217219
870.9687225114776150.06255497704477050.0312774885223853
880.9597489503999020.0805020992001950.0402510496000975
890.951008179153530.09798364169293980.0489918208464699
900.9384758045615820.1230483908768360.0615241954384179
910.930631177696470.1387376446070620.0693688223035309
920.9547720784722720.0904558430554560.045227921527728
930.945151260319080.1096974793618400.0548487396809202
940.9434307560432380.1131384879135250.0565692439567624
950.9320031673230590.1359936653538820.067996832676941
960.9197028008542980.1605943982914040.080297199145702
970.9127613963768930.1744772072462150.0872386036231074
980.8944599622838120.2110800754323760.105540037716188
990.8789282253723880.2421435492552230.121071774627612
1000.8530227067171310.2939545865657380.146977293282869
1010.8222658893142340.3554682213715320.177734110685766
1020.795713023220720.408573953558560.20428697677928
1030.8081798667721190.3836402664557620.191820133227881
1040.8644358748211280.2711282503577450.135564125178872
1050.8618593918989080.2762812162021830.138140608101092
1060.8298872560317030.3402254879365940.170112743968297
1070.7974678520633540.4050642958732920.202532147936646
1080.7836563727571270.4326872544857460.216343627242873
1090.7648546255359220.4702907489281570.235145374464078
1100.7841433090689440.4317133818621120.215856690931056
1110.7690453858734060.4619092282531870.230954614126594
1120.8343242561006170.3313514877987660.165675743899383
1130.7972502037923040.4054995924153920.202749796207696
1140.7663321627394740.4673356745210530.233667837260526
1150.7229761302440680.5540477395118640.277023869755932
1160.7321701317578510.5356597364842970.267829868242149
1170.744374822732680.5112503545346410.255625177267320
1180.7256229710673910.5487540578652170.274377028932609
1190.6753799183396880.6492401633206240.324620081660312
1200.7713185474106790.4573629051786420.228681452589321
1210.7409583544455080.5180832911089840.259041645554492
1220.6882524185663680.6234951628672640.311747581433632
1230.6743283621109530.6513432757780940.325671637889047
1240.6314835368724560.7370329262550880.368516463127544
1250.6121768779478880.7756462441042250.387823122052112
1260.6125528192807940.7748943614384120.387447180719206
1270.546035670759180.907928658481640.45396432924082
1280.5048787291707880.9902425416584240.495121270829212
1290.4829941377381170.9659882754762330.517005862261883
1300.4650092500288740.9300185000577480.534990749971126
1310.3929231015754660.7858462031509310.607076898424534
1320.3714622525341480.7429245050682950.628537747465852
1330.3256673343316130.6513346686632270.674332665668387
1340.2813238243717260.5626476487434520.718676175628274
1350.2375461515696070.4750923031392130.762453848430393
1360.2190691513409930.4381383026819860.780930848659007
1370.184306688933710.368613377867420.81569331106629
1380.1975809082023600.3951618164047210.80241909179764
1390.6160697450689150.767860509862170.383930254931085
1400.5261505179104370.9476989641791260.473849482089563
1410.4055698626061730.8111397252123460.594430137393827
1420.4008516816240120.8017033632480240.599148318375988
1430.2780890056171930.5561780112343860.721910994382807


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level290.221374045801527NOK
10% type I error level480.366412213740458NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/107kt71291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/107kt71291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/1jjwd1291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/1jjwd1291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/2tswy1291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/2tswy1291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/3tswy1291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/3tswy1291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/4mkd11291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/4mkd11291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/5mkd11291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/5mkd11291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/6mkd11291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/6mkd11291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/7xbum1291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/7xbum1291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/8xbum1291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/8xbum1291316906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/97kt71291316906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316795i70dxna35zhsokl/97kt71291316906.ps (open in new window)


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