Home » date » 2010 » Dec » 15 »

Multiple Regression Analysis

*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: Wed, 15 Dec 2010 22:44:30 +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/15/t129245359239avfuql0aseud0.htm/, Retrieved Wed, 15 Dec 2010 23:53:23 +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/15/t129245359239avfuql0aseud0.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 26 9 15 25 25 16 20 9 15 25 24 19 21 9 14 19 21 15 31 14 10 18 23 14 21 8 10 18 17 13 18 8 12 22 19 19 26 11 18 29 18 15 22 10 12 26 27 14 22 9 14 25 23 15 29 15 18 23 23 16 15 14 9 23 29 16 16 11 11 23 21 16 24 14 11 24 26 17 17 6 17 30 25 15 19 20 8 19 25 15 22 9 16 24 23 20 31 10 21 32 26 18 28 8 24 30 20 16 38 11 21 29 29 16 26 14 14 17 24 19 25 11 7 25 23 16 25 16 18 26 24 17 29 14 18 26 30 17 28 11 13 25 22 16 15 11 11 23 22 15 18 12 13 21 13 14 21 9 13 19 24 15 25 7 18 35 17 12 23 13 14 19 24 14 23 10 12 20 21 16 19 9 9 21 23 14 18 9 12 21 24 10 26 16 5 23 24 14 18 12 10 19 23 16 18 6 11 17 26 16 28 14 11 24 24 16 17 14 12 15 21 14 29 10 12 25 23 20 12 4 15 27 28 14 25 12 12 29 23 14 28 12 16 27 22 11 20 14 14 18 24 15 17 9 17 25 21 16 17 9 13 22 23 14 20 10 10 26 23 16 31 14 17 23 20 14 21 10 12 16 23 12 19 9 13 27 21 16 23 14 13 25 27 9 15 8 11 14 12 14 24 9 13 19 15 16 28 8 12 20 22 16 16 9 12 16 21 15 19 9 12 18 21 16 21 9 9 22 20 12 21 15 7 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Learning[t] = + 11.9901927558636 -0.00378845716147222Concern[t] -0.237184323200024Doubts[t] + 0.0977584702116675Expectations[t] + 0.0389221932355093Standards[t] + 0.161470621403681Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)11.99019275586361.3278149.0300
Concern-0.003788457161472220.034854-0.10870.9135970.456798
Doubts-0.2371843232000240.063738-3.72120.0002850.000142
Expectations0.09775847021166750.050381.94040.0543090.027154
Standards0.03892219323550930.0450580.86380.3891390.19457
Organization0.1614706214036810.0449373.59330.0004490.000225


Multiple Linear Regression - Regression Statistics
Multiple R0.468251783455381
R-squared0.219259732709145
Adjusted R-squared0.191768878227072
F-TEST (value)7.9757336336028
F-TEST (DF numerator)5
F-TEST (DF denominator)142
p-value1.19072741711079e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.89981292365133
Sum Squared Residuals512.519058571912


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.2332313800198-3.23323138001978
21616.094491501585-0.0944915015849864
31915.27499955058773.72500044941226
41513.94417853169811.05582146830191
51414.4363453140909-0.436345314090865
61315.121857641748-2.12185764174802
71915.07753256737113.92246743262894
81516.0797889108736-1.07978891087357
91415.8276854956467-1.82768549564669
101514.69124985069190.308750149308103
111615.07047007066960.929529929330389
121614.68198655230211.31801344769790
131614.78640122566421.21359877433584
141717.3690083706740-0.369008370674034
151512.73288057405522.26711942594485
161515.9842802428345-0.984280242834518
172016.99758156633473.0024184336653
181816.72992287996111.27007712003894
191617.1015233275089-1.10152332750889
201614.47670312652031.52329687347971
211914.65764218628064.34235781371944
221614.74745655724801.25254344275203
231716.17549510342420.824504896575784
241715.07135701466251.92864298533754
251614.84724563086721.15275436913275
261513.2631328975021.73686710249800
271415.6616529445871-1.66165294458712
281516.102120855342-1.10212085534200
291214.8030972076758-2.80309720767575
301414.8736435658770-0.873643565876952
311615.19456974313070.805430256869266
321415.6531042323309-1.65310423233089
331013.3560414076283-3.35604140762829
341414.5067193144328-0.506719314432785
351616.4341512015846-0.434151201584617
361614.44830615421091.55169384578909
371613.75302604986812.24697395013185
381415.3684650318930-1.36846503189303
392018.03444764696261.96555235303738
401415.0649389870809-1.06493898708091
411415.2052924885685-1.20529248856846
421114.5383560627246-3.53835606272464
431515.8169619492817-0.816961949281693
441615.63210273153590.367897268464142
451415.2459663991585-1.24596639915845
461614.33868692514631.66131307485374
471415.0484729500652-1.04847295006522
481215.4961955405831-3.49619554058310
491615.18609943788820.81390056211184
50913.5937926473109-4.59379264731092
511414.1970519804696-0.197051980469575
521615.49054054787330.509459452126681
531614.98165831626521.01834168373476
541515.0481373312518-0.0481373312518462
551614.74150315783231.25849684216774
561213.729840570588-1.72984057058800
571616.4104261855018-0.410426185501815
581616.2697721237077-0.269772123707726
591416.4533841023949-2.45338410239489
601612.59158389219233.40841610780769
611716.20183280729680.798167192703174
621814.57440486397173.42559513602829
631815.62744335863542.37255664136456
641214.6686788762782-2.66867887627825
651615.93512989060260.0648701093974289
661014.6265723484934-4.62657234849337
671412.77869026811031.22130973188971
681815.43765153391352.56234846608650
691816.34621594949171.65378405050833
701615.61907958756460.380920412435355
711615.62774391894200.372256081058027
721614.76483286781361.23516713218644
731314.7781474277150-1.77814742771496
741615.05653186750330.943468132496703
751614.97770659217171.02229340782826
762016.03596916916883.9640308308312
771615.28368555621850.716314443781517
781512.69257040943672.30742959056334
791515.5131080239101-0.513108023910121
801615.93437809236160.0656219076384369
811414.3005515886586-0.300551588658603
821513.51418395418131.48581604581867
831214.8294223816713-2.82942238167130
841716.15762636001790.842373639982065
851615.39055959574190.60944040425805
861513.09818776349681.90181223650319
871314.6083095903127-1.60830959031274
881616.0421447218774-0.0421447218773881
891615.44175313470770.558246865292336
901616.2689852669599-0.268985266959879
911615.78220233545560.217797664544384
921415.5765819995333-1.57658199953329
931614.46272985886921.5372701411308
941615.32779676730250.672203232697458
952016.42943429499673.57056570500332
961515.6841489509369-0.684148950936918
971614.28844915585991.71155084414006
981314.3064456172915-1.30644561729154
991716.01530328718710.984696712812863
1001614.54522447386431.45477552613571
1011213.3569648162504-1.35696481625041
1021615.08708119874080.912918801259235
1031615.42457779358140.575422206418584
1041715.44098230621371.55901769378628
1051313.5331262399887-0.533126239988688
1061215.8606227233586-3.86062272335855
1071815.95991984855912.04008015144092
1081414.0869156303559-0.08691563035592
1091414.6984694719481-0.698469471948057
1101313.9806400674451-0.980640067445053
1111615.38584698845810.614153011541875
1121312.73398058041360.266019419586368
1131615.42411052739300.575889472606958
1141314.9018863621816-1.90188636218155
1151615.89407701269240.105922987307615
1161514.93669706276840.0633029372316269
1171615.59817896896400.401821031036048
1181515.1091540883363-0.109154088336277
1191715.74505917982751.25494082017250
1201515.8938072175665-0.893807217566509
1211213.7464356704052-1.74643567040525
1221614.57587769527311.42412230472693
1231014.4637739274168-4.46377392741677
1241614.27932745014881.72067254985124
1251414.7720308148163-0.772030814816313
1261516.4573925592486-1.45739255924864
1271314.6271587321797-1.62715873217969
1281515.4984804012626-0.498480401262555
1291113.9958813940319-2.99588139403185
1301214.2404555427467-2.24045554274672
1311616.1266712850563-0.126671285056332
1321515.1189127740946-0.118912774094640
1331715.21711339729151.78288660270853
1341615.51948190205760.480518097942414
1351015.1778014905049-5.17780149050487
1361813.81797550079314.18202449920686
1371314.2808189477265-1.28081894772655
1381514.40928307878110.590716921218937
1391614.84724563086721.15275436913275
1401615.16462502490520.835374975094753
1411413.69157623072580.308423769274193
1421013.2748997114873-3.27489971148729
1431716.15762636001790.842373639982065
1441314.5199399294665-1.51993992946650
1451515.8938072175665-0.893807217566509
1461615.99562394006550.00437605993447482
1471215.3263528581086-3.32635285810865
1481313.4563601856227-0.456360185622739


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.6234771673606140.7530456652787720.376522832639386
100.9292146427493590.1415707145012820.070785357250641
110.8798288616124790.2403422767750430.120171138387521
120.8120266559983450.3759466880033110.187973344001655
130.7401900379601210.5196199240797580.259809962039879
140.6823833486624760.6352333026750490.317616651337524
150.6406037583965670.7187924832068670.359396241603433
160.5704673706013110.8590652587973770.429532629398689
170.6531640383324830.6936719233350330.346835961667517
180.5806662690555340.8386674618889310.419333730944466
190.5100755645460230.9798488709079530.489924435453977
200.4441170025974610.8882340051949210.555882997402539
210.6623362030416170.6753275939167670.337663796958383
220.6179868715172620.7640262569654770.382013128482738
230.56265838158210.87468323683580.4373416184179
240.5035925053195810.9928149893608380.496407494680419
250.4384741492631830.8769482985263650.561525850736817
260.4045307175747900.8090614351495790.59546928242521
270.3487015860022940.6974031720045880.651298413997706
280.4471484975666880.8942969951333770.552851502433312
290.5545291631819760.8909416736360480.445470836818024
300.5050472445822530.9899055108354930.494952755417747
310.4599691605672710.9199383211345410.540030839432729
320.4170820117009530.8341640234019060.582917988299047
330.7371148314849270.5257703370301470.262885168515073
340.6898202216764620.6203595566470760.310179778323538
350.6613437450147460.6773125099705090.338656254985254
360.6263450675063280.7473098649873440.373654932493672
370.615162535718390.7696749285632190.384837464281610
380.5836341265255340.8327317469489330.416365873474466
390.6314648317026940.7370703365946120.368535168297306
400.6060999475260250.787800104947950.393900052473975
410.5884993940167140.8230012119665730.411500605983286
420.7481264049716940.5037471900566110.251873595028306
430.720584070424470.5588318591510590.279415929575530
440.6750193486719590.6499613026560830.324980651328041
450.6472813342424540.7054373315150910.352718665757546
460.6213687678960530.7572624642078940.378631232103947
470.5810165004138140.8379669991723720.418983499586186
480.6987725316361850.6024549367276310.301227468363815
490.6587613664665340.6824772670669330.341238633533466
500.8246186859273960.3507626281452080.175381314072604
510.7926190471895020.4147619056209960.207380952810498
520.7674266688867170.4651466622265660.232573331113283
530.7478653631651080.5042692736697830.252134636834892
540.7077324347164310.5845351305671380.292267565283569
550.6899410124667750.620117975066450.310058987533225
560.6842841410213930.6314317179572150.315715858978607
570.6396799259165850.720640148166830.360320074083415
580.5920961077609020.8158077844781950.407903892239098
590.6133001595920910.7733996808158180.386699840407909
600.6992931514400390.6014136971199230.300706848559961
610.6657774960937220.6684450078125560.334222503906278
620.7575250013910740.4849499972178510.242474998608926
630.7838250189988170.4323499620023670.216174981001183
640.8183997632719140.3632004734561730.181600236728086
650.7847262826196280.4305474347607450.215273717380372
660.9134684458398560.1730631083202880.0865315541601439
670.9005224100532340.1989551798935310.0994775899467656
680.9224075332880770.1551849334238460.077592466711923
690.9205401053823680.1589197892352630.0794598946176316
700.901711194861470.1965776102770590.0982888051385295
710.8798529579898050.2402940840203900.120147042010195
720.8656162743727240.2687674512545530.134383725627276
730.8608639960926430.2782720078147150.139136003907357
740.8395293328470720.3209413343058550.160470667152928
750.8175033909795470.3649932180409060.182496609020453
760.9056634820296620.1886730359406770.0943365179703383
770.8868677343828890.2262645312342230.113132265617111
780.899494898327220.2010102033455600.100505101672780
790.877640985879460.2447180282410780.122359014120539
800.8509472819090660.2981054361818690.149052718090934
810.823344112009770.3533117759804610.176655887990231
820.819705093849390.360589812301220.18029490615061
830.856101592468570.2877968150628580.143898407531429
840.8309501864469720.3380996271060570.169049813553028
850.8026424257673830.3947151484652330.197357574232617
860.812998801840130.374002396319740.18700119815987
870.8020730854015550.395853829196890.197926914598445
880.7658973319088140.4682053361823720.234102668091186
890.7302430101018810.5395139797962380.269756989898119
900.6896876677206010.6206246645587970.310312332279399
910.6449447613071880.7101104773856250.355055238692812
920.633656754071760.732686491856480.36634324592824
930.6370972441337810.7258055117324380.362902755866219
940.597086211500020.805827576999960.40291378849998
950.70711328989850.5857734202029990.292886710101500
960.6643093283132490.6713813433735030.335690671686751
970.6809306736470640.6381386527058730.319069326352936
980.6530156110361730.6939687779276540.346984388963827
990.6238436083003170.7523127833993650.376156391699683
1000.6491917877312070.7016164245375850.350808212268793
1010.6214159297819380.7571681404361240.378584070218062
1020.5856275666498180.8287448667003650.414372433350182
1030.5581316069357060.8837367861285870.441868393064294
1040.572087701311310.855824597377380.42791229868869
1050.5204326343012120.9591347313975760.479567365698788
1060.6999751365758180.6000497268483630.300024863424182
1070.7166456631695390.5667086736609220.283354336830461
1080.7142527850102610.5714944299794780.285747214989739
1090.6664476055657070.6671047888685870.333552394434293
1100.6190230526366460.7619538947267070.380976947363354
1110.5686565453320750.862686909335850.431343454667925
1120.5382062764679290.9235874470641430.461793723532072
1130.4889445542502160.9778891085004320.511055445749784
1140.4778141619340690.9556283238681380.522185838065931
1150.4178837417855520.8357674835711040.582116258214448
1160.3720083938499580.7440167876999170.627991606150042
1170.3627690833293960.7255381666587930.637230916670604
1180.3066045768271580.6132091536543150.693395423172842
1190.2737496944500660.5474993889001330.726250305549934
1200.2303410861686590.4606821723373190.76965891383134
1210.2265758271760110.4531516543520220.773424172823989
1220.2148259034093430.4296518068186860.785174096590657
1230.3366683252174370.6733366504348750.663331674782563
1240.2861508720039490.5723017440078980.713849127996051
1250.2377527411840000.4755054823679990.762247258816
1260.1900620855924250.380124171184850.809937914407575
1270.1623772383661380.3247544767322770.837622761633862
1280.1202375985119270.2404751970238550.879762401488073
1290.1290322904680100.2580645809360200.87096770953199
1300.1159036603318330.2318073206636660.884096339668167
1310.08019826572973280.1603965314594660.919801734270267
1320.05435716934224930.1087143386844990.94564283065775
1330.06054075022141660.1210815004428330.939459249778583
1340.04195775385001290.08391550770002590.958042246149987
1350.3193682806346400.6387365612692790.68063171936536
1360.5982968354934330.8034063290131350.401703164506567
1370.4794494182990520.9588988365981030.520550581700948
1380.371566299551090.743132599102180.62843370044891
1390.258356373403330.516712746806660.74164362659667


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.00763358778625954OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/10foux1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/10foux1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/11ewp1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/11ewp1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/21ewp1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/21ewp1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/3t5dr1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/3t5dr1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/4t5dr1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/4t5dr1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/5t5dr1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/5t5dr1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/6t5dr1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/6t5dr1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/74wvu1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/74wvu1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/8foux1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/8foux1292453059.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/9foux1292453059.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129245359239avfuql0aseud0/9foux1292453059.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by