Home » date » 2010 » Dec » 13 »

WS10 Multiple Regression Celebrity

*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: Mon, 13 Dec 2010 09:30:41 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z.htm/, Retrieved Mon, 13 Dec 2010 10:29:35 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z.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 «
5 2 1 3 11 16 14 6 12 1 1 1 11 13 11 4 11 1 1 3 15 16 11 5 6 1 1 3 11 6 9 4 12 1 2 3 9 11 11 4 11 1 1 3 14 13 16 6 12 1 1 1 12 15 13 6 7 2 4 3 6 9 11 4 8 1 1 3 4 6 4 4 13 1 1 1 13 11 15 6 12 1 1 1 12 9 13 4 13 1 1 3 10 4 13 6 12 1 1 1 12 8 13 5 12 1 3 3 9 11 11 4 11 2 1 3 16 16 15 6 12 2 1 1 13 5 12 3 12 1 1 1 12 6 14 5 12 1 6 1 11 7 13 6 11 2 1 3 12 16 13 4 13 2 1 1 12 12 12 6 9 1 1 3 11 7 13 2 11 2 1 3 16 13 14 7 11 1 1 1 9 12 13 5 11 2 1 3 8 10 15 2 9 1 1 1 11 12 12 4 11 2 1 4 9 8 10 4 12 2 1 3 16 15 14 6 12 1 1 3 14 15 13 6 10 2 1 3 10 10 11 5 12 1 4 3 14 13 15 6 12 2 1 1 16 16 14 6 12 1 1 3 12 10 13 4 9 2 1 3 13 14 14 6 9 1 1 3 16 16 16 6 12 1 1 3 15 13 13 6 14 2 1 1 5 4 5 2 12 2 1 3 12 7 11 4 11 1 1 1 11 15 10 5 9 1 1 2 15 5 11 3 11 2 1 3 15 14 15 7 7 1 1 1 12 11 15 5 15 1 1 1 5 8 12 3 11 1 1 3 16 14 15 8 12 1 1 3 16 12 15 8 12 2 2 1 12 12 14 5 9 2 1 3 6 15 11 6 12 2 1 3 7 8 12 3 11 2 1 3 14 16 12 5 11 2 2 3 8 9 12 4 8 1 4 3 12 13 13 5 7 2 1 1 10 8 9 5 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Celebrity[t] = + 0.500464733012455 -0.026175955077005FF[t] -0.142179883084269Geslacht[t] + 0.0812069443486666Opvoeding[t] + 0.0920112671738348Huwelijksstatus[t] + 0.169119780174780Popularity[t] + 0.095325030211679KnowingPeople[t] + 0.129653715719074Liked[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.5004647330124550.8129150.61560.5391450.269572
FF-0.0261759550770050.049327-0.53070.5965060.298253
Geslacht-0.1421798830842690.18642-0.76270.4469510.223476
Opvoeding0.08120694434866660.1022560.79410.4284720.214236
Huwelijksstatus0.09201126717383480.0892661.03080.3044570.152228
Popularity0.1691197801747800.0412384.10117e-053.5e-05
KnowingPeople0.0953250302116790.0320052.97840.0034240.001712
Liked0.1296537157190740.0501542.58510.0107720.005386


Multiple Linear Regression - Regression Statistics
Multiple R0.680555914549806
R-squared0.463156352828723
Adjusted R-squared0.435925153334528
F-TEST (value)17.0082978874086
F-TEST (DF numerator)7
F-TEST (DF denominator)138
p-value4.44089209850063e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.04735303859423
Sum Squared Residuals151.378877468454


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
165.643136022705520.356863977294483
244.74312544811084-0.743125448110845
355.91577814886968-0.915778148869678
444.15762107000065-0.157621070000648
544.47946530603427-0.479465306034268
666.10895185665523-0.108951856655234
765.362202720147130.637797279852869
843.932569686084660.0674303139153404
942.273162120027811.72683787997219
1065.383153855836340.616846144163657
1144.79025253887706-0.790252538877061
1264.133234406739771.86676559326023
1354.694927508665380.305072491334618
1444.56067225038293-0.560672250382934
1566.46133290883649-0.461332908836488
1634.30623859940178-1.30623859940178
1754.63393116396110.366068836038901
1864.836517420022261.16348257997774
1945.52554635669922-1.52554635669922
2064.778218075631751.22178192436825
2124.69303309785761-2.69303309785761
2276.045704102482380.954295897517624
2354.595044244064760.404955755935236
2424.53642448616818-2.53642448616818
2544.85598199884926-0.85598199884926
2643.958636894498060.0413631055019396
2766.21017820782873-0.210178207828729
2865.884464814844360.115535185155636
2954.382225138718440.617774861281557
3066.19674301890516-0.196743018905155
3166.12148070369274-0.121480703692738
3245.06960010343641-1.06960010343641
3365.686021702323730.313978297676273
3466.78551841779384-0.785518417793842
3565.862934534595790.137065465404214
3621.898027407604330.101972592395666
3744.38213769827895-0.382137698278955
3854.830297747892140.169702252107863
3934.82754345952139-1.82754345952139
4076.101563068238350.89843693176165
4155.37108980612359-0.371089806123594
4233.30290746649183-0.302907466491834
4386.41286273149741.5871372685026
4486.196036715997041.80396328400296
4555.14490840649557-0.144908406495570
4664.208547124154721.79145287584528
4733.76151754333581-0.76151754333581
4855.7341322013297-0.734132201329705
4944.13334525314794-0.133345253147940
5055.70389984742547-0.703899847425468
5153.826772977740281.17322702225972
5265.348892708562680.651107291437319
5355.76236627331117-0.762366273311166
5466.02490002734767-0.0249000273476717
5564.686227534754291.31377246524571
5643.474378203852030.525621796147968
5786.516340492139471.48365950786053
5864.853795936912221.14620406308778
5944.06029103922966-0.0602910392296643
6065.68791611313150.3120838868685
6155.50361181277025-0.503611812770247
6255.63290585015621-0.632905850156211
6366.52885166062481-0.528851660624815
6466.20126153538483-0.201261535384834
6565.551634871336740.448365128663263
6664.419973439388311.58002656061169
6765.631248620014740.368751379985263
6865.793785459461110.206214540538888
6975.361072251352871.63892774864713
7044.09046575402852-0.0904657540285153
7144.09738051687767-0.097380516877674
7235.26764163194896-2.26764163194896
7366.51719187459246-0.517191874592462
7455.98443551988447-0.98443551988447
7555.34067243989856-0.340672439898557
7633.63103585113242-0.631035851132423
7755.50979222007334-0.509792220073337
7844.67235420006202-0.672354200062024
7934.51179141399803-1.51179141399803
8076.733166507639830.266833492360168
8143.395716999773510.604283000226489
8245.5805539400022-1.5805539400022
8355.45870715422913-0.458707154229126
8465.15002237947520.849977620524801
8523.41427387010287-1.41427387010287
8622.48188002633295-0.481880026332947
8764.866151637754241.13384836224576
8843.482169978776460.517830021223539
8954.919267489921750.0807325100782491
9065.312602074013780.687397925986222
9176.522968018215160.477031981784844
9286.155045447186631.84495455281337
9366.44325204508449-0.443252045084487
9465.236896267700720.763103732299276
9534.52589516893009-1.52589516893009
9676.644469003503840.355530996496159
9734.38419581518341-1.38419581518341
9865.806103335382340.19389666461766
9944.20635533480116-0.206355334801164
10044.83766036264688-0.837660362646881
10164.60635250219621.39364749780380
10266.36441596012699-0.364415960126991
10363.860039309678412.13996069032159
10445.68508287943125-1.68508287943125
10575.466906540455161.53309345954484
10655.27313600955807-0.273136009558073
10776.390000539458240.609999460541762
10844.36343797205832-0.363437972058323
10965.584631645053550.41536835494645
11066.21463908520302-0.214639085203021
11165.118796485889370.881203514110628
11255.11104801913938-0.111048019139377
11355.13483785928873-0.134837859288726
11465.546225254494810.453774745505195
11575.455545899111551.54445410088845
11645.16880954613532-1.16880954613532
11745.26025016385977-1.26025016385977
11885.770624855866192.22937514413381
11965.462173425187240.537826574812759
12034.39110407426271-1.39110407426271
12144.69577398779247-0.69577398779247
12254.56536123338580.434638766614204
12354.189944754948740.810055245051261
12465.850408367230590.149591632769408
12586.771002248749191.22899775125081
12625.21793921444517-3.21793921444517
12743.963440804663280.0365591953367169
12876.237777595890.762222404110003
12954.12981479157730.870185208422704
13065.543482140906350.456517859093653
13166.25703306070132-0.257033060701320
13245.34684331908169-1.34684331908169
13355.52545891625973-0.525458916259732
13465.721216769163960.278783230836037
13565.82297676602020.177023233979802
13665.675957915543380.324042084456617
13765.851114670138710.148885329861289
13855.47707617936013-0.477076179360131
13955.00573897156748-0.00573897156747614
14066.80534861280874-0.805348612808742
14144.59597189217495-0.595971892174952
14264.254735392028461.74526460797154
14334.1963000431308-1.19630004313080
14464.548476627965641.45152337203436
14586.516340492139471.48365950786053
14646.34722071196469-2.34722071196469


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.4770267028548340.9540534057096670.522973297145166
120.4078666918514860.8157333837029710.592133308148514
130.2699252323722580.5398504647445160.730074767627742
140.1666546626338630.3333093252677260.833345337366137
150.0991006519856310.1982013039712620.900899348014369
160.1048990179569240.2097980359138490.895100982043076
170.06224348761588560.1244869752317710.937756512384114
180.2858984247356980.5717968494713960.714101575264302
190.2481050458498330.4962100916996660.751894954150167
200.4549234223303660.9098468446607320.545076577669634
210.8356157552730620.3287684894538770.164384244726938
220.8818224204032150.2363551591935710.118177579596785
230.8414212670523710.3171574658952570.158578732947629
240.9326406101009320.1347187797981360.0673593898990681
250.9235351372891820.1529297254216370.0764648627108185
260.8967293704680120.2065412590639760.103270629531988
270.8636027791941530.2727944416116950.136397220805848
280.8264618498649640.3470763002700730.173538150135037
290.8015265959403630.3969468081192740.198473404059637
300.7529883073171860.4940233853656280.247011692682814
310.6994350829076440.6011298341847130.300564917092356
320.6769601017767240.6460797964465520.323039898223276
330.646989331156860.706021337686280.35301066884314
340.5973122259290270.8053755481419450.402687774070973
350.5414682563685480.9170634872629040.458531743631452
360.5067011034977130.9865977930045750.493298896502287
370.4530234216357160.9060468432714330.546976578364283
380.3953975462169090.7907950924338170.604602453783091
390.4943931268307780.9887862536615560.505606873169222
400.5080234337981230.9839531324037550.491976566201877
410.4553108596068340.9106217192136680.544689140393166
420.4040092673887040.8080185347774080.595990732611296
430.5106370089130520.9787259821738950.489362991086948
440.6232175167606510.7535649664786980.376782483239349
450.5701594404205980.8596811191588030.429840559579402
460.6675308137892520.6649383724214970.332469186210748
470.63729521868070.72540956263860.3627047813193
480.6164034473224090.7671931053551810.383596552677591
490.5645161492107350.870967701578530.435483850789265
500.5374140854465950.925171829106810.462585914553405
510.5502961896144320.8994076207711360.449703810385568
520.5140315302809310.9719369394381380.485968469719069
530.4821381764502830.9642763529005660.517861823549717
540.4331166008517990.8662332017035990.566883399148201
550.4615832038047970.9231664076095940.538416796195203
560.4275911029865890.8551822059731780.572408897013411
570.4831161472344890.9662322944689780.516883852765511
580.498658999906890.997317999813780.50134100009311
590.447661085310140.895322170620280.55233891468986
600.4009523025077310.8019046050154620.599047697492269
610.3636327312986640.7272654625973280.636367268701336
620.3318404757266080.6636809514532150.668159524273392
630.2981914802598360.5963829605196710.701808519740164
640.257704236196920.515408472393840.74229576380308
650.2243469304658470.4486938609316930.775653069534153
660.2780294952975160.5560589905950320.721970504702484
670.2477637295762890.4955274591525780.752236270423711
680.2115838181571610.4231676363143220.788416181842839
690.2603980194267450.5207960388534910.739601980573255
700.2258785635985480.4517571271970950.774121436401452
710.1910378310599030.3820756621198060.808962168940097
720.3337834241389060.6675668482778120.666216575861094
730.3032991436993230.6065982873986470.696700856300677
740.2970098925464930.5940197850929850.702990107453507
750.2580164896621580.5160329793243170.741983510337842
760.2326432550316010.4652865100632020.767356744968399
770.2028529688968180.4057059377936370.797147031103182
780.1881669546997540.3763339093995090.811833045300246
790.2257883186711880.4515766373423760.774211681328812
800.1925202280571530.3850404561143060.807479771942847
810.1728303121360270.3456606242720540.827169687863973
820.2071448222384330.4142896444768660.792855177761567
830.1844081709955820.3688163419911650.815591829004418
840.1792288462616830.3584576925233670.820771153738317
850.1918644561599640.3837289123199280.808135543840036
860.1638507075248880.3277014150497770.836149292475112
870.1717785500832590.3435571001665170.828221449916741
880.1511385304078310.3022770608156620.848861469592169
890.1236817831493960.2473635662987920.876318216850604
900.1083587732410020.2167175464820050.891641226758998
910.09106854070416540.1821370814083310.908931459295835
920.1465933806156870.2931867612313750.853406619384313
930.1226128258436830.2452256516873670.877387174156317
940.1128555618008310.2257111236016620.887144438199169
950.1307654304823170.2615308609646330.869234569517683
960.1103965456328080.2207930912656170.889603454367192
970.1282644993914410.2565289987828830.871735500608559
980.1027616653380590.2055233306761190.89723833466194
990.0817587944805390.1635175889610780.918241205519461
1000.0755080641164370.1510161282328740.924491935883563
1010.08592456466422480.1718491293284500.914075435335775
1020.06812787670457370.1362557534091470.931872123295426
1030.1171355595662660.2342711191325320.882864440433734
1040.170496713933460.340993427866920.82950328606654
1050.2438558169539830.4877116339079670.756144183046017
1060.2065493517759070.4130987035518140.793450648224093
1070.1832226154914730.3664452309829470.816777384508527
1080.1575618942060070.3151237884120130.842438105793993
1090.1305127828797660.2610255657595320.869487217120234
1100.1034040545497140.2068081090994270.896595945450286
1110.1140659171765480.2281318343530950.885934082823452
1120.09517534876196230.1903506975239250.904824651238038
1130.07564784857643050.1512956971528610.92435215142357
1140.0615319452603910.1230638905207820.938468054739609
1150.07835374394749960.1567074878949990.9216462560525
1160.07451786840304720.1490357368060940.925482131596953
1170.07939926266693480.1587985253338700.920600737333065
1180.1434018014541010.2868036029082020.856598198545899
1190.1571822144571630.3143644289143260.842817785542837
1200.1466741264916060.2933482529832120.853325873508394
1210.1149493596394280.2298987192788550.885050640360572
1220.1118482785773010.2236965571546020.888151721422699
1230.08357135592994720.1671427118598940.916428644070053
1240.05997627702987520.1199525540597500.940023722970125
1250.1003171815214630.2006343630429250.899682818478537
1260.3399179858773270.6798359717546550.660082014122673
1270.2643361499611240.5286722999222480.735663850038876
1280.2630356855935730.5260713711871460.736964314406427
1290.1972158229332360.3944316458664730.802784177066764
1300.1410662613859660.2821325227719330.858933738614034
1310.09277516789383450.1855503357876690.907224832106166
1320.1800048540999090.3600097081998180.819995145900091
1330.1525087805292390.3050175610584770.847491219470761
1340.08938023702765450.1787604740553090.910619762972345
1350.04421777176521220.08843554353042440.955782228234788


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level10.008OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/10jhs61292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/10jhs61292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/1cyvc1292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/1cyvc1292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/2n7ux1292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/2n7ux1292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/3n7ux1292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/3n7ux1292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/4n7ux1292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/4n7ux1292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/5xzci1292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/5xzci1292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/6xzci1292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/6xzci1292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/78qt31292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/78qt31292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/88qt31292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/88qt31292232630.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/9jhs61292232630.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292232556jqilguz7qqgeh3z/9jhs61292232630.ps (open in new window)


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