Home » date » 2010 » Nov » 22 »

Workshop7, Mini-tutorial, 1

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 22 Nov 2010 22:12:50 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex.htm/, Retrieved Mon, 22 Nov 2010 23:17:40 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex.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 «
12 12 11 24 11 8 7 25 14 8 17 17 12 8 10 18 21 9 12 18 12 7 12 16 22 4 11 20 11 11 11 16 10 7 12 18 13 7 13 17 10 12 14 23 8 10 16 30 15 10 11 23 14 8 10 18 10 8 11 15 14 4 15 12 14 9 9 21 11 8 11 15 10 7 17 20 13 11 17 31 7 9 11 27 14 11 18 34 12 13 14 21 14 8 10 31 11 8 11 19 9 9 15 16 11 6 15 20 15 9 13 21 14 9 16 22 13 6 13 17 9 6 9 24 15 16 18 25 10 5 18 26 11 7 12 25 13 9 17 17 8 6 9 32 20 6 9 33 12 5 12 13 10 12 18 32 10 7 12 25 9 10 18 29 14 9 14 22 8 8 15 18 14 5 16 17 11 8 10 20 13 8 11 15 9 10 14 20 11 6 9 33 15 8 12 29 11 7 17 23 10 4 5 26 14 8 12 18 18 8 12 20 14 4 6 11 11 20 24 28 12 8 12 26 13 8 12 22 9 6 14 17 10 4 7 12 15 8 13 14 20 9 12 17 12 6 13 21 12 7 14 19 14 9 8 18 13 5 11 10 11 5 9 29 17 8 11 31 12 8 13 19 13 6 10 9 14 8 11 20 13 7 12 28 15 7 9 19 13 9 15 30 10 11 18 29 11 6 15 26 19 8 12 23 13 6 13 13 17 9 14 21 13 8 10 19 9 6 13 28 11 10 13 23 10 8 11 18 9 8 13 21 12 10 16 20 12 5 8 23 13 7 16 21 1 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
ParentalExpectations[t] = + 5.10714357111745 -0.00142234580182886Depression[t] + 0.691744367954341ParentalCriticism[t] + 0.0961766747674232ConcernOverMistakes[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.107143571117451.3757483.71230.0002860.000143
Depression-0.001422345801828860.069907-0.02030.9837930.491897
ParentalCriticism0.6917443679543410.0850468.133800
ConcernOverMistakes0.09617667476742320.0403842.38160.0184530.009226


Multiple Linear Regression - Regression Statistics
Multiple R0.612364119037733
R-squared0.374989814284858
Adjusted R-squared0.362892842948436
F-TEST (value)30.9986527913662
F-TEST (DF numerator)3
F-TEST (DF denominator)155
p-value8.88178419700125e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.75014920716009
Sum Squared Residuals1172.31470255471


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11115.6992480313658-4.69924803136577
2713.0298695801176-6.02986958011764
31712.25618914457284.74381085542723
41012.3552105109438-2.35521051094385
51213.0341537666817-1.03415376668173
61211.47111279345470.528887206545337
7119.766362930643041.23363706935696
81114.2395126110739-3.23951261107386
91211.66631083459320.333689165406833
101311.56586712242031.43413287757974
111415.605916048202-1.60591604820199
121614.89850872726891.10149127273107
131114.2153155832842-3.21531558328416
141012.3523658193402-2.35236581934019
151112.0695251782452-1.06952517824524
16159.008328298918295.99167170108171
17913.3326402115968-4.3326402115968
181112.0681028324434-1.06810283244341
191711.8586641841285.14133581587199
201715.67931804098151.32068195901845
211113.9196566808141-2.91965668081414
221815.9664257194822.03357428051801
231416.1024623750178-2.10246237501782
241013.6026625913167-3.60266259131669
251112.4528095315131-1.4528095315131
261512.85886856676882.14113143323117
271511.16549747037183.83450252962816
281313.331217865795-0.331217865794974
291613.42881688636422.57118311363577
301310.87412275446592.12587724553408
31911.5530488610452-2.55304886104519
321818.5581351405451-0.558135140545055
331811.05223549682396.94776450317613
341212.3381252121633-0.3381252121633
351712.94935585832894.05064414167106
36912.3238846049864-3.32388460498641
37912.4029931301319-3.40299313013189
38129.799094033243712.20090596675629
391816.47150612110881.5284938788912
401212.3395475579651-0.339547557965129
411814.80090970669973.19909029330033
421413.42881688636420.571183113635774
431512.36089989415122.63910010584884
441610.18095604070975.81904395929025
451012.5489862062805-2.54898620628053
461112.0652581408398-1.06525814083975
471413.93531963379290.0646803662071349
48912.4157942423483-3.41579424234834
491213.40888689598-1.40888689598002
501712.14577186262854.85422813737155
51510.3604911288695-5.36049112886953
521212.3523658193402-0.352365819340192
531212.5390297856677-0.539029785667723
5468.91215162415087-2.91215162415087
552421.6193320198722.380667980128
561213.1246239090832-1.12462390908324
571212.7384948642117-0.738494864211714
581410.87981213767323.12018786232677
5979.0140176821256-2.01401768212561
601311.96623677446871.03376322553133
611212.9393994377161-0.939399437716137
621311.26025179933741.73974820066256
631411.75964281775692.24035718224307
64813.0441101872945-5.04411018729453
65119.509141663139611.49085833686039
66911.3393431753243-2.33934317532431
671113.5983955539112-2.59839555391121
681312.45138718571130.548612814288727
691010.1047093563265-0.104709356326531
701112.544719168875-1.54471916887504
711212.6238105448619-0.623810544861912
72911.7553757803514-2.75537578035145
731514.19965263030540.80034736969456
741815.49123172885222.50876827114781
751511.74255751897643.25744248102362
761212.8261374641682-0.826137464168164
771310.48941605539622.51058394460378
781413.32837317419130.671626825808683
791012.4499648399094-2.44996483990944
801311.93775556011491.06224443988511
811314.2210049664915-1.22100496649148
821112.3580552025475-1.35805520254751
831312.64800757265160.351992427348394
841613.93105259638742.06894740361262
85810.7608607809179-2.76086078091794
861611.950573821494.04942617851005
871110.56708508558130.432914914418732
88912.0666804866416-3.06668048664158
891617.4631764289386-1.46317642893864
901211.74541935973860.254580640261357
911413.12320156328140.876798436718593
92810.1980413394903-2.1980413394903
93910.0862017117442-1.08620171174415
941511.35216143669943.64783856330063
951113.8377206132236-2.83772061322361
962116.37390710053954.62609289946046
971414.2915622676674-0.291562267667377
981816.18155375100471.8184462489953
991211.76106516355880.238934836441239
1001312.74276190161720.257238098382799
1011514.22242731229330.777572687706694
1021210.67750236752561.32249763247442
1031913.93105259638745.06894740361262
1041513.74012159265441.25987840734564
1051114.2138932374823-3.21389323748233
1061110.943257709840.056742290160013
1071011.9534185130936-1.95341851309361
1081314.3100699122498-1.31006991224976
1091515.0994133007733-0.0994133007733494
1101210.85847695064581.1415230493542
1111211.17973807754870.820261922451264
1121616.07968769303-0.07968769302996
113914.720395984911-5.72039598491097
1141815.09941330077332.90058669922665
115813.5648535419001-5.56485354190006
1161310.09046874914962.90953125085036
1171712.44854249410764.55145750589238
118910.8741227544659-1.87412275446592
1191513.72445863967561.27554136032436
12089.77631935125585-1.77631935125585
121710.6419094241627-3.64190942416266
1221211.27591475231620.724085247683841
1231414.8165726596784-0.816572659678395
124610.6888811339402-4.68888113394021
125811.7610651635588-3.76106516355876
1261712.54898620628054.45101379371947
127109.305392398031530.694607601968468
1281112.5504085520824-1.55040855208235
1291413.04837722470.95162277529998
1301113.7964382866534-2.79643828665337
1311314.8165726596784-1.81657265967839
1321212.1514783949944-0.151478394994373
1331110.18664542391710.813354576082939
13499.39161265218615-0.391612652186154
1351212.6437405352461-0.64374053524612
1362014.50526795338835.49473204661174
1371210.9560759712151.04392402878495
1381313.0441101872945-0.0441101872945335
1391212.9450888209235-0.945088820923453
1401216.2000613955871-4.20006139558708
141914.2010749761073-5.20107497610727
1421514.89566403566530.104335964334732
1432421.23035828339682.76964171660318
144710.5685074313831-3.5685074313831
1451714.71897363910912.28102636089086
1461112.0310875432787-1.03108754327865
1471714.29725165087472.70274834912531
1481111.8543971467225-0.854397146722527
1491212.8560238751652-0.856023875165174
1501414.1134495253094-0.113449525309423
1511113.239308228433-2.23930822843304
1521613.30986552960892.69013447039106
1532113.59126667574357.40873332425654
1541411.35642847410492.64357152589514
1552015.99632927963764.0036707203624
1561310.86701102545682.13298897454323
1571113.3127102212126-2.3127102212126
1581514.12056125431860.879438745681432
1591919.1408845723569-0.140884572356908


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.6790208333455420.6419583333089160.320979166654458
80.6542996460336970.6914007079326070.345700353966303
90.5265832788284090.9468334423431820.473416721171591
100.4066562151590910.8133124303181820.593343784840909
110.482437797008990.964875594017980.51756220299101
120.7359755579317810.5280488841364370.264024442068219
130.6695043107926240.6609913784147520.330495689207376
140.6219981693857510.7560036612284970.378001830614249
150.5427777504021860.9144444991956280.457222249597814
160.5928772689501520.8142454620996950.407122731049847
170.6051210903694460.7897578192611080.394878909630554
180.5412844727260210.9174310545479570.458715527273979
190.6689182749165950.662163450166810.331081725083405
200.748777946077540.502444107844920.25122205392246
210.7446004611024740.5107990777950520.255399538897526
220.7857689394097940.4284621211804130.214231060590206
230.7581786349622740.4836427300754530.241821365037726
240.7986692137955530.4026615724088940.201330786204447
250.7600140007127830.4799719985744330.239985999287217
260.7543842132608450.4912315734783110.245615786739155
270.7542296257988030.4915407484023940.245770374201197
280.7040258178284150.591948364343170.295974182171585
290.7186300121687970.5627399756624060.281369987831203
300.674569797956650.6508604040866980.325430202043349
310.7095206727096450.5809586545807090.290479327290355
320.7142835660869160.5714328678261680.285716433913084
330.8620445750441730.2759108499116540.137955424955827
340.8319928538027840.3360142923944320.168007146197216
350.8708312131958950.2583375736082090.129168786804105
360.88804998770670.2239000245866010.111950012293301
370.8958815027130260.2082369945739480.104118497286974
380.8766144437855950.2467711124288090.123385556214405
390.8864278238416840.2271443523166320.113572176158316
400.8594942014806160.2810115970387670.140505798519384
410.8823732216917690.2352535566164620.117626778308231
420.8565204779690540.2869590440618920.143479522030946
430.8448595758464680.3102808483070650.155140424153532
440.9029283351595870.1941433296808250.0970716648404127
450.9042448348204730.1915103303590530.0957551651795265
460.8885307126277760.2229385747444470.111469287372224
470.8627387695768740.2745224608462530.137261230423126
480.8761567177160580.2476865645678850.123843282283942
490.8540316769399840.2919366461200320.145968323060016
500.8988668872896480.2022662254207040.101133112710352
510.9554999638489820.08900007230203660.0445000361510183
520.9435847398632990.1128305202734020.056415260136701
530.9290518079482290.1418963841035420.070948192051771
540.944237856571010.1115242868579780.0557621434289892
550.9490967182116750.1018065635766510.0509032817883253
560.9373445350314570.1253109299370860.062655464968543
570.9223574272462280.1552851455075440.077642572753772
580.9238303847600630.1523392304798730.0761696152399366
590.921823104441990.1563537911160210.0781768955580106
600.9057208247295250.1885583505409490.0942791752704746
610.8865794079304660.2268411841390680.113420592069534
620.872096125454080.2558077490918390.12790387454592
630.8627341866999250.2745316266001510.137265813300075
640.9140226660060810.1719546679878370.0859773339939187
650.901651534560850.19669693087830.0983484654391501
660.8948134903685980.2103730192628040.105186509631402
670.8935538256170620.2128923487658770.106446174382939
680.8718043179921090.2563913640157820.128195682007891
690.85121804632140.2975639073572010.1487819536786
700.8311238124295520.3377523751408970.168876187570448
710.8038467202419960.3923065595160070.196153279758004
720.802387543880010.3952249122399790.197612456119989
730.7764794241551930.4470411516896140.223520575844807
740.7721486247120130.4557027505759730.227851375287987
750.7857186890469070.4285626219061850.214281310953093
760.7563303015213010.4873393969573980.243669698478699
770.7565055501423560.4869888997152870.243494449857644
780.7227320241675130.5545359516649750.277267975832487
790.7135725691342850.5728548617314290.286427430865715
800.6784832263811810.6430335472376380.321516773618819
810.6443129305298330.7113741389403350.355687069470167
820.6118215042901550.776356991419690.388178495709845
830.5687311018388260.8625377963223490.431268898161174
840.5516653252164380.8966693495671230.448334674783562
850.5526080723090820.8947838553818360.447391927690918
860.6096825191972320.7806349616055360.390317480802768
870.5659216578930470.8681566842139050.434078342106953
880.5727174460821020.8545651078357960.427282553917898
890.5486654491749460.9026691016501080.451334550825054
900.5056196851382720.9887606297234560.494380314861728
910.4640449389100980.9280898778201960.535955061089902
920.4431144930391010.8862289860782020.556885506960899
930.4031935654057430.8063871308114860.596806434594257
940.4382301146542340.8764602293084670.561769885345766
950.4362368158202980.8724736316405960.563763184179702
960.5116900131306410.9766199737387180.488309986869359
970.4707719203811690.9415438407623380.529228079618831
980.4410737890658280.8821475781316550.558926210934172
990.3963293926776060.7926587853552120.603670607322394
1000.3523643673156880.7047287346313770.647635632684312
1010.3132678396132630.6265356792265270.686732160386736
1020.2836366094332940.5672732188665880.716363390566706
1030.3956048285734560.7912096571469130.604395171426544
1040.3663586323592520.7327172647185030.633641367640748
1050.3887648654249380.7775297308498760.611235134575062
1060.3469941931406960.6939883862813920.653005806859304
1070.3195257766931640.6390515533863280.680474223306836
1080.2915488972755290.5830977945510580.708451102724471
1090.2523688389155510.5047376778311010.74763116108445
1100.2194226217744680.4388452435489360.780577378225532
1110.1921526674575680.3843053349151350.807847332542432
1120.1630391749416250.3260783498832490.836960825058375
1130.2711690438736210.5423380877472420.728830956126379
1140.2632426817291770.5264853634583530.736757318270823
1150.3682270069527150.736454013905430.631772993047285
1160.4013432573967440.8026865147934870.598656742603256
1170.4969839138431930.9939678276863860.503016086156807
1180.4582376415564380.9164752831128760.541762358443562
1190.4210198512031080.8420397024062150.578980148796892
1200.3842113748372460.7684227496744910.615788625162754
1210.446297517416140.892595034832280.55370248258386
1220.4031573246517460.8063146493034930.596842675348254
1230.3526902092979120.7053804185958240.647309790702088
1240.3930363048329080.7860726096658150.606963695167092
1250.42588616718480.85177233436960.5741138328152
1260.5291245162780470.9417509674439050.470875483721953
1270.5050495988473870.9899008023052270.494950401152613
1280.4523378504808750.904675700961750.547662149519125
1290.4138105713141780.8276211426283570.586189428685822
1300.488131958311450.97626391662290.51186804168855
1310.4442776268305910.8885552536611820.555722373169409
1320.3860467309940270.7720934619880540.613953269005973
1330.3720721540782620.7441443081565230.627927845921738
1340.3146590045515020.6293180091030040.685340995448498
1350.258295475230050.51659095046010.74170452476995
1360.365303055496620.730606110993240.63469694450338
1370.3063931766898530.6127863533797060.693606823310147
1380.2496018950206810.4992037900413620.750398104979319
1390.1983418417298840.3966836834597670.801658158270117
1400.2415590033608890.4831180067217770.758440996639111
1410.5551037131192350.889792573761530.444896286880765
1420.4929481340378330.9858962680756670.507051865962167
1430.4266614060534790.8533228121069570.573338593946521
1440.4882163364445110.9764326728890220.511783663555489
1450.4663133088704280.9326266177408560.533686691129572
1460.49556291211080.99112582422160.5044370878892
1470.400740870335240.801481740670480.59925912966476
1480.3240233290959290.6480466581918580.675976670904071
1490.2298802091907570.4597604183815130.770119790809243
1500.1706574976265610.3413149952531220.829342502373439
1510.1504911621898290.3009823243796590.84950883781017
1520.08203647115915980.164072942318320.91796352884084


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/Nov/22/t1290464257u3txd6hhnlq8nex/104e201290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/104e201290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/1fd5p1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/1fd5p1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/28mma1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/28mma1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/38mma1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/38mma1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/48mma1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/48mma1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/5jdmv1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/5jdmv1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/6jdmv1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/6jdmv1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/7b42f1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/7b42f1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/8b42f1290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/8b42f1290463957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/94e201290463957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464257u3txd6hhnlq8nex/94e201290463957.ps (open in new window)


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