Home » date » 2010 » Nov » 23 »

*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 10:29:39 +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/t1290508114aay0uj3w8xteqzo.htm/, Retrieved Tue, 23 Nov 2010 11:28:38 +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/t1290508114aay0uj3w8xteqzo.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9 13 13 14 13 3 1 1 0 9 12 12 8 13 5 1 0 0 9 15 10 12 16 6 0 0 0 9 12 9 7 12 6 2 0 1 9 10 10 10 11 5 0 1 2 9 12 12 7 12 3 0 0 1 9 15 13 16 18 8 1 1 1 9 9 12 11 11 4 1 0 0 9 12 12 14 14 4 4 0 0 9 11 6 6 9 4 0 0 0 9 11 5 16 14 6 0 2 1 9 11 12 11 12 6 2 0 0 9 15 11 16 11 5 0 2 2 9 7 14 12 12 4 1 1 1 9 11 14 7 13 6 0 1 0 9 11 12 13 11 4 0 0 1 9 10 12 11 12 6 1 1 0 9 14 11 15 16 6 2 0 1 9 10 11 7 9 4 1 0 0 9 6 7 9 11 4 1 0 0 9 11 9 7 13 2 0 1 1 9 15 11 14 15 7 1 2 0 9 11 11 15 10 5 1 2 1 9 12 12 7 11 4 2 0 0 9 14 12 15 13 6 1 0 0 9 15 11 17 16 6 1 1 0 9 9 11 15 15 7 1 1 0 9 13 8 14 14 5 2 2 0 9 13 9 14 14 6 0 0 2 9 16 12 8 14 4 1 1 1 9 13 10 8 8 4 0 1 2 9 12 10 14 13 7 1 1 1 9 14 12 14 15 7 1 2 1 9 11 8 8 13 4 0 2 0 9 9 12 11 11 4 1 1 0 9 16 11 16 15 6 2 2 0 9 12 12 10 15 6 1 1 1 9 10 7 8 9 5 1 1 2 9 13 11 14 13 6 1 0 1 9 16 11 16 16 7 1 3 1 9 14 12 13 13 6 0 1 2 9 15 9 5 11 3 1 0 0 9 5 15 8 12 3 1 0 0 9 8 11 10 12 4 1 0 0 9 11 11 8 12 6 0 1 1 9 16 11 13 14 7 2 0 1 9 1 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.291123164546304 -0.051135977177163month[t] + 0.100278815914937FindingFriends[t] + 0.21189969527471KnowingPeople[t] + 0.384406986575043Liked[t] + 0.591650456104063Celebrity[t] + 0.312334530791982bestfriend[t] -0.0295870251376915secondbestfriend[t] + 0.409233788979356thirdbestfriend[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.2911231645463043.5635910.08170.9350010.467501
month-0.0511359771771630.35484-0.14410.8856110.442805
FindingFriends0.1002788159149370.0970161.03360.3030070.151504
KnowingPeople0.211899695274710.0638393.31930.0011380.000569
Liked0.3844069865750430.0986793.89550.0001487.4e-05
Celebrity0.5916504561040630.1561153.78980.0002190.00011
bestfriend0.3123345307919820.2105761.48320.1401520.070076
secondbestfriend-0.02958702513769150.201438-0.14690.8834290.441714
thirdbestfriend0.4092337889793560.2137521.91450.0574960.028748


Multiple Linear Regression - Regression Statistics
Multiple R0.718941993490984
R-squared0.51687759000479
Adjusted R-squared0.490585213950629
F-TEST (value)19.6588390847615
F-TEST (DF numerator)8
F-TEST (DF denominator)147
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.09596780395353
Sum Squared Residuals645.78291217584


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.1561094101341.843890589866
21210.99732035991661.00267964008339
31513.07689839422281.92310160577722
41211.41339600619740.586603993802553
51010.9282941675151-0.92829416751511
6129.31461202404612.6853879759539
71516.8694298030583-1.86942980305829
8910.2725550164866-1.27255501648659
91212.9984786544118-0.998478654411791
10117.530235140681353.46976485931865
111113.0043488613008-2.00434886130083
121112.1525974460617-1.15259744606174
131512.27038412994062.72961587005939
14711.4490660940079-4.44906609400788
151111.2357071966462-0.235707196646161
161110.79325366522340.206746334776617
171011.8106758901321-1.81067589013207
181414.8467791465252-0.846779146525167
19108.555863446322731.44413655367727
2069.34736154636249-3.34736154636249
21118.776945081634582.22305491836542
221514.06138055073280.938619449267243
231111.5771781899035-0.577178189903485
24129.737290766179732.26270923382027
251413.07226868294360.927731317056361
261514.51942319216560.480576807834443
27914.3028672711452-5.30286727114516
281312.50517073499680.494829265003239
291313.4500725736659-0.450072573665891
301611.16972365422934.83027634577075
31138.75962336113654.2403766388635
321213.6311085757848-1.63110857578478
331414.5708931556271-0.57089315562705
34119.633046059085431.36695394091457
35910.2429679913489-1.2429679913489
361614.20586401597011.7941359840299
371213.1612309435618-1.16123094356184
38109.747178886862770.252821113137227
391313.1693239607333-0.169323960733348
401615.24923369169890.750766308301116
411413.12501531442330.874984685576742
42158.108669940989456.89133005901054
4359.73044890887825-4.73044890887825
44810.344783491872-2.34478349187199
451111.1715972465804-0.171597246580374
461614.24581623892971.75418376107027
471714.28333345286632.71666654713366
4898.048337497340740.95166250265926
49911.4323057943085-2.43230579430853
501314.8466231269228-1.84662312692283
511010.9236847050589-0.92368470505885
52612.0403434699607-6.04034346996074
531211.88740457166080.112595428339184
54810.4729821368622-2.47298213686223
551411.84476312141312.15523687858689
561212.9277332433333-0.927733243333258
571111.0230223205811-0.023022320581098
581614.09355509579581.9064449042042
59810.2043935119364-2.20439351193644
601514.56063424441780.439365755582233
6179.0661419531643-2.0661419531643
621613.87059986813282.12940013186717
631412.84156649661581.15843350338421
641613.57466742591432.42533257408571
65910.1872012965741-1.18720129657414
661412.3180173899051.68198261009502
671113.2318077556377-2.23180775563771
681310.34987770088972.65012229911031
691512.9473930539212.05260694607897
7055.76127050334993-0.761270503349932
711512.87659726615612.1234027338439
721311.91692178369991.08307821630008
731112.9968137479744-1.99681374797437
741114.0952478000063-3.09524780000629
751212.1930141708868-0.193014170886773
761213.4007794696081-1.40077946960814
771212.7519219616863-0.75192196168631
781212.0811136174823-0.0811136174822851
791411.05127544400242.94872455599759
8067.97861965072775-1.97861965072775
8179.41630568885596-2.41630568885596
821412.6155692585781.38443074142198
831414.0003351977312-0.000335197731220629
841010.967331825021-0.967331825020966
85139.367446459716113.63255354028389
861212.4136399800742-0.413639980074222
8799.07144712585763-0.0714471258576255
881212.3554364093057-0.355436409305706
891615.07030286891440.929697131085605
901010.8033161391915-0.80331613919145
911412.98498934806541.01501065193457
921013.6455152362939-3.64551523629387
931614.98604199964471.01395800035532
941513.31522227486561.6847777251344
951211.47684442991530.523155570084741
96109.273385422693320.726614577306685
97810.2857412363574-2.28574123635736
9888.46845460630873-0.468454606308727
991112.5556942387404-1.55569423874035
1001312.99200150262630.00799849737365126
1011615.87840524905120.121594750948831
1021615.17047768784160.829522312158356
1031415.6644239192084-1.66442391920836
104118.9939389859272.006061014073
10547.37908943075277-3.37908943075277
1061414.6811824228954-0.681182422895407
107910.5776716883672-1.57767168836724
1081415.2526155390514-1.25261553905141
109810.0286106598962-2.02861065989624
110810.4919319595558-2.49193195955582
1111111.9776325185835-0.977632518583453
1121213.2116678982108-1.21166789821079
1131111.0136006127768-0.0136006127768161
1141413.02422573243750.975774267562531
1151514.41305254142580.586947458574173
1161613.37610868680622.62389131319384
1171612.88130546627483.11869453372517
1181112.6614687734309-1.66146877343094
1191413.38409084997810.615909150021873
1201411.02978143603622.97021856396378
1211211.58177947157590.418220528424114
1221413.07206297859320.92793702140677
123810.8410413471034-2.84104134710344
1241314.2946990610775-1.29469906107748
1251614.53634180109221.46365819890779
1261210.59445744797311.40554255202691
1271615.86732320219640.132676797803643
1281212.7087981749745-0.708798174974494
1291111.3236884710665-0.323688471066468
13045.75762186245885-1.75762186245885
1311616.120483682713-0.120483682712955
1321513.10362238198611.89637761801388
1331011.1658333304308-1.16583333043084
1341314.3080532885827-1.30805328858272
1351512.61023172072472.38976827927527
1361210.22451206598041.77548793401958
1371412.90416527022151.09583472977847
138710.4379749603298-3.43797496032983
1391913.76035965377895.23964034622113
1401213.0934132037665-1.09341320376652
1411211.94945267291810.0505473270818767
1421313.2609522301165-0.260952230116492
1431512.46681852721682.53318147278321
14488.98814186294263-0.988141862942632
1451211.18756710616420.812432893835842
1461010.4485933177299-0.448593317729932
147811.3305913693145-3.33059136931449
1481014.343943607178-4.34394360717797
1491514.23872889147260.761271108527371
1501614.02521397450861.97478602549143
1511313.2564520239731-0.256452023973137
1521615.048751627250.951248372750044
15399.76941328862813-0.76941328862813
1541413.36292375024190.637076249758086
1551413.42576229161480.574237708385211
1561210.06147324577381.9385267542262


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.2678513345002980.5357026690005960.732148665499702
130.7315296066593030.5369407866813930.268470393340697
140.9142176081100610.1715647837798780.085782391889939
150.866476907794970.2670461844100620.133523092205031
160.809325610501750.38134877899650.19067438949825
170.7396762307510420.5206475384979160.260323769248958
180.653738513018350.6925229739633010.346261486981651
190.573567683470480.8528646330590410.426432316529521
200.7980922531473420.4038154937053150.201907746852658
210.7415994501696420.5168010996607160.258400549830358
220.7398475105646750.5203049788706490.260152489435325
230.6738257356869070.6523485286261860.326174264313093
240.6681044889121870.6637910221756250.331895511087813
250.6320021330011760.7359957339976480.367997866998824
260.5711288379068880.8577423241862240.428871162093112
270.782043545414310.4359129091713820.217956454585691
280.7413396378251310.5173207243497380.258660362174869
290.6832311636062740.6335376727874520.316768836393726
300.789418428423550.4211631431529020.210581571576451
310.8471088776428080.3057822447143840.152891122357192
320.8128608530515020.3742782938969960.187139146948498
330.7686127680653280.4627744638693440.231387231934672
340.7318356037058840.5363287925882320.268164396294116
350.7063677593318490.5872644813363020.293632240668151
360.7354872440465770.5290255119068460.264512755953423
370.7124346299322560.5751307401354870.287565370067744
380.6666289978551470.6667420042897060.333371002144853
390.6176513638903460.7646972722193090.382348636109654
400.5752149597017560.8495700805964870.424785040298244
410.5279938500366240.9440122999267520.472006149963376
420.8612217805111660.2775564389776690.138778219488834
430.9665833104382970.06683337912340670.0334166895617033
440.968195765983340.06360846803331910.0318042340166595
450.9592560479330490.08148790413390260.0407439520669513
460.9647205182928330.07055896341433380.0352794817071669
470.9717868031831930.05642639363361430.0282131968168071
480.9683609925129390.06327801497412310.0316390074870615
490.9646124249083230.0707751501833530.0353875750916765
500.9555286995619040.0889426008761920.044471300438096
510.9493328443042320.1013343113915360.050667155695768
520.9900909833618450.01981803327631050.00990901663815526
530.9864360035328250.02712799293434940.0135639964671747
540.9910223060725720.01795538785485610.00897769392742805
550.9930041335620150.01399173287596960.0069958664379848
560.9908837337966130.01823253240677330.00911626620338664
570.9874740424208530.0250519151582930.0125259575791465
580.9871492056746050.025701588650790.012850794325395
590.990200165216620.01959966956675950.00979983478337977
600.9890189551237470.02196208975250510.0109810448762525
610.9888637299079210.0222725401841580.011136270092079
620.990426082140180.01914783571963880.00957391785981941
630.9888803808176050.02223923836479010.0111196191823951
640.9892955367363910.02140892652721710.0107044632636085
650.9887657389000370.02246852219992590.0112342610999629
660.986713682394570.02657263521086190.0132863176054309
670.9884284032135690.02314319357286280.0115715967864314
680.9898264183192030.02034716336159330.0101735816807967
690.9892063818901250.0215872362197510.0107936181098755
700.9863757381272550.02724852374549080.0136242618727454
710.9864624439497350.02707511210052940.0135375560502647
720.9829212683772070.03415746324558640.0170787316227932
730.9841504936372290.03169901272554310.0158495063627715
740.9894996134871930.02100077302561480.0105003865128074
750.9859931529239940.02801369415201240.0140068470760062
760.9837312215888440.03253755682231210.016268778411156
770.9790275260196430.04194494796071390.020972473980357
780.9727438300408540.05451233991829290.0272561699591464
790.9789046939270370.04219061214592570.0210953060729628
800.9786668339147240.04266633217055130.0213331660852756
810.9802987951330930.03940240973381480.0197012048669074
820.9780726521365580.04385469572688330.0219273478634417
830.9708758887860570.05824822242788550.0291241112139427
840.9636129145806250.07277417083875030.0363870854193751
850.9844686979080290.03106260418394270.0155313020919714
860.9795301760248670.04093964795026580.0204698239751329
870.97294176953030.05411646093939830.0270582304696992
880.965318818305440.0693623633891190.0346811816945595
890.9565035496042840.08699290079143150.0434964503957157
900.9456790051839530.1086419896320940.0543209948160472
910.9360495390388550.127900921922290.063950460961145
920.9631666497959860.07366670040802810.036833350204014
930.9539761038777340.09204779224453270.0460238961222664
940.948960354309090.1020792913818180.0510396456909092
950.9363909376317440.1272181247365130.0636090623682565
960.9214250050037870.1571499899924260.078574994996213
970.917424809309990.1651503813800190.0825751906900093
980.897594806931740.204810386136520.10240519306826
990.888133783090760.223732433818480.11186621690924
1000.861792857181190.2764142856376210.13820714281881
1010.8326256718965510.3347486562068980.167374328103449
1020.8018491369719120.3963017260561750.198150863028088
1030.8302503461986410.3394993076027180.169749653801359
1040.8725282875519130.2549434248961730.127471712448087
1050.8794083399137980.2411833201724040.120591660086202
1060.8524915602195260.2950168795609490.147508439780474
1070.828686556519090.3426268869618210.17131344348091
1080.8225860546060130.3548278907879750.177413945393988
1090.8125769717782450.3748460564435110.187423028221755
1100.8347472123309770.3305055753380460.165252787669023
1110.8205409284868470.3589181430263070.179459071513153
1120.8675319755252580.2649360489494850.132468024474742
1130.8344548966231930.3310902067536140.165545103376807
1140.8010761977835760.3978476044328490.198923802216425
1150.7600172246084930.4799655507830150.239982775391507
1160.7723196136389310.4553607727221380.227680386361069
1170.7820839599817420.4358320800365170.217916040018258
1180.7622000186412860.4755999627174280.237799981358714
1190.7165573747786840.5668852504426320.283442625221316
1200.8021962436530250.3956075126939490.197803756346975
1210.7680665521219130.4638668957561740.231933447878087
1220.7181076494505740.5637847010988530.281892350549426
1230.7167784968328570.5664430063342860.283221503167143
1240.6819367150583890.6361265698832210.318063284941611
1250.6551771566105580.6896456867788850.344822843389442
1260.6366249755225140.7267500489549720.363375024477486
1270.5703123004906670.8593753990186670.429687699509333
1280.552937924830730.8941241503385390.447062075169269
1290.5415609757494840.9168780485010330.458439024250516
1300.5273171683015340.9453656633969330.472682831698466
1310.4582107475922250.916421495184450.541789252407775
1320.4275904170900050.855180834180010.572409582909995
1330.3913229988154910.7826459976309810.608677001184509
1340.3463124146818660.6926248293637310.653687585318134
1350.2987739248101230.5975478496202450.701226075189877
1360.2741180170187510.5482360340375030.725881982981249
1370.2413305637247190.4826611274494380.758669436275281
1380.2642179808010540.5284359616021080.735782019198946
1390.6435463020351740.7129073959296520.356453697964826
1400.6332558716228390.7334882567543220.366744128377161
1410.5260238330694670.9479523338610660.473976166930533
1420.512125676302660.975748647394680.48787432369734
1430.3780826783545190.7561653567090380.621917321645481
1440.2578906186196720.5157812372393430.742109381380328


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/1czby1290508166.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/1czby1290508166.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/2czby1290508166.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/2czby1290508166.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/3nqs11290508166.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/3nqs11290508166.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/78qq71290508166.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/78qq71290508166.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/88qq71290508166.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/88qq71290508166.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/98qq71290508166.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290508114aay0uj3w8xteqzo/98qq71290508166.ps (open in new window)


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