Home » date » 2010 » Nov » 21 »

workshop 7

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 21 Nov 2010 18:15:20 +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/21/t1290363256vo1leyp9a0gvz3o.htm/, Retrieved Sun, 21 Nov 2010 19:14:16 +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/21/t1290363256vo1leyp9a0gvz3o.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 14 13 3 12 12 8 13 5 10 15 12 16 6 9 12 7 12 6 10 10 10 11 5 12 12 7 12 3 13 15 16 18 8 12 9 11 11 4 12 12 14 14 4 6 11 6 9 4 5 11 16 14 6 12 11 11 12 6 11 15 16 11 5 14 7 12 12 4 14 11 7 13 6 12 11 13 11 4 12 10 11 12 6 11 14 15 16 6 11 10 7 9 4 7 6 9 11 4 9 11 7 13 2 11 15 14 15 7 11 11 15 10 5 12 12 7 11 4 12 14 15 13 6 11 15 17 16 6 11 9 15 15 7 8 13 14 14 5 9 13 14 14 6 12 16 8 14 4 10 13 8 8 4 10 12 14 13 7 12 14 14 15 7 8 11 8 13 4 12 9 11 11 4 11 16 16 15 6 12 12 10 15 6 7 10 8 9 5 11 13 14 13 6 11 16 16 16 7 12 14 13 13 6 9 15 5 11 3 15 5 8 12 3 11 8 10 12 4 11 11 8 12 6 11 16 13 14 7 11 17 15 14 5 15 9 6 8 4 11 9 12 13 5 12 13 16 16 6 12 10 5 13 6 9 6 15 11 6 12 12 12 14 5 12 8 8 13 4 13 14 13 13 5 11 12 14 13 5 9 11 12 12 4 9 16 16 16 6 11 8 10 15 2 11 15 15 15 8 12 7 8 12 3 12 16 16 14 6 9 14 19 12 6 11 16 14 15 6 9 9 6 12 5 12 14 13 13 5 12 11 15 12 6 12 13 7 12 5 12 15 13 13 6 14 5 4 5 2 11 15 14 13 5 12 13 13 13 5 11 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
FindingFriends[t] = + 9.9004545250637 + 0.0682003253664285Popularity[t] -0.0300954894917058KnowingPeople[t] + 0.0519923282704495Liked[t] -0.0593588957098072Celebrity[t] + 0.00368806807662014t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.90045452506370.89253711.092500
Popularity0.06820032536642850.0685030.99560.3210550.160528
KnowingPeople-0.03009548949170580.05444-0.55280.5812120.290606
Liked0.05199232827044950.0855720.60760.544380.27219
Celebrity-0.05935889570980720.138575-0.42840.669010.334505
t0.003688068076620140.0032051.15070.2516790.12584


Multiple Linear Regression - Regression Statistics
Multiple R0.154362735607863
R-squared0.0238278541443429
Adjusted R-squared-0.00871121738417924
F-TEST (value)0.732284389966589
F-TEST (DF numerator)5
F-TEST (DF denominator)150
p-value0.600311992850885
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.77800336030926
Sum Squared Residuals474.194392390652


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11310.86723355040642.13276644959356
21210.86457643864721.13542356135276
31011.0491016139579-1.04910161395786
4910.7906968403119-1.79069684031193
51010.5750643566199-0.575064356619933
61210.97614966359461.02385033640541
71310.92873879341882.07126120658119
81210.54719164170151.45280835829853
91210.82117120221361.17882879778640
10610.7374612195052-4.73746121950520
11510.5814382425974-5.58143824259739
121210.63161910159161.36838089840836
131110.76499759111480.235002408885198
141410.45481623820713.54518376179293
151410.81505759205883.18494240794123
161210.65290585806391.34709414193613
171210.58185911660831.41814088339169
181110.94593584126560.0540641587343793
191110.67235801733660.327641982663360
20710.4470384615050-3.44703846150503
21911.0746215833577-2.07462158335772
221110.94763270445000.0523672955500213
231110.50718013163650.492819868363454
241210.93118366499351.06881633500650
251210.81577533299061.18422466700939
261110.98344973226160.0165502677384013
271110.52677560314280.473224396857197
28810.900085925326-2.90008592532601
29910.8444150976928-1.84441509769282
301211.35199487023860.648005129761425
311010.8391279925932-0.839127992593212
321010.675927752576-0.675927752575995
331210.92000112792641.07999887207363
34810.9737531874425-2.97375318744246
351210.64676947977021.35323052022979
361111.0666338996155-0.0666338996154848
371210.97809360317661.02190639682337
38710.6529769255909-3.65297692559091
391110.82930345018860.170696549811428
401111.0740196044826-0.0740196044826077
411210.93497540119991.06502459880005
42911.3217197411652-2.32171974116516
431510.60511041537284.39488958462717
441110.69384958485550.306150415144482
451110.84361181659520.156388183404779
461111.0824498248765-0.0824498248765467
471111.2128650307558-0.212865030755798
481510.68921482741354.31078517258655
491110.71293270418230.287067295817722
501210.96565820485931.03434179514067
511210.93981869643411.06018130356592
52910.2657659115870-1.26576591158703
531210.98427828085851.01572171914151
541210.84291357287561.15708642712442
551311.04596724998241.95403275001756
561110.88315917783450.116840822165507
57910.8862044669675-1.88620446696745
58911.1997637255716-2.19976372557158
591111.0238653822358-0.0238653822357834
601110.99832490616000.00167509383996898
611210.80789629148491.19210370851515
621211.11053134133720.889468658662841
63910.7835476336649-1.78354763366491
641111.2300907847443-0.23009078474426
65910.9005224020880-1.90052240208799
661211.08653599882530.913464001174743
671210.71408088783891.28591911216108
681211.15429241829190.845707581708146
691211.10644163271170.893558367288261
701410.52048280922513.47951719077494
711111.1430811750831-0.143081175083081
721211.04046408191860.95953591808145
731111.0199348065162-0.019934806516174
74611.0299544952192-5.02995449521922
751010.9540645545639-0.95406455456388
761210.86746615416541.13253384583462
771310.90861627917312.09138372082693
78810.9943921650118-2.99439216501184
791211.39630955526010.603690444739895
801210.87732680599701.12267319400303
811210.85239424679921.14760575320085
82611.0341938640709-5.03419386407092
831111.2458512452293-0.245851245229341
841010.8883185734517-0.888318573451668
851211.39589834599740.604101654002578
861310.94264097513632.05735902486375
871110.87684315995910.123156840040875
88711.1954484813024-4.19544848130236
891111.2035746952401-0.203574695240149
901111.0299968566046-0.0299968566046075
911111.3656422583174-0.365642258317420
921110.95425022818280.045749771817241
931211.26948721254350.730512787456525
941011.1083568661521-1.10835686615213
951111.0652879730273-0.0652879730273464
961211.03022842628560.969771573714416
97711.0031646667175-4.00316466671746
981310.93866596863702.06133403136297
99811.0775304363036-3.07753043630363
1001211.14456207133750.855437928662482
1011111.2688962676647-0.268896267664730
1021211.28078298645430.719217013545687
1031411.30321530533582.69678469466418
1041011.3815633169908-1.38156331699080
1051010.8413265078926-0.841326507892583
1061311.30224548804711.69775451195289
1071011.0756539335376-1.07565393353757
1081111.1071518484714-0.107151848471369
1091011.0969175620865-1.09691756208653
110711.1233345522155-4.1233345522155
1111011.1299859039360-1.12998590393603
112810.9408777092139-2.9408777092139
1131211.17648826356750.823511736432454
1141211.30818902733410.691810972665884
1151211.40280634282950.597193657170487
1161111.3698779964581-0.369877996458058
1171211.37356606453470.626433935465322
1181211.32081009927030.67918990072971
1191211.21444606046340.785553939536644
1201111.3231537318938-0.323153731893808
1211211.24243347750800.757566522491979
1221111.1507890143704-0.150789014370418
1231111.0153024524002-0.0153024524002152
1241311.16468607548001.83531392451997
1251211.37297511965590.627024880344067
1261211.4340801874020.565919812598001
1271211.39571361042220.604286389577836
1281211.05924569414960.94075430585037
129811.2565621082986-3.25656210829861
130810.4426654697824-2.44266546978236
1311211.41046588272860.589534117271355
1321111.3688854110305-0.368885411030514
1331211.42664858647280.573351413527223
1341311.37394104248351.62605895751650
1351211.40184645403910.598153545960882
1361211.38804096713240.61195903286756
1371111.2808312858425-0.280831285842518
1381210.94140008592611.05859991407393
1391211.68120137709840.318798622901650
1401011.2449492245410-1.24494922454103
1411111.1958128810736-0.195812881073601
1421211.26116679035090.738833209649104
1431211.62395795712090.376042042879113
1441010.7507024228948-0.750702422894835
1451211.39113809033030.608861909669684
1461311.32028065320471.6797193467953
1471211.17853733656190.821462663438104
1481511.10059106149013.89940893850992
1491111.3631929386367-0.363192938636682
1501211.48873782689740.511262173102611
1511111.2431991580436-0.243199158043632
1521211.51717871855580.482821281444231
1531111.1941448200652-0.194144820065248
1541011.4858072398906-1.48580723989063
1551111.2733273441725-0.273327344172487
1561111.5723214693715-0.572321469371496


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.3395671070572350.679134214114470.660432892942765
100.2049894134155760.4099788268311520.795010586584424
110.9021846686041270.1956306627917470.0978153313958733
120.989712130600950.02057573879810060.0102878693990503
130.9922117465458880.01557650690822320.00778825345411158
140.9959919288860740.008016142227851460.00400807111392573
150.9971437136327730.005712572734454730.00285628636722737
160.9950187024066480.009962595186703020.00498129759335151
170.9920849000950780.01583019980984470.00791509990492237
180.992406983699170.01518603260166010.00759301630083003
190.9874208938906230.02515821221875380.0125791061093769
200.9983391292075520.003321741584896280.00166087079244814
210.998845752463610.002308495072778160.00115424753638908
220.997994533867130.004010932265741440.00200546613287072
230.9968344898363170.006331020327365460.00316551016368273
240.9959534752025280.008093049594944710.00404652479747236
250.9941743968395070.01165120632098630.00582560316049316
260.9913755381821240.01724892363575150.00862446181787577
270.987098534185470.02580293162906040.0129014658145302
280.991899368827080.01620126234584140.00810063117292069
290.9905922265222570.01881554695548670.00940777347774336
300.9877378572858630.02452428542827440.0122621427141372
310.9825723967250270.0348552065499460.017427603274973
320.9755112971816740.0489774056366520.024488702818326
330.9703213924055980.05935721518880360.0296786075944018
340.9760289533534680.04794209329306440.0239710466465322
350.975952190686020.04809561862796130.0240478093139807
360.9668413605203350.06631727895933050.0331586394796652
370.9612154676013170.07756906479736640.0387845323986832
380.9764074699371310.04718506012573810.0235925300628690
390.968642136816180.06271572636764190.0313578631838209
400.9578185123502010.08436297529959780.0421814876497989
410.952201708219970.0955965835600610.0477982917800305
420.953476012207460.09304797558507850.0465239877925392
430.9884397423834080.02312051523318440.0115602576165922
440.9840371376895350.03192572462092960.0159628623104648
450.9786212031649470.04275759367010570.0213787968350528
460.971700749842420.05659850031515990.0282992501575799
470.9627798480969170.07444030380616530.0372201519030827
480.9912136781614460.01757264367710810.00878632183855404
490.9882231144947840.02355377101043250.0117768855052163
500.9852394620507020.02952107589859650.0147605379492983
510.9813473420171320.0373053159657350.0186526579828675
520.9802362043648050.03952759127039040.0197637956351952
530.9754433729669880.04911325406602440.0245566270330122
540.9706609266101490.05867814677970230.0293390733898512
550.9714871912735290.05702561745294210.0285128087264710
560.9632140150769010.07357196984619710.0367859849230986
570.965278750161450.06944249967710050.0347212498385502
580.9689696852161740.06206062956765160.0310303147838258
590.9617661637378130.07646767252437360.0382338362621868
600.9507748205948770.09845035881024660.0492251794051233
610.944503227303830.1109935453923420.0554967726961708
620.935261560539760.1294768789204810.0647384394602403
630.930150712069450.1396985758610990.0698492879305494
640.912707394672650.1745852106547010.0872926053273505
650.9155051373599360.1689897252801290.0844948626400644
660.9025319797291240.1949360405417520.097468020270876
670.8965409904598420.2069180190803160.103459009540158
680.8789909104684320.2420181790631360.121009089531568
690.861779363350650.2764412732986990.138220636649349
700.9249721207362120.1500557585275760.0750278792637881
710.9068925842138860.1862148315722280.0931074157861142
720.8954218765559550.2091562468880900.104578123444045
730.8757364868065050.2485270263869900.124263513193495
740.9732046682674150.05359066346516910.0267953317325845
750.9665707999429480.06685840011410420.0334292000570521
760.9633878749408760.0732242501182490.0366121250591245
770.971809283002230.05638143399554020.0281907169977701
780.9806703363444280.03865932731114460.0193296636555723
790.9759051461710430.04818970765791330.0240948538289566
800.975563835744490.04887232851102130.0244361642555106
810.9757504509456740.0484990981086510.0242495490543255
820.9968791818002340.006241636399531120.00312081819976556
830.9955346120346880.00893077593062450.00446538796531225
840.993921490755030.01215701848994050.00607850924497023
850.992439947929810.01512010414037810.00756005207018907
860.9948571541450120.01028569170997660.0051428458549883
870.9936422863022610.01271542739547780.00635771369773889
880.9986969504485330.00260609910293380.0013030495514669
890.998099244933330.003801510133339850.00190075506666993
900.9973446501633430.00531069967331460.0026553498366573
910.9961836822433930.007632635513214050.00381631775660703
920.9946064758263350.01078704834732990.00539352417366496
930.9930495500293180.01390089994136440.0069504499706822
940.9910387028827490.01792259423450220.0089612971172511
950.9877311132930120.02453777341397540.0122688867069877
960.9876958126195060.02460837476098840.0123041873804942
970.9967512796384990.006497440723002850.00324872036150143
980.99883617351630.002327652967401710.00116382648370085
990.9995792092814570.000841581437085470.000420790718542735
1000.9994997133171560.001000573365687030.000500286682843515
1010.9992617633979720.001476473204056310.000738236602028157
1020.9989625757589260.002074848482147720.00103742424107386
1030.9994669880316670.001066023936666110.000533011968333054
1040.9992282330303140.001543533939372670.000771766969686336
1050.9988910771601610.002217845679677910.00110892283983896
1060.9989144374846350.002171125030730290.00108556251536514
1070.9983587883339010.003282423332197760.00164121166609888
1080.9974728534904340.005054293019131320.00252714650956566
1090.9963179141911230.007364171617754070.00368208580887703
1100.9998270602534540.0003458794930915140.000172939746545757
1110.9998107991368280.000378401726344810.000189200863172405
1120.9999886385514622.27228970768488e-051.13614485384244e-05
1130.9999809117564653.81764870706583e-051.90882435353291e-05
1140.999964971633817.00567323781508e-053.50283661890754e-05
1150.9999377767880620.0001244464238752256.22232119376127e-05
1160.9998927438153540.0002145123692915640.000107256184645782
1170.9998190969121020.0003618061757957430.000180903087897872
1180.9997064955941460.0005870088117087920.000293504405854396
1190.999495497218340.001009005563319600.000504502781659801
1200.9991328210425620.001734357914875490.000867178957437744
1210.9987300198086950.00253996038261010.00126998019130505
1220.997844929765320.004310140469361230.00215507023468062
1230.9964464888453420.007107022309316870.00355351115465844
1240.996185706777530.007628586444938150.00381429322246907
1250.9946748346371630.01065033072567410.00532516536283704
1260.992340866103130.01531826779374090.00765913389687046
1270.9878278637327580.02434427253448430.0121721362672422
1280.9830331591110040.03393368177799180.0169668408889959
1290.9992272257922480.001545548415504080.00077277420775204
1300.9994956453560460.001008709287908680.000504354643954341
1310.999106396633190.001787206733621460.00089360336681073
1320.9983827984057570.003234403188485120.00161720159424256
1330.9980121772440920.003975645511816060.00198782275590803
1340.9963856216694670.00722875666106570.00361437833053285
1350.9932095282185430.01358094356291450.00679047178145724
1360.987973652602930.02405269479413880.0120263473970694
1370.9825718348371740.03485633032565240.0174281651628262
1380.9693139890477680.06137202190446440.0306860109522322
1390.9619204002630930.07615919947381490.0380795997369075
1400.9842749844692640.03145003106147150.0157250155307357
1410.9789130051861020.04217398962779650.0210869948138982
1420.964632523590580.07073495281883830.0353674764094191
1430.9373160569229940.1253678861540120.0626839430770062
1440.8929993240260270.2140013519479460.107000675973973
1450.8097960622229320.3804078755541370.190203937777068
1460.8448966742566760.3102066514866470.155103325743324
1470.7301605444373830.5396789111252340.269839455562617


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level480.345323741007194NOK
5% type I error level950.683453237410072NOK
10% type I error level1180.848920863309353NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/10ha8s1290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/10ha8s1290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/13is21290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/13is21290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/23is21290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/23is21290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/33is21290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/33is21290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/4e99m1290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/4e99m1290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/5e99m1290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/5e99m1290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/6pjr81290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/6pjr81290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/7pjr81290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/7pjr81290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/8ha8s1290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/8ha8s1290363307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/9ha8s1290363307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290363256vo1leyp9a0gvz3o/9ha8s1290363307.ps (open in new window)


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