Home » date » 2010 » Nov » 23 »

WS7 - Multiple regression model (incl. day)

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 20:47:17 +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/23/t1290545138l23luvup4fvrwu8.htm/, Retrieved Tue, 23 Nov 2010 21:45:49 +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/23/t1290545138l23luvup4fvrwu8.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 2 1 12 12 8 13 5 1 1 15 10 12 16 6 0 1 12 9 7 12 6 3 1 10 10 10 11 5 3 1 12 12 7 12 3 1 1 15 13 16 18 8 3 1 9 12 11 11 4 1 1 12 12 14 14 4 4 1 11 6 6 9 4 0 1 11 5 16 14 6 3 1 11 12 11 12 6 2 1 15 11 16 11 5 4 1 7 14 12 12 4 3 1 11 14 7 13 6 1 1 11 12 13 11 4 1 1 10 12 11 12 6 2 1 14 11 15 16 6 3 1 10 11 7 9 4 1 2 6 7 9 11 4 1 2 11 9 7 13 2 2 2 15 11 14 15 7 3 2 11 11 15 10 5 4 2 12 12 7 11 4 2 2 14 12 15 13 6 1 2 15 11 17 16 6 2 2 9 11 15 15 7 2 2 13 8 14 14 5 4 2 13 9 14 14 6 2 2 16 12 8 14 4 3 2 13 10 8 8 4 3 2 12 10 14 13 7 3 2 14 12 14 15 7 4 2 11 8 8 13 4 2 3 9 12 11 11 4 2 3 16 11 16 15 6 4 3 12 12 10 15 6 3 3 10 7 8 9 5 4 3 13 11 14 13 6 2 3 16 11 16 16 7 5 3 14 12 13 13 6 3 3 15 9 5 11 3 1 3 5 15 8 12 3 1 3 8 11 10 12 4 1 3 11 11 8 12 6 2 3 16 11 13 14 7 3 3 17 11 15 14 5 9 3 9 15 6 8 4 0 3 9 11 12 13 5 0 3 13 12 16 16 6 2 3 10 12 5 13 6 2 3 6 9 15 11 6 3 4 12 12 12 14 5 1 4 8 12 8 13 4 2 4 14 13 13 13 5 0 4 12 11 14 13 5 5 4 11 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 time13 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.0341957712676926 + 0.106302633229405FindingFriends[t] + 0.211443525990832KnowingPeople[t] + 0.357643540447476Liked[t] + 0.606004881194799Celebrity[t] + 0.212601130536282Sum_friends[t] + 4.11173334192181e-05Day[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.03419577126769261.4333610.02390.9809990.490499
FindingFriends0.1063026332294050.0959391.1080.2696350.134818
KnowingPeople0.2114435259908320.0638483.31170.0011640.000582
Liked0.3576435404474760.0971473.68150.0003240.000162
Celebrity0.6060048811947990.1559563.88570.0001537.7e-05
Sum_friends0.2126011305362820.120441.76520.0795770.039789
Day4.11173334192181e-050.0625297e-040.9994760.499738


Multiple Linear Regression - Regression Statistics
Multiple R0.713764529068043
R-squared0.509459802955726
Adjusted R-squared0.489706506430453
F-TEST (value)25.7911281949275
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.09777472945348
Sum Squared Residuals655.698163514507


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.26896341492911.73103658507088
21210.89340825760811.10659174239192
31512.99291146711352.00708853288647
41211.03662043374890.963379566251083
51010.8136052233086-0.813605223308552
6129.112311428780192.88768857121981
71516.7226937056585-1.72269370565849
8910.2064468734908-1.20644687349084
91212.5515114644146-0.551511464414603
10117.583525232729013.41647476727099
111113.2296887156437-2.22968871564375
121111.9887013068642-0.98870130686419
131512.40117014301922.59882985698077
14711.4133414674605-4.41334146746052
151111.5005748792709-0.500574879270867
161110.62933392547250.3706660745275
171011.9887013068642-1.98870130686419
181414.3713480699243-0.371348069924296
19108.539124172736571.46087582726343
2069.25208777269557-3.25208777269557
21118.757684436214352.24231556378565
221514.40830700201420.591692997985793
231111.8321241939143-0.832124193914347
24129.573315017397212.42668498260279
251412.97955893807211.02044106192787
261514.58167510870310.418324891296903
27914.4071493974688-5.40714939746876
281312.73234693002520.267653069974799
291313.0194521833768-0.0194521833768406
301611.07029029526674.92970970473325
31138.711823786123094.28817621387691
321213.5867172878899-1.58671728788985
331414.7272107657799-0.727210765779894
341110.07487620869880.925123791301208
35910.4191302386940-1.41913023869396
361614.43783142067081.56216857932923
371213.0628717674189-1.06287176741890
38109.569206555946850.430793444053152
391312.87445502672160.125544973278405
401615.61408097284930.385919027150671
411412.98191526449651.01808473550355
42158.012955171329676.98704482867033
4359.64274508912607-4.64274508912607
44810.2464264893849-2.24642648938491
451111.2481503303291-0.248150330329128
461613.83926105290932.16073894709068
471714.32574512571912.67425487428092
4898.182687626013020.817312373986978
49911.4203608324726-2.42036083247257
501314.4765753332751-1.47657533327509
511011.0777659260335-1.07776592603351
52612.3706484532284-6.37064845322837
531212.0969492540191-0.0969492540191498
54810.5001278589498-2.50012785894983
551411.84445074225562.15554925774437
561212.9062946544691-0.906294654469062
571110.66935052277750.330649477222532
581614.58291081199291.41708918800714
59810.5325907267437-2.53259072674373
601514.58803425225780.41196574774217
6179.111277176235-2.11127717623499
621614.18653163078611.81346836921388
631413.14886383656660.851136163433394
641613.37718209441372.62281790558632
65910.4318965090998-1.43189650909984
661412.16335037009881.83664962990121
671113.2598010239003-2.25980102390034
681310.32444454317002.67555545682996
691513.19459862969961.80540137030043
7055.79384205280933-0.793842052809333
711512.90633577180252.09366422819752
721312.58859374850480.411406251495228
731112.4170476037412-1.41704760374118
741114.1988005181039-3.19880051810387
751212.7705498372499-0.770549837249929
761213.4048845511450-1.40488455114495
771212.3360952367413-0.336095236741251
781211.95078208505090.0492179149491302
791410.85781251673073.14218748326928
8067.93738395048076-1.93738395048076
8179.71848077930866-2.71848077930866
821412.41174042041191.58825957958805
831414.1612266178126-0.161226617812591
841011.1702556285443-1.17025562854426
85139.114791107204763.88520889279524
861212.3066119354181-0.306611935418104
8799.32097683904484-0.320976839044838
881211.92431946753190.0756805324681113
891614.80187522200641.1981247779936
901010.4603085764669-0.460308576466903
911413.10173489610100.89826510389905
921013.5910230641623-3.59102306416225
931615.50790582754270.492094172457290
941513.40376392801041.59623607198961
951211.48920050964340.510799490356635
96109.359720751649150.640279248350845
97810.1223314553596-2.12233145535963
9888.71613369831802-0.716133698318018
991112.6649526787338-1.66495267873379
1001312.55915156451500.440848435484956
1011615.61304672030410.386953279695863
1021614.93881876110441.06118123889560
1031415.4034334280837-1.40343342808366
104119.047269367990561.95273063200944
10547.15689033946251-3.15689033946251
1061414.7389510554856-0.73895105548564
107910.5285727718053-1.52857277180526
1081415.2259609958669-1.22596099586693
109810.2495705251893-2.24957052518934
110810.6828675211526-2.68286752115256
1111111.8844673395606-0.884467339560597
1121213.1605588730164-1.16055887301641
1131111.0756151862763-0.0756151862762893
1141413.27216455365250.727835446347487
1151514.44957171037650.550428289623481
1161613.44486416703902.55513583296097
1171612.91336340865963.08663659134041
1181112.7851915946821-1.78519159468211
1191414.1878125873318-0.18781258733183
1201410.88207914123653.11792085876346
1211211.55862644544970.441373554550302
1221412.54645925693091.45354074306906
123810.8855519548729-2.88555195487289
1241314.0815140900250-1.08151409002495
1251613.97521145679552.02478854320445
1261210.61581031953811.38418968046187
1271615.47846364355300.521536356447018
1281212.7671633942029-0.767163394202944
1291111.4615761516564-0.461576151656406
13046.00815950095096-2.00815950095096
1311616.1162670351618-0.116267035161828
1321512.66433357460992.33566642539011
1331011.3605807017562-1.36058070175623
1341314.0185857875817-1.01858578758166
1351513.12712214374131.87287785625868
1361210.49909360640461.50090639359536
1371413.65630769302990.343692306970139
138710.3812604060591-3.38126040605911
1391913.90769385350395.09230614649612
1401212.9451989004845-0.945198900484526
1411211.87293677244450.127063227555525
1421313.3386067870656-0.338606787065571
1431512.41668184449842.58331815550164
14488.84487272228288-0.84487272228288
1451210.92317938026521.07682061973483
1461010.7602294894029-0.7602294894029
147811.2513396193895-3.2513396193895
1481014.6518040142647-4.65180401426466
1491513.86779233635411.13220766364589
1501614.06021189418181.93978810581817
1511313.2704618078049-0.270461807804946
1521615.08402564034930.915974359650727
15399.82283412352541-0.82283412352541
1541413.06100471307310.938995286926912
1551413.15506716855060.844932831449423
1561210.1742007550851.82579924491501


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.1280798671545620.2561597343091240.871920132845438
110.1487047738945520.2974095477891040.851295226105448
120.07793726609842260.1558745321968450.922062733901577
130.5662377992522580.8675244014954850.433762200747742
140.8330554465519840.3338891068960310.166944553448016
150.7631989829703910.4736020340592170.236801017029609
160.680262382528490.639475234943020.31973761747151
170.623779273990840.752441452018320.37622072600916
180.5362767334060860.9274465331878280.463723266593914
190.4510202822834590.9020405645669180.548979717716541
200.6318547919229070.7362904161541870.368145208077093
210.600749433801970.798501132396060.39925056619803
220.6396190348772650.720761930245470.360380965122735
230.5750535905619010.8498928188761980.424946409438099
240.5610791063354970.8778417873290060.438920893664503
250.5140137161932050.971972567613590.485986283806795
260.446021435028750.89204287005750.55397856497125
270.7056200850075350.588759829984930.294379914992465
280.6518615721920640.6962768556158720.348138427807936
290.5920369941375750.815926011724850.407963005862425
300.7268883311028340.5462233377943310.273111668897166
310.8103417605010730.3793164789978550.189658239498928
320.7741440881444990.4517118237110020.225855911855501
330.7272920899944340.5454158200111310.272707910005566
340.6969049858429060.6061900283141870.303095014157094
350.6930274743143280.6139450513713440.306972525685672
360.6897414245139680.6205171509720630.310258575486032
370.663192013933690.673615972132620.33680798606631
380.6144888502933770.7710222994132460.385511149706623
390.5657583755528330.8684832488943330.434241624447167
400.5224581239542390.9550837520915230.477541876045761
410.4838662013850570.9677324027701150.516133798614943
420.7845116472383910.4309767055232180.215488352761609
430.952111404830370.09577719033926120.0478885951696306
440.9563325976328020.08733480473439580.0436674023671979
450.9432977029135360.1134045941729290.0567022970864644
460.9508262798500520.09834744029989620.0491737201499481
470.950688128494580.09862374301084070.0493118715054203
480.9402432804988540.1195134390022910.0597567195011456
490.9378088497472030.1243823005055940.0621911502527971
500.926077997148780.1478440057024390.0739220028512195
510.9193336921810.1613326156380000.0806663078189998
520.986584972607550.02683005478490020.0134150273924501
530.9825938764978370.03481224700432560.0174061235021628
540.9856328792678550.02873424146428900.0143671207321445
550.9911247448812080.01775051023758370.00887525511879184
560.9882047632762930.02359047344741310.0117952367237066
570.9842023489237620.03159530215247650.0157976510762383
580.9825917311777980.03481653764440480.0174082688222024
590.9880609455281150.02387810894376930.0119390544718847
600.9870767006148690.02584659877026220.0129232993851311
610.9866736934625260.02665261307494790.0133263065374740
620.9873673993573830.02526520128523410.0126326006426171
630.9858505365024480.02829892699510390.0141494634975520
640.9891045553931540.02179088921369160.0108954446068458
650.987761731146360.02447653770728060.0122382688536403
660.9873814589380280.02523708212394310.0126185410619716
670.9874463989286570.02510720214268650.0125536010713433
680.9903601998657870.01927960026842640.0096398001342132
690.989955781392620.02008843721476100.0100442186073805
700.986860626927410.0262787461451820.013139373072591
710.987463881787760.02507223642448170.0125361182122409
720.9833716089348050.03325678213038910.0166283910651946
730.9802986265962520.03940274680749630.0197013734037482
740.98618155538760.02763688922480140.0138184446124007
750.9817395419448510.03652091611029750.0182604580551487
760.9783032247770730.04339355044585420.0216967752229271
770.9715658214287820.05686835714243530.0284341785712176
780.9629429493523550.07411410129529050.0370570506476452
790.9769704621913560.0460590756172880.023029537808644
800.9749562880944580.05008742381108440.0250437119055422
810.9774160420298470.04516791594030560.0225839579701528
820.9773586423516640.04528271529667290.0226413576483364
830.9700572495383050.05988550092338980.0299427504616949
840.9627367719924790.07452645601504210.0372632280075211
850.9888269325828230.02234613483435310.0111730674171766
860.9848921819944220.03021563601115670.0151078180055783
870.9798321424549120.04033571509017540.0201678575450877
880.9740041117370150.05199177652596920.0259958882629846
890.9693173001471670.06136539970566540.0306826998528327
900.96049215711530.07901568576940.0395078428847
910.9537813617131280.09243727657374380.0462186382868719
920.9715917772830560.05681644543388780.0284082227169439
930.9636637912626210.07267241747475760.0363362087373788
940.9604094187496070.07918116250078530.0395905812503926
950.951157655134060.09768468973187830.0488423448659391
960.9404298920709240.1191402158581520.0595701079290762
970.9337281319670630.1325437360658740.0662718680329369
980.9171463183739770.1657073632520460.082853681626023
990.9080640043752260.1838719912495470.0919359956247737
1000.8889248528611520.2221502942776960.111075147138848
1010.8646362951944980.2707274096110040.135363704805502
1020.8439869226677510.3120261546644980.156013077332249
1030.8496934075064050.3006131849871890.150306592493595
1040.8989552802539770.2020894394920470.101044719746023
1050.896686568195550.2066268636089020.103313431804451
1060.8724634428635650.2550731142728700.127536557136435
1070.8476840389679630.3046319220640740.152315961032037
1080.8401218532342370.3197562935315260.159878146765763
1090.8305268399472470.3389463201055060.169473160052753
1100.8485349710403570.3029300579192860.151465028959643
1110.8325736363273330.3348527273453340.167426363672667
1120.8759241065532210.2481517868935580.124075893446779
1130.8457392568794540.3085214862410910.154260743120546
1140.8157565892037970.3684868215924060.184243410796203
1150.7774879484253720.4450241031492570.222512051574628
1160.7811674284195420.4376651431609160.218832571580458
1170.7997765856130420.4004468287739160.200223414386958
1180.7854121413124590.4291757173750820.214587858687541
1190.7395291390649960.5209417218700070.260470860935004
1200.8114100862240540.3771798275518930.188589913775946
1210.7805727933466120.4388544133067770.219427206653388
1220.7547577345747980.4904845308504050.245242265425202
1230.7460395637952740.5079208724094520.253960436204726
1240.6993311527012790.6013376945974430.300668847298721
1250.7001036675022630.5997926649954730.299896332497737
1260.687135614960150.6257287700797010.312864385039851
1270.6278678393902220.7442643212195550.372132160609778
1280.5902877709216040.8194244581567920.409712229078396
1290.5941428410310020.8117143179379970.405857158968998
1300.5855860850351240.8288278299297520.414413914964876
1310.5170993973444650.965801205311070.482900602655535
1320.5012118516118160.9975762967763680.498788148388184
1330.4686788045386420.9373576090772840.531321195461358
1340.3985345514955790.7970691029911580.601465448504421
1350.3704257349245660.7408514698491310.629574265075434
1360.3671276785842870.7342553571685740.632872321415713
1370.2948201469901360.5896402939802720.705179853009864
1380.3662729509388230.7325459018776460.633727049061177
1390.7328671654956460.5342656690087070.267132834504354
1400.7453243834512380.5093512330975230.254675616548762
1410.6943162301609920.6113675396780160.305683769839008
1420.598068282359430.803863435281140.40193171764057
1430.5327591583961270.9344816832077450.467240841603873
1440.4102607879723070.8205215759446140.589739212027693
1450.3877643495158410.7755286990316830.612235650484159
1460.5667234466098080.8665531067803840.433276553390192


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level310.226277372262774NOK
10% type I error level480.35036496350365NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/108wo21290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/108wo21290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/16gge1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/16gge1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/26gge1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/26gge1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/36gge1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/36gge1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/4umqb1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/4umqb1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/5umqb1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/5umqb1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/6mvpe1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/6mvpe1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/7mvpe1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/7mvpe1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/8fmoz1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/8fmoz1290545223.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/9fmoz1290545223.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290545138l23luvup4fvrwu8/9fmoz1290545223.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