Home » date » 2010 » Dec » 29 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 29 Dec 2010 10:42:05 +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/29/t12936192095ghd0cgpll8uzjz.htm/, Retrieved Wed, 29 Dec 2010 11:40:21 +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/29/t12936192095ghd0cgpll8uzjz.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 13 26 14 28 13 26 3 6 2 12 12 12 8 8 13 13 5 5 1 15 10 0 12 0 16 0 6 0 0 12 9 27 7 21 12 36 6 18 3 10 10 30 10 30 11 33 5 15 3 12 12 12 7 7 12 12 3 3 1 15 13 39 16 48 18 54 8 24 3 9 12 12 11 11 11 11 4 4 1 12 12 48 14 56 14 56 4 16 4 11 6 0 6 0 9 0 4 0 0 11 5 15 16 48 14 42 6 18 3 11 12 24 11 22 12 24 6 12 2 15 11 44 16 64 11 44 5 20 4 7 14 42 12 36 12 36 4 12 3 11 14 14 7 7 13 13 6 6 1 11 12 12 13 13 11 11 4 4 1 10 12 24 11 22 12 24 6 12 2 14 11 33 15 45 16 48 6 18 3 10 11 11 7 7 9 9 4 4 1 6 7 7 9 9 11 11 4 4 1 11 9 18 7 14 13 26 2 4 2 15 11 33 14 42 15 45 7 21 3 11 11 44 15 60 10 40 5 20 4 12 12 24 7 14 11 22 4 8 2 14 12 12 15 15 13 13 6 6 1 15 11 22 17 34 16 32 6 12 2 9 11 22 15 30 15 30 7 14 2 13 8 32 14 56 14 56 5 20 4 13 9 18 14 28 14 28 6 12 2 16 12 36 8 24 14 42 4 12 3 13 10 30 8 24 8 24 4 12 3 12 10 30 14 42 13 39 7 21 3 14 12 48 14 56 15 60 7 28 4 11 8 16 8 16 13 26 4 8 2 9 12 24 11 22 11 22 4 8 2 16 11 44 16 64 15 60 6 24 4 12 12 36 10 30 15 45 6 18 3 10 7 28 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 time17 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -0.956521145565202 + 0.122464404572674FindingFriends[t] -0.00611986826304754sum_friends[t] + 0.129901135405866KnowingPeople[t] + 0.0388655008006025sum_know[t] + 0.422882703355402Liked[t] -0.0255765571618549sum_liked[t] + 0.782432477255013Celebrity[t] -0.0824572683867579sum_celeb[t] + 0.579627939212355Sum[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.9565211455652022.451522-0.39020.6969760.348488
FindingFriends0.1224644045726740.1772490.69090.4907140.245357
sum_friends-0.006119868263047540.066175-0.09250.9264430.463221
KnowingPeople0.1299011354058660.1119011.16090.2475930.123797
sum_know0.03886550080060250.0452310.85930.3916010.1958
Liked0.4228827033554020.1696342.49290.0137870.006893
sum_liked-0.02557655716185490.063828-0.40070.6892190.34461
Celebrity0.7824324772550130.2911712.68720.0080420.004021
sum_celeb-0.08245726838675790.117131-0.7040.482570.241285
Sum0.5796279392123550.8875440.65310.5147380.257369


Multiple Linear Regression - Regression Statistics
Multiple R0.716779838383906
R-squared0.513773336713658
Adjusted R-squared0.483800460209705
F-TEST (value)17.1412756011558
F-TEST (DF numerator)9
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10987944174862
Sum Squared Residuals649.932323772166


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.22754381442041.77245618557957
21211.03423026387180.965769736128203
31513.28765464224841.71234535775158
41210.80898974978381.19101025021617
51010.7713737590258-0.771373759025812
6129.068207063735282.93179293626472
71516.5909272245955-1.59092722459553
8910.0459426712359-1.04594267123586
91212.8313779907896-0.831377990789564
10117.49334633352473.5066536664753
111113.3033553546585-2.30335535465845
121111.9752469677655-0.97524696776552
131512.79499331606972.20500668393034
14711.4918805935504-4.49188059355038
151111.7981279091528-0.798127909152836
161110.38347594364880.616524056351206
171011.9752469677655-1.97524696776552
181414.3737925792916-0.373792579291638
19108.459919297713261.54008070228674
2069.12668671727479-3.12668671727479
21118.71570224270322.28429775729680
221514.31620258170890.683797418291134
231112.1890537027534-1.18905370275341
24129.537952949742552.46204705025745
251412.91557192618531.08442807381466
261514.59773347788810.402266522111863
27914.4282575553238-5.4282575553238
281312.89204166841560.107958331584390
291313.0109285527104-0.0109285527103813
301610.98998650649235.0100134935077
31138.704858715706214.29514128429379
321213.5197917181857-1.51979171818566
331414.5097646766215-0.509764676621488
341110.04814559262670.95185440737331
35910.3684814977708-1.36848149777083
361614.52990261860961.47009738139042
371212.8992561581670-0.899256158166964
38109.478995531705560.521004468294444
391312.85964829977180.140351700228154
401615.45081410485700.549185895142972
411412.94644300785031.05355699214969
42157.984334036199917.01566596380009
4359.58600730887062-4.58600730887062
44810.1581376449133-2.15813764491331
451111.2421258886977-0.242125888697726
461613.72355191203142.27644808796865
471715.09602839222591.90397160777410
4898.172643271323360.827356728676637
49911.3590384594999-2.35903845949989
501314.5003260089276-1.50032600892764
511011.1011837347548-1.10118373475478
52612.4348178203754-6.43481782037539
531212.1066029548912-0.106602954891221
54810.489044264813-2.48904426481301
551411.73386840405112.26613159594890
561213.1770648027584-1.17706480275844
571110.61716921966990.382830780330139
581614.65450923027661.34549076972341
59810.6549086700045-2.65490867000448
601514.94180470419330.0581952958066707
6178.97415066458367-1.97415066458367
621614.30731107542211.69268892457792
631412.84429871588881.15570128411122
641613.42507304605632.57492695394367
65910.0659685416539-1.06596854165392
661412.14472289032991.85527710967014
671113.3807949873978-2.38079498739784
681310.46815748147182.53184251852822
691513.13064518488931.86935481511073
7055.67009245966134-0.670092459661344
711513.17706480275841.82293519724156
721312.67804178118130.321958218818715
731112.3299070471522-1.32990704715223
741114.1104046332066-3.11040463320657
751212.6493121832400-0.649312183240023
761213.4394382834657-1.43943828346566
771212.4158317414769-0.415831741476938
781211.99496313662140.00503686337855314
791410.86077385384473.13922614615530
8067.802159072467-1.80215907246700
8179.76818227260353-2.76818227260353
821412.46865706483751.53134293516252
831413.99438967749270.00561032250726964
841011.1372796911909-1.13727969119086
85139.023126857234873.97687314276513
861212.2931037728192-0.293103772819169
8799.26363082967135-0.263630829671349
881211.92179445414620.078205545853794
891614.83814335879821.16185664120178
901010.4400732807768-0.440073280776769
911413.14430851883860.855691481161362
921013.5346442718065-3.53464427180645
931615.40106742854600.598932571453977
941513.47772632170631.52227367829373
951211.46812922848690.531870771513145
96109.333700438483280.666299561516719
97810.4774162463660-2.47741624636605
9888.65893008827594-0.658930088275938
991112.654915533214-1.654915533214
1001312.45344773223500.546552267765038
1011615.58844563563380.411554364366184
1021614.79512781522981.20487218477023
1031415.4723250021853-1.47232500218526
104119.028180577217141.97181942278286
10547.0878417326335-3.08784173263349
1061414.4196353340098-0.419635334009809
107910.6400561163837-1.64005611638368
1081415.0977608916113-1.09776089161128
109810.1364301921225-2.13643019212252
110810.7159113020490-2.71591130204898
1111111.8739138822720-0.873913882271969
1121213.1501689898151-1.15016898981508
1131111.6144296642982-0.614429664298243
1141413.37265094615950.627349053840509
1151514.27346513774690.726534862253112
1161613.43498887774432.56501112225571
1171612.94662031549473.05337968450529
1181112.8392689128711-1.83926891287107
1191414.2583045582921-0.258304558292107
1201410.83761855576303.16238144423698
1211211.62982402585320.370175974146841
1221412.70061741752521.29938258247478
123810.8907755528467-2.8907755528467
1241314.1199328683343-1.11993286833428
1251614.02194793681381.9780520631862
1261211.12497875499280.875021245007234
1271615.30152108545700.698478914543027
1281212.6536387475452-0.653638747545174
1291111.4526573961540-0.452657396154021
13045.62386162589304-1.62386162589304
1311615.24579149419840.754208505801591
1321512.59584057025912.40415942974090
1331011.5261734935842-1.52617349358419
1341313.3974531743112-0.397453174311151
1351513.13397041984301.86602958015695
1361210.50302169121001.49697830878999
1371413.68148651555200.318513484448036
138710.0808068809741-3.08080688097409
1391913.92096428288895.07903571711112
1401213.0880115314566-1.08801153145658
1411211.56804360834570.431956391654331
1421313.3416025568501-0.341602556850117
1431512.22752076769552.77247923230451
14489.35313962372137-1.35313962372137
1451210.90430853882711.09569146117285
1461011.1754834642238-1.17548346422380
147811.4315364100653-3.43153641006535
1481014.6364792060832-4.63647920608323
1491513.92798415335961.07201584664036
1501614.67456570254841.32543429745160
1511313.1309012423538-0.130901242353844
1521615.01295805116990.987041948830091
15399.76401987267188-0.764019872671875
1541413.07761853577450.92238146422549
1551413.25221102053350.747788979466463
1561210.13840971585631.86159028414366


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.1857188285965610.3714376571931220.814281171403439
140.7760120014895160.4479759970209690.223987998510484
150.6607512066527450.678497586694510.339248793347255
160.6146978123321990.7706043753356030.385302187667801
170.5122675172013890.9754649655972230.487732482798611
180.4162445663921510.8324891327843020.583755433607849
190.3469405663617110.6938811327234220.653059433638289
200.6806131657987030.6387736684025940.319386834201297
210.6108025123210980.7783949753578040.389197487678902
220.5579587582997720.8840824834004560.442041241700228
230.5300091370696620.9399817258606750.469990862930338
240.5241010233676530.9517979532646930.475898976632347
250.5849372562665620.8301254874668770.415062743733438
260.5224489880027310.9551020239945380.477551011997269
270.7371402686081540.5257194627836910.262859731391846
280.6838835486941810.6322329026116380.316116451305819
290.628380757419480.7432384851610410.371619242580520
300.8194045550826960.3611908898346070.180595444917304
310.8840705675466120.2318588649067760.115929432453388
320.8552166371249420.2895667257501170.144783362875058
330.81740435246080.3651912950784010.182595647539201
340.7842950994893870.4314098010212260.215704900510613
350.7693022783549460.4613954432901070.230697721645054
360.768574374712260.4628512505754790.231425625287740
370.7341112505739550.531777498852090.265888749426045
380.6866217059458650.6267565881082690.313378294054135
390.6443349871585070.7113300256829860.355665012841493
400.5954738914237010.8090522171525970.404526108576299
410.5601628132880130.8796743734239730.439837186711987
420.817026086140240.3659478277195190.182973913859760
430.9611000445245630.07779991095087490.0388999554754375
440.963431247017200.07313750596559780.0365687529827989
450.951966749862720.09606650027456070.0480332501372804
460.9574978528868640.08500429422627140.0425021471131357
470.9499752555751030.1000494888497940.050024744424897
480.944551739905480.1108965201890410.0554482600945207
490.9428904563331120.1142190873337760.057109543666888
500.933376903455980.1332461930880390.0666230965440194
510.9290429230589190.1419141538821620.070957076941081
520.9919177029708740.01616459405825240.0080822970291262
530.9888733299138770.02225334017224690.0111266700861234
540.9923466949673780.01530661006524410.00765330503262204
550.9947338689136360.0105322621727290.0052661310863645
560.993273511690110.01345297661977900.00672648830988949
570.9907204861819070.01855902763618500.00927951381809248
580.9887276970818750.022544605836250.011272302918125
590.9922382604035220.01552347919295570.00776173959647783
600.9913993778089660.01720124438206730.00860062219103365
610.9913591353364040.01728172932719220.0086408646635961
620.99081393128150.01837213743699920.00918606871849959
630.9892560564113040.02148788717739230.0107439435886962
640.9913372657873150.01732546842536910.00866273421268455
650.9892090224489770.02158195510204580.0107909775510229
660.988401552160470.02319689567905970.0115984478395299
670.9888582113465090.02228357730698210.0111417886534910
680.9900785657008640.01984286859827220.0099214342991361
690.9896728274045840.02065434519083130.0103271725954156
700.9866114841021730.02677703179565450.0133885158978273
710.9862372399554730.02752552008905350.0137627600445268
720.9816028104803180.03679437903936410.0183971895196820
730.9781144551958210.04377108960835720.0218855448041786
740.9876114960706630.02477700785867410.0123885039293370
750.9839452139048820.03210957219023570.0160547860951178
760.9811482519723440.03770349605531190.0188517480276559
770.9748979562271220.0502040875457550.0251020437728775
780.9669834339911520.06603313201769570.0330165660088478
790.9778840268452330.04423194630953450.0221159731547673
800.9758805335952920.04823893280941670.0241194664047083
810.9812934879876660.03741302402466820.0187065120123341
820.981948902557110.03610219488578080.0180510974428904
830.9762812733953850.047437453209230.023718726604615
840.9714319579320840.05713608413583120.0285680420679156
850.9918752214871540.01624955702569200.00812477851284599
860.9888869612938480.02222607741230350.0111130387061517
870.9849343657535680.03013126849286440.0150656342464322
880.9798891612749920.04022167745001520.0201108387250076
890.9745932030637460.05081359387250740.0254067969362537
900.9668617072900540.06627658541989180.0331382927099459
910.9593457546060740.08130849078785140.0406542453939257
920.9808522651709150.03829546965817070.0191477348290854
930.9747493995132170.05050120097356510.0252506004867826
940.9691450396364850.06170992072702980.0308549603635149
950.9600236245646880.07995275087062350.0399763754353118
960.9480110014039370.1039779971921260.0519889985960632
970.9511565755469180.09768684890616450.0488434244530823
980.937678192372410.1246436152551830.0623218076275913
990.9349795788342140.1300408423315730.0650204211657863
1000.9192020670838820.1615958658322360.080797932916118
1010.9054332731017150.1891334537965710.0945667268982853
1020.8858673521150160.2282652957699670.114132647884984
1030.9112457164125420.1775085671749150.0887542835874575
1040.941138907021940.1177221859561220.058861092978061
1050.9418202883484240.1163594233031520.0581797116515760
1060.924314930224090.1513701395518180.0756850697759092
1070.9182159677559640.1635680644880720.0817840322440358
1080.9250448879845050.1499102240309900.0749551120154952
1090.9165666257495960.1668667485008080.0834333742504041
1100.9052093887736410.1895812224527170.0947906112263585
1110.8845545052820010.2308909894359970.115445494717999
1120.8830947170461940.2338105659076130.116905282953806
1130.8528017073331060.2943965853337880.147198292666894
1140.8202025407975020.3595949184049970.179797459202498
1150.7803039923531680.4393920152936640.219696007646832
1160.7739979863640780.4520040272718430.226002013635922
1170.7838540939065390.4322918121869220.216145906093461
1180.7663660445027060.4672679109945880.233633955497294
1190.717065646059350.5658687078813010.282934353940651
1200.7904971266629210.4190057466741570.209502873337079
1210.7565319982311440.4869360035377120.243468001768856
1220.7152155086409220.5695689827181570.284784491359078
1230.7137470136486390.5725059727027230.286252986351361
1240.6588711744761720.6822576510476560.341128825523828
1250.6584475076237910.6831049847524170.341552492376209
1260.6380857816234840.7238284367530330.361914218376517
1270.573311410424490.853377179151020.42668858957551
1280.6079598199070750.784080360185850.392040180092925
1290.6017893647925520.7964212704148960.398210635207448
1300.5734541189458770.8530917621082460.426545881054123
1310.4969080032710290.9938160065420580.503091996728971
1320.4759302549179330.9518605098358650.524069745082067
1330.4725165606904250.945033121380850.527483439309575
1340.397424929262940.794849858525880.60257507073706
1350.3589823513791260.7179647027582520.641017648620874
1360.3602484434013890.7204968868027780.639751556598611
1370.2762863127323830.5525726254647660.723713687267617
1380.3388029722779890.6776059445559770.661197027722011
1390.6299649576913650.740070084617270.370035042308635
1400.7911030588471740.4177938823056520.208896941152826
1410.723701383627540.552597232744920.27629861637246
1420.6841626069634020.6316747860731970.315837393036598
1430.731337446369690.5373251072606210.268662553630311


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level350.267175572519084NOK
10% type I error level490.374045801526718NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/10mb4x1293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/10mb4x1293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/1fs731293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/1fs731293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/2qko61293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/2qko61293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/3qko61293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/3qko61293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/4qko61293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/4qko61293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/51bo91293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/51bo91293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/61bo91293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/61bo91293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/7t2nu1293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/7t2nu1293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/8t2nu1293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/8t2nu1293619307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/9mb4x1293619307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936192095ghd0cgpll8uzjz/9mb4x1293619307.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by