Home » date » 2010 » Dec » 22 »

Meervoudige lineaire regressie

*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, 22 Dec 2010 18:52:01 +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/22/t1293043898d1zfrxes0un84qm.htm/, Retrieved Wed, 22 Dec 2010 19:51:38 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm.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 12 24 25 11 8 25 17 6 8 30 18 12 8 19 18 8 9 22 16 10 7 22 20 10 4 25 16 11 11 23 18 16 7 17 17 11 7 21 23 13 12 19 30 12 10 19 23 8 10 15 18 12 8 16 15 11 8 23 12 4 4 27 21 9 9 22 15 8 8 14 20 8 7 22 31 14 11 23 27 15 9 23 34 16 11 21 21 9 13 19 31 14 8 18 19 11 8 20 16 8 9 23 20 9 6 25 21 9 9 19 22 9 9 24 17 9 6 22 24 10 6 25 25 16 16 26 26 11 5 29 25 8 7 32 17 9 9 25 32 16 6 29 33 11 6 28 13 16 5 17 32 12 12 28 25 12 7 29 29 14 10 26 22 9 9 25 18 10 8 14 17 9 5 25 20 10 8 26 15 12 8 20 20 14 10 18 33 14 6 32 29 10 8 25 23 14 7 25 26 16 4 23 18 9 8 21 20 10 8 20 11 6 4 15 28 8 20 30 26 13 8 24 22 10 8 26 17 8 6 24 12 7 4 22 14 15 8 14 17 9 9 24 21 10 6 24 19 12 7 24 18 13 9 24 10 10 5 19 29 11 5 31 31 8 8 22 19 9 8 27 9 13 6 19 20 11 8 25 28 8 7 20 19 9 7 21 30 9 9 27 29 15 11 23 26 9 6 25 23 10 8 20 13 14 6 21 21 12 9 22 19 12 8 23 28 11 6 25 23 14 10 25 18 6 8 17 21 12 8 19 20 8 10 25 23 14 5 19 21 11 7 20 21 10 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 17.7328206986877 + 0.380763089814471CM[t] -0.358122279733057DA[t] + 0.0114452394212943PC[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.73282069868771.50370611.792700
CM0.3807630898144710.0588796.466900
DA-0.3581222797330570.115743-3.09410.0023420.001171
PC0.01144523942129430.1157210.09890.9213430.460671


Multiple Linear Regression - Regression Statistics
Multiple R0.47780279837152
R-squared0.228295514131655
Adjusted R-squared0.213359298276139
F-TEST (value)15.2846956913347
F-TEST (DF numerator)3
F-TEST (DF denominator)155
p-value9.22506182554628e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.74013733053778
Sum Squared Residuals2168.23722394876


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12421.99476581102772.00523418897227
22523.40411478235621.59588521764384
33022.14862146250577.85137853749432
41920.3806508739218-1.38065087392180
52221.82458523227530.175414767724672
62220.32392401433771.67607598566232
72521.81264065533173.18735934466832
82320.01158269228982.9884173077102
91718.9367165155683-1.93671651556828
102120.34656482441910.653435175580904
111921.9721250009463-2.97212500094628
121924.9726984305380-5.97269843053804
131523.739845920769-8.73984592076898
141620.3806508739218-4.3806508739218
152319.59648388421143.40351611578855
162720.91526961521436.08473038478574
172222.6087522219857-0.608752221985684
181420.6708507234106-6.67085072341062
192222.5632209330617-0.563220933061682
202324.6486622003077-1.64866220030769
212322.74459708247420.255402917525836
222125.074706910285-4.07470691028499
231922.6545331796709-3.65453317967086
241824.6143264820438-6.61432648204381
252021.1195362434693-1.11953624346933
262321.06305905264641.93694094735361
272522.19365341390732.80634658609267
281922.6087522219857-3.60875222198568
292422.98951531180021.01048468819985
302221.05136414446390.948635855536083
312523.35858349343221.64141650656784
322621.70506529906124.29493470093878
332923.75054215390675.24945784609326
343224.46703638213407.53296361786596
352521.08569986272783.9143001372722
362924.25595453354964.74404546645042
372826.42732902202931.57267097797066
381717.0100105876533-0.0100105876533363
392825.75711508900962.24288491099043
402923.03454726320185.96545273679819
412623.87569078125752.12430921874254
422522.98951531180022.01048468819985
431421.0968954333879-7.09689543338792
442521.03991890504263.96008109495738
452621.85842161301694.14157838698314
462019.23836160447840.761638395521609
471820.4488229729272-2.44882297292722
483225.35296218283026.64703781716984
492525.2852894213471-0.285289421347099
502521.55677652410673.44322347589325
512321.94848551582021.05151448417984
522121.4550177131210-0.455017713120977
532021.8584216130169-1.85842161301686
541519.8182619659337-4.81826196593367
553025.75811376405434.24188623594573
562423.06863331270450.931366687295486
572622.61994779264583.3800522073542
582421.40948642419702.59051357580303
592219.84090277601512.15909722398491
601417.7832316754647-3.78323167546475
612421.08569986272782.9143001372722
622422.21629422398871.78370577601126
632420.7499687243153.25003127568502
642420.03397383361003.96602616638996
651918.01645499660830.983545003391731
663124.89283142335026.10716857664984
672226.7630601604422-4.76306016044216
682721.83578080293545.16421919706455
691916.57277030701592.42722969298408
702521.50029933328383.49970066671620
712025.6093256515774-5.60932565157745
722121.8243355635142-0.824335563514153
732726.03562003031590.964379969684079
742323.5290137409457-0.529013740945694
752524.47823195279420.521768047205845
762023.0007108824603-3.00071088246027
772117.73770038654073.26229961345925
782221.53438538278650.465614617213489
792320.76141396373632.23858603626373
802524.5235135729570.476486427043018
812521.59111224237063.40888775762937
821722.5293845523201-5.52938455232015
831921.5229401433652-2.52294014336522
842522.59755665132562.40244334867443
851921.5338860452642-2.53388604526416
862021.869617183677-1.86961718367698
872622.20484898456743.79515101543255
882318.52211704501234.47788295498772
892724.25695320859432.74304679140572
901721.4662132837811-4.46621328378109
911722.7105110329715-5.71051103297146
921919.8185116346949-0.81851163469485
931719.9429112557620-2.94291125576204
942222.5970573138032-0.597057313803214
952121.8586712817780-0.858671281778036
963226.09259655866125.90740344133878
972123.909527161999-2.90952716199899
982124.2567035398331-3.25670353983310
991821.8243355635142-3.82433556351415
1001822.6199477926458-4.6199477926458
1012323.0236013613029-0.0236013613028622
1021921.0060825243011-2.00608252430109
1032022.2394343715925-2.23943437159251
1042121.8360304716966-0.836030471696623
1052021.5911122423706-1.59111224237063
1061722.2954122248931-5.2954122248931
1071822.9439840228762-4.94398402287615
1081923.7624867308504-4.76248673085039
1092222.3640836614209-0.364083661420868
1101519.2607527457986-4.26075274579863
1111419.8978793043604-5.89787930436039
1121825.6665518486839-7.66655184868392
1132422.98976498056131.01023501943867
1143524.870939619552310.1290603804477
1152919.13685246225389.8631475377462
1162121.0172780949612-0.0172780949612091
1172522.91014764213462.08985235786538
1182020.3351195849978-0.335119584997802
1192222.3411931825783-0.341193182578279
1201321.4545183755986-8.45451837559863
1212624.88138618392891.11861381607114
1221719.2042755549757-2.20427555497568
1232521.22179439197753.77820560802254
1242020.6479602445680-0.647960244568033
1251917.88499048645051.11500951354948
1262121.5002993332838-0.500299333283803
1272220.62506976572541.37493023427456
1282421.50029933328382.49970066671620
1292121.1083406728092-0.108340672809213
1302625.37585266167280.624147338327247
1312422.29616123117661.70383876882337
1321620.6934915334920-4.69349153349203
1332321.03991890504261.96008109495738
1341821.0058328555399-3.00583285553992
1351622.2391847028313-6.23918470283133
1362623.09152379154712.9084762084529
1371919.9996381153462-0.999638115346158
1382120.39209611334310.607903886656902
1392121.4438221424609-0.443822142460858
1402221.60280715055310.397192849446898
1412324.2450086316506-1.24500863165063
1422924.97269843053804.02730156946196
1432122.0863277263980-1.08632772639805
1442120.41423758590220.585762414097839
1452321.19915358189601.80084641810396
1462723.11366526410623.88633473589383
1472526.4163831201304-1.41638312013039
1482122.2050986533286-1.20509865332862
1491020.7049367729133-10.7049367729133
1502023.3590828309545-3.35908283095451
1512622.94423369163733.05576630836267
1522422.75579265313431.24420734686572
1532928.3425897105230.657410289477015
1541922.9551795935363-3.95517959353627
1552421.55752553039032.44247446960973
1561921.0513641444639-2.05136414446392
1572423.47203721260040.527962787399602
1582221.56847143228920.431528567710781
1591723.9896438379481-6.98964383794805


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.4240695088133180.8481390176266360.575930491186682
80.3080695906928050.616139181385610.691930409307195
90.1881026221131520.3762052442263050.811897377886848
100.1073950848133350.214790169626670.892604915186665
110.1253786155639520.2507572311279030.874621384436048
120.2058737483117420.4117474966234830.794126251688258
130.7036308065955170.5927383868089660.296369193404483
140.7474808849279870.5050382301440250.252519115072013
150.6854616369051960.6290767261896090.314538363094804
160.6253493134419630.7493013731160740.374650686558037
170.544016746592950.91196650681410.45598325340705
180.8211344019953710.3577311960092580.178865598004629
190.7693482779710740.4613034440578530.230651722028927
200.7426149313898530.5147701372202940.257385068610147
210.7048038101440130.5903923797119730.295196189855987
220.6535883581916720.6928232836166560.346411641808328
230.6026527440578370.7946945118843260.397347255942163
240.6316229341546070.7367541316907870.368377065845393
250.5723254032916030.8553491934167930.427674596708397
260.5172386632467990.9655226735064030.482761336753201
270.4771256858678370.9542513717356740.522874314132163
280.4565870433246320.9131740866492640.543412956675368
290.4107672724149930.8215345448299860.589232727585007
300.3530551780254070.7061103560508140.646944821974593
310.3110831752696290.6221663505392570.688916824730371
320.4748098640603730.9496197281207450.525190135939627
330.5690107698502640.8619784602994730.430989230149736
340.7376967548054930.5246064903890130.262303245194507
350.728010830965190.5439783380696190.271989169034809
360.765912698124860.4681746037502810.234087301875140
370.7275781308548610.5448437382902780.272421869145139
380.688292482936750.62341503412650.31170751706325
390.678703051260010.6425938974799790.321296948739989
400.7288589309539570.5422821380920870.271141069046043
410.7026409868909830.5947180262180340.297359013109017
420.66467229627010.67065540745980.3353277037299
430.7915078279382920.4169843441234160.208492172061708
440.7777396536434860.4445206927130270.222260346356514
450.7766662217178570.4466675565642860.223333778282143
460.7374922460960050.5250155078079910.262507753903995
470.7084216510071610.5831566979856780.291578348992839
480.7641724422607060.4716551154785870.235827557739294
490.729188064077410.5416238718451810.270811935922591
500.7132945233685430.5734109532629130.286705476631457
510.6775032291586550.644993541682690.322496770841345
520.6353574439958370.7292851120083260.364642556004163
530.6062218719430020.7875562561139960.393778128056998
540.681849045257820.6363019094843610.318150954742181
550.7254516124910160.5490967750179680.274548387508984
560.6857590152665840.6284819694668330.314240984733416
570.6713995474035250.657200905192950.328600452596475
580.643279870258110.7134402594837810.356720129741890
590.6100390928012560.7799218143974870.389960907198744
600.6015753813836120.7968492372327750.398424618616388
610.5814005826774640.8371988346450710.418599417322536
620.5439416281250720.9121167437498570.456058371874928
630.531207740085770.937584519828460.46879225991423
640.5418626981502250.916274603699550.458137301849775
650.4985962820737170.9971925641474340.501403717926283
660.5642465429750590.8715069140498810.435753457024941
670.6261750824481750.7476498351036490.373824917551825
680.6632871715134960.6734256569730080.336712828486504
690.6391482792206780.7217034415586450.360851720779322
700.6339180381779710.7321639236440570.366081961822029
710.7036559807378340.5926880385243330.296344019262166
720.6679765132362780.6640469735274430.332023486763722
730.6293709878286870.7412580243426270.370629012171313
740.5857524468446040.8284951063107920.414247553155396
750.5467874833724150.906425033255170.453212516627585
760.5335533494454520.9328933011090950.466446650554548
770.5252913093277310.9494173813445380.474708690672269
780.4808746838924160.9617493677848330.519125316107584
790.454192924966640.908385849933280.54580707503336
800.4141944560135720.8283889120271440.585805543986428
810.4093870927221210.8187741854442420.590612907277879
820.4657083173696630.9314166347393260.534291682630337
830.4419412357082540.8838824714165080.558058764291746
840.417236571873850.83447314374770.58276342812615
850.3966852864782330.7933705729564660.603314713521767
860.3645790287328140.7291580574656280.635420971267186
870.3779598208339220.7559196416678450.622040179166078
880.41047755878160.82095511756320.5895224412184
890.389468311864150.77893662372830.61053168813585
900.4054575249365490.8109150498730970.594542475063451
910.4603883823101460.9207767646202930.539611617689854
920.4189360416862510.8378720833725020.581063958313749
930.3980123975854230.7960247951708460.601987602414577
940.356290090809710.712580181619420.64370990919029
950.3153106257766840.6306212515533690.684689374223316
960.3810793651715290.7621587303430590.61892063482847
970.3598424743446660.7196849486893330.640157525655334
980.347530568487860.695061136975720.65246943151214
990.342235679362020.684471358724040.65776432063798
1000.3568995384254010.7137990768508030.643100461574599
1010.3136337266844610.6272674533689220.686366273315539
1020.2808172841848140.5616345683696280.719182715815186
1030.2527494444193880.5054988888387750.747250555580612
1040.2167707743439250.4335415486878490.783229225656075
1050.1874101917081770.3748203834163540.812589808291823
1060.2100503111513380.4201006223026760.789949688848662
1070.2269554646830050.453910929366010.773044535316995
1080.2454782756510180.4909565513020350.754521724348982
1090.2083701744036840.4167403488073670.791629825596316
1100.2095095389153980.4190190778307960.790490461084602
1110.2542579979206590.5085159958413180.745742002079341
1120.4080759015137570.8161518030275140.591924098486243
1130.3611703886045490.7223407772090970.638829611395451
1140.6564680777506970.6870638444986060.343531922249303
1150.923175128253550.1536497434929000.0768248717464501
1160.9041680818756770.1916638362486460.0958319181243228
1170.9046845515872350.1906308968255290.0953154484127646
1180.8798212203211480.2403575593577030.120178779678852
1190.8502297935964830.2995404128070340.149770206403517
1200.9519179540995750.0961640918008490.0480820459004245
1210.9364322465340110.1271355069319770.0635677534659887
1220.9209110737491280.1581778525017440.079088926250872
1230.9260732172861870.1478535654276260.0739267827138132
1240.9040069126612640.1919861746774720.095993087338736
1250.8774870738452350.2450258523095310.122512926154765
1260.8441020093290850.311795981341830.155897990670915
1270.8238018431325550.3523963137348910.176198156867445
1280.8160319721018730.3679360557962530.183968027898127
1290.7778140067180020.4443719865639960.222185993281998
1300.7287899773540980.5424200452918040.271210022645902
1310.7075825072759340.5848349854481320.292417492724066
1320.6934200825214650.613159834957070.306579917478535
1330.6805232042436210.6389535915127570.319476795756379
1340.6294853036269130.7410293927461730.370514696373087
1350.7002384811879760.5995230376240480.299761518812024
1360.6813362841467130.6373274317065740.318663715853287
1370.6182229802398440.7635540395203120.381777019760156
1380.5566676619995250.886664676000950.443332338000475
1390.495269435398850.99053887079770.50473056460115
1400.4329970503617840.8659941007235680.567002949638216
1410.3726853558850160.7453707117700320.627314644114984
1420.3916609264330860.7833218528661710.608339073566914
1430.3392835642366100.6785671284732210.66071643576339
1440.2661818458200850.532363691640170.733818154179915
1450.2504057492758540.5008114985517070.749594250724146
1460.2183180003964810.4366360007929620.781681999603519
1470.1552335672630260.3104671345260520.844766432736974
1480.1029044993455560.2058089986911120.897095500654444
1490.4410857762124020.8821715524248050.558914223787598
1500.3851380901285510.7702761802571020.614861909871449
1510.3542154770726190.7084309541452390.64578452292738
1520.2439761763953080.4879523527906160.756023823604692


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


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/1ki0w1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/1ki0w1293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/2urzg1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/2urzg1293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/3urzg1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/3urzg1293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/4urzg1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/4urzg1293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/5n1g21293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/5n1g21293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/6n1g21293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/6n1g21293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/7gaym1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/7gaym1293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/8gaym1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/8gaym1293043909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/9qjxp1293043909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293043898d1zfrxes0un84qm/9qjxp1293043909.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