Home » date » 2010 » Dec » 12 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 12 Dec 2010 12:53:05 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa.htm/, Retrieved Sun, 12 Dec 2010 13:51:11 +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/12/t1292158268w6jav2wn2yvf8pa.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 «
24 14 11 24 5 3 25 11 7 25 4 2 17 6 17 30 4 4 18 12 10 19 4 2 18 8 12 22 2 4 16 10 12 22 5 2 20 10 11 25 5 3 16 11 11 23 4 4 18 16 12 17 3 1 17 11 13 21 4 2 23 13 14 19 4 2 30 12 16 19 NA 2 23 8 11 15 3 2 18 12 10 16 3 1 15 11 11 23 4 2 12 4 15 27 5 4 21 9 9 22 4 2 15 8 11 14 2 2 20 8 17 22 4 3 31 14 17 23 4 2 27 15 11 23 4 3 34 16 18 21 4 2 21 9 14 19 4 3 31 14 10 18 4 2 19 11 11 20 5 3 16 8 15 23 4 3 20 9 15 25 4 4 21 9 13 19 4 2 22 9 16 24 4 4 17 9 13 22 4 3 24 10 9 25 4 4 25 16 18 26 4 3 26 11 18 29 2 4 25 8 12 32 4 4 17 9 17 25 4 3 32 16 9 29 5 5 33 11 9 28 5 4 13 16 12 17 4 2 32 12 18 28 3 4 25 12 12 29 4 4 29 14 18 26 5 5 22 9 14 25 4 4 18 10 15 14 4 2 17 9 16 25 5 4 20 10 10 26 4 4 15 12 11 20 5 1 20 14 14 18 4 2 33 14 9 32 4 5 29 10 12 25 4 4 23 14 17 25 3 2 26 16 5 23 4 3 18 9 12 21 4 4 20 10 12 20 4 2 11 6 6 15 2 1 28 8 24 30 3 4 26 13 12 24 5 2 22 10 12 26 4 4 17 8 14 24 4 2 12 7 7 22 5 3 14 15 13 14 3 2 17 9 12 24 5 3 21 10 13 24 4 2 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 9.56730396906726 + 0.137042226462313CM[t] -0.132584963543833D[t] + 0.0273702108583212PE[t] + 0.93014119644806Organization[t] + 2.54347193311708Goals[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.567303969067261.5348746.233300
CM0.1370422264623130.0483492.83440.0052150.002608
D-0.1325849635438330.086392-1.53470.1269390.06347
PE0.02737021085832120.0667470.41010.682340.34117
Organization0.930141196448060.259643.58240.0004580.000229
Goals2.543471933117080.24149310.532300


Multiple Linear Regression - Regression Statistics
Multiple R0.783062592768742
R-squared0.613187024193705
Adjusted R-squared0.600462913147445
F-TEST (value)48.190951962334
F-TEST (DF numerator)5
F-TEST (DF denominator)152
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.66923088196573
Sum Squared Residuals1082.96861218841


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.58232201558220.417677984417778
22520.53402515967764.46597484032243
33025.46125814051564.53874185948438
41919.5242552434725-0.524255243472516
52223.3359969927025-1.33599699270254
62220.50022233580031.49977766419974
72523.56449296390831.43550703609173
82324.4970698311842-1.49706983118421
91715.57504268144871.42495731855131
102119.6019086131291.398091386871
111920.1863622556735-1.18636225567353
121923.8370352443697-4.83703524436967
131515.0506421139074-0.0506421139073731
141612.27308373848773.72691626151227
152321.91661771002311.08338228997686
162725.30576660263261.69423339736737
172225.8105562362231-3.81055623622311
181415.0637429596978-1.0637429596978
192220.23222573640321.76777426359684
202322.93072253497720.069277465022762
212323.4055526995608-0.405552699560756
222124.9860895900413-3.98608959004132
231922.0406342603949-3.04063426039491
241821.2948657739021-3.29486577390213
252019.46083363213190.539166367868087
262323.4198895075544-0.419889507554415
272526.4152474460659-1.41524744606592
281920.7213441713374-1.72134417133736
292424.4105504733337-0.41055047333375
302222.6712521847099-0.671252184709905
312521.7156445945173.28435540548297
322621.19880117891954.80119882108053
332923.15557497083485.84442502916515
343229.5200313167672.47996868323297
352525.4456933447106-0.445693344710555
362928.70218845577490.297811544225055
372829.3634446787023-1.36344467870227
381714.81861077059762.18138922940243
392824.62523511665953.37476488334048
402932.5460684901362-3.54606849013617
412626.6666037496207-0.666603749620719
422530.9262762248518-5.92627622485179
431414.9662742354739-0.966274235473857
442524.1504534897190.849546510281025
452623.52716803827492.47283196172513
462021.6426506127428-1.64265061274276
471814.91776430181253.08223569818753
483233.4385739495964-1.43857394959643
492519.20574672825665.7942532717434
502524.49687407982120.503125920178834
512327.0636944220548-4.06369442205483
522121.1182500452014-0.118250045201449
532019.84723427005280.152765729947164
541510.96500298407364.03499701592642
553027.47288970979192.52711029020812
562423.47927836436020.520721635639757
572622.02703371461883.97296628538118
582424.756429199408-0.756429199407985
592225.7303008831187-3.73030088311867
601413.31332145892350.686678541076512
612420.28266248252213.71733751747792
622420.70091950981623.29908049018383
632421.88040179132912.11959820867087
642421.17698563660292.82301436339708
651917.69749148304281.30250851695722
663135.9504581187504-4.9504581187504
672220.22810685937551.77189314062454
682724.54495950509882.45504049490115
691913.95829487079935.0417051292007
702525.5496165875396-0.549616587539556
712019.0316821497080.968317850291995
722121.7204529686256-0.7204529686256
732725.78306772724111.21693227275892
742322.62881212965930.371187870340736
752525.5293767245884-0.529376724588386
762017.65598481664832.34401518335175
772119.97500396274081.0249960372592
782224.6783825326171-2.67838253261706
792321.65284503733151.34715496266848
802523.50002021083651.49997978916348
812527.4169940391458-2.41699403914577
821718.0174925554344-1.01749255543442
831917.03637274883951.96362725116052
842525.8895560269798-0.889556026979772
851919.2321881515532-0.232188151553213
862016.77139399392253.22860600607748
872627.8376734888218-1.83767348882182
882322.14584263947970.854157360520261
892729.9812078187391-2.98120781873914
901720.4649039715166-3.46490397151663
911718.2314129513123-1.23141295131226
921920.4252443467853-1.42524434678534
931717.0877758673701-0.0877758673700634
942222.0165637678727-0.0165637678727072
952119.43260342981111.56739657018891
963231.88494517674050.115054823259466
972126.2050403241149-5.20504032411486
982125.6572647154001-4.65726471540005
991822.9631766421015-4.96317664210148
1001818.1549592902804-0.154959290280435
1012323.8307938035214-0.830793803521384
1021921.9858984178706-2.98589841787061
1032019.19144615193950.808553848060547
1042121.9018078560028-0.901807856002795
1052018.84199678646621.15800321353384
1061719.4657217770348-2.46572177703478
1071817.96609173255670.0339082674432657
1081919.8987038890297-0.89870388902973
1092227.1069247080872-5.10692470808724
1101519.4939831906049-4.49398319060487
1111417.5892386274209-3.5892386274209
1121813.50821036972844.4917896302716
1132417.99585313264576.00414686735431
1143530.11858843109224.88141156890777
1152930.4060932104153-1.40609321041527
1162119.87506020054411.12493979945588
1172521.70200418035153.29799581964846
1182018.35523195591261.64476804408736
1192225.4025711086592-3.40257110865919
1201313.169137931761-0.169137931760993
1212627.2332705264357-1.23327052643568
1221716.07353773545350.926462264546504
1232522.92065683815862.0793431618414
1242019.54587733986750.454122660132474
1251919.7358468726182-0.735846872618248
1262118.64346841826092.35653158173909
1272220.50176680391641.49823319608362
1282422.89890601399351.10109398600653
1292121.429032790412-0.429032790412031
1302623.90045048210962.09954951789041
1312427.702666102896-3.70266610289603
1321617.8992819847342-1.89928198473419
1332327.296612366982-4.29661236698198
1341822.2552922716638-4.25529227166376
1351615.84865406644460.151345933555434
1362622.97279757208023.02720242791982
1371917.60636587604751.39363412395252
1382117.42882135978513.57117864021491
1392117.13429721459853.86570278540154
1402220.55941136329521.44058863670475
1412320.3925568815462.60744311845396
1422931.6911831005133-2.69118310051328
1432124.5424602658872-3.54246026588716
1442119.60771917199291.3922808280071
1452321.61569395747511.38430604252489
1462728.0519532239084-1.05195322390844
1472524.90665433810790.0933456618920731
1482126.2989117768828-5.29891177688283
1491010.7122448469304-0.712244846930381
1502018.64543739476071.35456260523926
1512625.07203085218730.927969147812676
1522425.3291728550554-1.32917285505539
1532931.2628494236075-2.26284942360752
1541921.2217118312064-2.22171183120641
1552424.8670785402167-0.867078540216665
1561920.7438216581005-1.74382165810047
1572424.6201621731866-0.620162173186625
1582227.6351269677012-5.63512696770117
15917NANA


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.2572667867366880.5145335734733760.742733213263312
100.1405099435866650.2810198871733290.859490056413335
110.3514783964319820.7029567928639640.648521603568018
120.8020396452023830.3959207095952350.197960354797617
130.7153703219368270.5692593561263470.284629678063173
140.690002613234770.6199947735304590.30999738676523
150.630372665755190.739254668489620.36962733424481
160.5490540592574290.9018918814851430.450945940742571
170.5449408576245980.9101182847508040.455059142375402
180.4739539096646880.9479078193293770.526046090335312
190.4202588771033960.8405177542067920.579741122896604
200.3428737093355680.6857474186711370.657126290664432
210.2767299893769570.5534599787539130.723270010623043
220.3901096222935390.7802192445870780.609890377706461
230.3977572588247830.7955145176495660.602242741175217
240.5286989029886430.9426021940227150.471301097011357
250.4579467045603990.9158934091207990.542053295439601
260.389025355752880.7780507115057610.61097464424712
270.3430203637127080.6860407274254160.656979636287292
280.2940476832710150.588095366542030.705952316728985
290.2404021258352730.4808042516705460.759597874164727
300.1945142675370450.3890285350740910.805485732462955
310.2000879160544440.4001758321088880.799912083945556
320.3838389267787120.7676778535574250.616161073221288
330.6300332263595960.7399335472808080.369966773640404
340.599841403843490.800317192313020.40015859615651
350.5528956312821650.894208737435670.447104368717835
360.4959966534815390.9919933069630780.504003346518461
370.4603434252108020.9206868504216040.539656574789198
380.4180922797283210.8361845594566420.581907720271679
390.4302906527803770.8605813055607540.569709347219623
400.5494562808679230.9010874382641530.450543719132077
410.5022446022751490.9955107954497020.497755397724851
420.6993888918466840.6012222163066320.300611108153316
430.6591505998542390.6816988002915220.340849400145761
440.612616578666310.7747668426673810.38738342133369
450.6143606407189430.7712787185621140.385639359281057
460.5817123593316630.8365752813366730.418287640668337
470.5798889385732670.8402221228534650.420111061426733
480.5499163817881820.9001672364236350.450083618211818
490.6999273559960210.6001452880079580.300072644003979
500.6554513347912760.6890973304174490.344548665208724
510.7106426460970360.5787147078059280.289357353902964
520.6660381301188690.6679237397622630.333961869881131
530.621348642000920.757302715998160.37865135799908
540.6473511194873620.7052977610252750.352648880512638
550.6391622311534730.7216755376930540.360837768846527
560.5933015907335490.8133968185329020.406698409266451
570.6432160609544890.7135678780910230.356783939045511
580.5997385798705290.8005228402589420.400261420129471
590.6363693789045170.7272612421909660.363630621095483
600.5931410793936050.813717841212790.406858920606395
610.6247824927614790.7504350144770430.375217507238521
620.6421534568309410.7156930863381180.357846543169059
630.6332673756053320.7334652487893350.366732624394668
640.6392890598293170.7214218803413660.360710940170683
650.6038299163897990.7923401672204030.396170083610201
660.7213664824216320.5572670351567360.278633517578368
670.6977365955726460.6045268088547080.302263404427354
680.6934098020298250.613180395940350.306590197970175
690.78690951323080.4261809735384010.213090486769201
700.7543299886276150.491340022744770.245670011372385
710.7210794581327920.5578410837344170.278920541867208
720.6864237919467480.6271524161065040.313576208053252
730.6626508419265020.6746983161469960.337349158073498
740.6228153186030460.7543693627939080.377184681396954
750.5812223420389260.8375553159221480.418777657961074
760.58055603525850.8388879294830.4194439647415
770.5523534563819060.8952930872361870.447646543618094
780.550804108586020.898391782827960.44919589141398
790.5157223574730930.9685552850538140.484277642526907
800.493134379796470.986268759592940.50686562020353
810.4882633437548960.9765266875097930.511736656245104
820.4514924002471720.9029848004943440.548507599752828
830.4351066824627370.8702133649254740.564893317537263
840.3936552507686240.7873105015372480.606344749231376
850.3579103043022510.7158206086045010.642089695697749
860.3830847373603080.7661694747206160.616915262639692
870.3549662545957920.7099325091915830.645033745404208
880.3186464994650670.6372929989301340.681353500534933
890.3247838348526990.6495676697053980.675216165147301
900.3495790192180220.6991580384360430.650420980781978
910.3117974710764380.6235949421528760.688202528923562
920.2813136890327690.5626273780655370.718686310967231
930.243236452371370.4864729047427390.75676354762863
940.2096389538939320.4192779077878630.790361046106068
950.1997938458070430.3995876916140860.800206154192957
960.1737002909733470.3474005819466940.826299709026653
970.2597659253943970.5195318507887950.740234074605603
980.3368541791983920.6737083583967840.663145820801608
990.4394893251065150.878978650213030.560510674893485
1000.3930371160866450.786074232173290.606962883913355
1010.3495095728998130.6990191457996260.650490427100187
1020.3479331936375210.6958663872750430.652066806362479
1030.3136183309546730.6272366619093460.686381669045327
1040.2745760283150410.5491520566300810.72542397168496
1050.2454561102019530.4909122204039060.754543889798047
1060.2354429176235590.4708858352471180.76455708237644
1070.1985811268143630.3971622536287250.801418873185637
1080.1678261591061070.3356523182122150.832173840893893
1090.2345184009227860.4690368018455710.765481599077214
1100.3119520780021790.6239041560043570.688047921997821
1110.3326080067422470.6652160134844940.667391993257753
1120.4024070333493360.8048140666986720.597592966650664
1130.6155120879333510.7689758241332990.384487912066649
1140.72866460893350.5426707821330010.271335391066501
1150.6881925492536610.6236149014926790.311807450746339
1160.665655341708410.668689316583180.33434465829159
1170.6935750093673020.6128499812653960.306424990632698
1180.6591062830477560.6817874339044890.340893716952244
1190.7183098336695820.5633803326608360.281690166330418
1200.668957983405880.6620840331882410.33104201659412
1210.6226152560403710.7547694879192570.377384743959629
1220.5918855433961110.8162289132077780.408114456603889
1230.5525171439786120.8949657120427750.447482856021388
1240.4936241810321760.9872483620643530.506375818967824
1250.4364581860101490.8729163720202980.563541813989851
1260.4346155062707840.8692310125415680.565384493729216
1270.4072730712915430.8145461425830850.592726928708457
1280.3695639495937860.7391278991875720.630436050406214
1290.3146149272217580.6292298544435170.685385072778242
1300.3112781763326140.6225563526652290.688721823667386
1310.324475366811930.648950733623860.67552463318807
1320.2720632408232790.5441264816465580.727936759176721
1330.3237177572164350.647435514432870.676282242783565
1340.4557480795148340.9114961590296690.544251920485166
1350.406037308635050.81207461727010.59396269136495
1360.4024388815012970.8048777630025930.597561118498703
1370.3533442619914110.7066885239828220.646655738008589
1380.4162657637624430.8325315275248860.583734236237557
1390.6330989650001260.7338020699997480.366901034999874
1400.6246982033314070.7506035933371860.375301796668593
1410.6600698814594650.679860237081070.339930118540535
1420.5806507063313050.838698587337390.419349293668695
1430.762946751413470.4741064971730610.23705324858653
1440.882112358804540.2357752823909190.11788764119546
1450.8178385716831450.3643228566337090.182161428316855
1460.7244532480531030.5510935038937940.275546751946897
1470.6683277470061150.663344505987770.331672252993885
1480.6315749425475540.7368501149048920.368425057452446
1490.4695419571419550.939083914283910.530458042858045
1500.3433301487503390.6866602975006780.65666985124966


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 level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/10bp2g1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/10bp2g1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/14n541292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/14n541292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/24n541292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/24n541292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/3fxmp1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/3fxmp1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/4fxmp1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/4fxmp1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/5fxmp1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/5fxmp1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/6pola1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/6pola1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/70f3v1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/70f3v1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/80f3v1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/80f3v1292158374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/90f3v1292158374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158268w6jav2wn2yvf8pa/90f3v1292158374.ps (open in new window)


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