Home » date » 2010 » Nov » 23 »

W7

*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: Tue, 23 Nov 2010 18:22:31 +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/23/t1290536452exrwvl6aj8wad8o.htm/, Retrieved Tue, 23 Nov 2010 19:21:03 +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/23/t1290536452exrwvl6aj8wad8o.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 0 14 0 11 0 12 0 24 26 0 25 25 11 11 7 7 8 8 25 23 23 17 17 6 6 17 17 8 8 30 25 25 18 0 12 0 10 0 8 0 19 23 0 18 18 8 8 12 12 9 9 22 19 19 16 16 10 10 12 12 7 7 22 29 29 20 20 10 10 11 11 4 4 25 25 25 16 16 11 11 11 11 11 11 23 21 21 18 18 16 16 12 12 7 7 17 22 22 17 17 11 11 13 13 7 7 21 25 25 23 0 13 0 14 0 12 0 19 24 0 30 30 12 12 16 16 10 10 19 18 18 23 23 8 8 11 11 10 10 15 22 22 18 18 12 12 10 10 8 8 16 15 15 15 0 11 0 11 0 8 0 23 22 0 12 0 4 0 15 0 4 0 27 28 0 21 21 9 9 9 9 9 9 22 20 20 15 0 8 0 11 0 8 0 14 12 0 20 0 8 0 17 0 7 0 22 24 0 31 31 14 14 17 17 11 11 23 20 20 27 27 15 15 11 11 9 9 23 21 21 34 0 16 0 18 0 11 0 21 20 0 21 21 9 9 14 14 13 13 19 21 21 31 0 14 0 10 0 8 0 18 23 0 19 0 11 0 11 0 8 0 20 28 0 16 16 8 8 15 15 9 9 23 24 24 20 20 9 9 15 15 6 6 25 24 24 21 0 9 0 13 0 9 0 19 24 0 22 0 9 0 16 0 9 0 24 23 0 17 17 9 9 13 13 6 6 22 23 23 24 0 10 0 9 0 6 0 25 29 0 25 25 16 16 18 18 16 16 26 24 24 26 26 11 11 18 18 5 5 29 18 18 25 25 8 8 12 12 7 7 32 25 25 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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 7.32684596059117 + 0.356979436989242CM[t] -0.0592285666748474`CM*G`[t] -0.483865613410507D[t] + 0.175232812441502`D*G`[t] -0.0310127872102974PE[t] + 0.323284473674036`PE*G`[t] + 0.0927245043282856PC[t] -0.123099907387686`PC*G`[t] + 0.509759645731013PS[t] -0.132008906567604`PS*G`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.326845960591172.2792843.21450.0016060.000803
CM0.3569794369892420.0862824.13745.9e-052.9e-05
`CM*G`-0.05922856667484740.115217-0.51410.6079810.303991
D-0.4838656134105070.16529-2.92740.0039630.001981
`D*G`0.1752328124415020.2164790.80950.4195530.209777
PE-0.03101278721029740.161508-0.1920.8479920.423996
`PE*G`0.3232844736740360.2031791.59110.1137280.056864
PC0.09272450432828560.2272940.40790.6839040.341952
`PC*G`-0.1230999073876860.276833-0.44470.657210.328605
PS0.5097596457310130.1031614.94142e-061e-06
`PS*G`-0.1320089065676040.106177-1.24330.215740.10787


Multiple Linear Regression - Regression Statistics
Multiple R0.623397994765618
R-squared0.388625059877793
Adjusted R-squared0.347034927896691
F-TEST (value)9.34416510277905
F-TEST (DF numerator)10
F-TEST (DF denominator)147
p-value6.79212242005178e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.41759903161865
Sum Squared Residuals1716.95752171535


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.14553804221850.854461957781518
22521.86682248932133.13317751067866
33024.70619787461545.29380212538459
41920.1022284798081-1.10222847980808
52220.62844487263331.37155512736673
62223.2539357278194-1.25393572781936
72522.73279077513782.26720922486223
82319.50952371484173.49047628515826
91719.3533854884903-2.35338548849026
102122.0243225269749-1.02432252697485
111922.1598665655467-3.15986656554673
121923.7278847161621-4.72788471616212
131522.9278043521723-7.92780435217232
141617.3287427422355-1.32874274223554
152318.97438334930954.02561665069047
162723.85411304044713.14588695955289
172220.71400036237961.28599963762036
181415.3283837322309-1.32838373223092
192222.9515954383592-0.95159543835922
202324.4257677462697-1.42576774626966
212321.61100289054291.38899710945714
222122.3792292961033-1.37922929610334
231922.4316079216241-3.43160792162414
241823.7752299338472-5.77522993384719
252023.4608589716526-3.46085897165258
262322.79851188721270.201488112787262
272523.77200877667951.22799122332049
281923.1342094194357-4.13420941943571
292422.88839084906311.11160915093695
302221.91646205364540.0835379463545565
312526.1159579815043-1.11595798150433
322623.67339455026572.32660544973434
332923.5819344240985.41806557590197
343225.03995620593336.96004379406672
352522.23892111199542.76107888800462
362924.53932085976224.46067914023782
372825.27658978087992.72341021912010
381715.53191010808341.46808989191663
392826.35818198025321.64181801974678
402922.44633445998396.55366554001613
412626.56693529096-0.566935290959991
422523.60636188250301.39363811749705
431417.8563378961915-3.85633789619151
442522.82365251609612.17634748390394
452621.78391858060764.21608141939244
462020.0197966730921-0.0197966730920678
471821.8150714731331-3.81507147313315
483224.84451223211047.15548776788959
492524.82781720386660.172182796133373
502522.54301313515552.45698686484448
512321.31652708654931.68347291345067
522122.00155939135-1.00155939135
532024.0368130668541-4.03681306685412
541516.4264490613949-1.42644906139486
553024.75672139714475.24327860285527
562425.2751706249969-1.27517062499689
572624.25456406831951.74543593168049
582420.86145169323213.13854830676792
592222.6506184978980-0.650618497897962
601416.4664066566256-2.46640665662557
612422.24706410442011.75293589557994
622422.37217029304041.62782970695965
632423.73671537058860.2632846294114
642420.28287259087743.71712740912255
651917.904937910521.09506208948001
663127.83402469444283.16597530555724
672227.1571704728309-5.15717047283094
682720.79824710393596.2017528960641
691917.23961821629981.76038178370016
702522.30265636193122.69734363806884
712024.7999565993862-4.79995659938623
722121.3125016453599-0.312501645359875
732727.4138927489721-0.413892748972068
742324.9471571086258-1.94715710862584
752525.9362647377293-0.936264737729285
762022.2858105036534-2.28581050365345
772222.7604633484450-0.760463348444953
782323.5177657911834-0.517765791183384
792524.19670528600240.80329471399764
802523.54930461510281.45069538489718
811723.6280693653108-6.6280693653108
821920.5703687834139-1.57036878341388
832524.25141165187470.748588348125348
841922.7422850822930-3.74228508229305
852021.8879908223272-1.88799082232724
862622.62241550322933.37758449677065
872321.15312960361571.84687039638430
882724.52188431994942.47811568005063
891720.2526697734074-3.25266977340741
901722.3760412457908-5.3760412457908
911919.9831294721654-0.983129472165419
921719.6249744934655-2.62497449346553
932222.5478747596857-0.54787475968566
942124.1042795613991-3.10427956139915
953229.06551472792172.93448527207831
962123.7956913539753-2.79569135397530
972124.7785458291776-3.77854582917763
981820.7365353868179-2.73653538681792
991821.5248298414760-3.52482984147597
1002323.1018747569259-0.101874756925861
1011920.1836243613537-1.18362436135368
1022021.7975879969896-1.79758799698959
1032122.6081367464553-1.60813674645531
1042024.1323885337656-4.13238853376561
1051719.1791311281402-2.17913112814022
1061820.2424034384410-2.24240343844095
1071920.8572106203013-1.85721062030133
1082222.4324698906192-0.43246989061923
1091517.5105239414586-2.51052394145862
1101419.2004413271801-5.2004413271801
1111826.572667808271-8.572667808271
1122421.88853660741992.11146339258007
1133523.958711600139811.0412883998602
1142918.847118046421610.1528819535784
1152122.3354701265229-1.33547012652286
1162521.14644148444673.85355851555328
1172018.0356398518591.964360148141
1182222.0807735259196-0.0807735259195528
1191315.8935840669944-2.89358406699437
1202622.80157684365313.19842315634688
1211717.4390415770972-0.439041577097251
1222520.49144411488554.50855588511451
1232020.3391927870663-0.339192787066306
1241917.57710337106761.42289662893241
1252121.0829634567250-0.0829634567249715
1262221.19127959987670.808720400123346
1272422.68040710109461.31959289890544
1282123.2399778177666-2.23997781776660
1292625.24751927311130.752480726888736
1302420.74732009216543.25267990783464
1311620.5101872124217-4.51018721242169
1322322.41693852004820.583061479951772
1331820.8190080445639-2.8190080445639
1341622.0788724431762-6.0788724431762
1352621.83975985313414.16024014686593
1361919.5541578161299-0.554157816129855
1372117.41968092024053.58031907975947
1382122.2211700720996-1.22117007209955
1392218.64377978015463.35622021984542
1402319.58408975538373.41591024461629
1412924.9466159863524.05338401364798
1422120.33652744014640.663472559853618
1432120.04619444492130.953805555078684
1442322.51239332242150.487606677578455
1452723.12225025687113.87774974312893
1462525.6519318180701-0.651931818070076
1472121.0615436711115-0.0615436711115204
1481017.4578058960550-7.45780589605502
1492022.7513670629223-2.75136706292233
1502622.37355994525753.62644005474245
1512424.2251070127566-0.225107012756570
1522932.1262672519407-3.12626725194067
1531919.5422299608837-0.542229960883653
1542422.89247082899081.10752917100924
1551921.1609605753186-2.16096057531862
1562423.18303848140020.81696151859982
1572222.2559762228679-0.255976222867863
1581724.2411685019621-7.24116850196213


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
140.9735634859758580.05287302804828460.0264365140241423
150.9455744315490520.1088511369018970.0544255684509485
160.9035338384119310.1929323231761380.0964661615880688
170.8474225921095320.3051548157809370.152577407890468
180.7733501550761460.4532996898477080.226649844923854
190.7938385536594890.4123228926810220.206161446340511
200.7608726143158120.4782547713683760.239127385684188
210.7425996778345740.5148006443308520.257400322165426
220.7076721162836520.5846557674326960.292327883716348
230.6643096335636260.6713807328727470.335690366436374
240.6555445059779780.6889109880440440.344455494022022
250.6442597690537140.7114804618925710.355740230946286
260.5682026588479860.8635946823040280.431797341152014
270.4945763640017450.989152728003490.505423635998255
280.4416392864603240.8832785729206470.558360713539676
290.4100660486581410.8201320973162830.589933951341859
300.3436475986349960.6872951972699910.656352401365004
310.3153217517159430.6306435034318860.684678248284057
320.3106333334258460.6212666668516920.689366666574154
330.400563252989660.801126505979320.59943674701034
340.5466588165776250.906682366844750.453341183422375
350.5084821565198240.9830356869603520.491517843480176
360.564293879884450.87141224023110.43570612011555
370.6184214318917030.7631571362165940.381578568108297
380.5816259816523180.8367480366953640.418374018347682
390.5305438244955990.9389123510088030.469456175504401
400.6523682098279930.6952635803440150.347631790172007
410.5983594174135050.803281165172990.401640582586495
420.5447325271948890.9105349456102220.455267472805111
430.5453382361682030.9093235276635950.454661763831797
440.5046489129565510.9907021740868980.495351087043449
450.5436714639969910.9126570720060190.456328536003009
460.4880714354488530.9761428708977050.511928564551148
470.4917515019958670.9835030039917350.508248498004133
480.6003264532235060.7993470935529880.399673546776494
490.5496507669871070.9006984660257850.450349233012893
500.5188812952754540.962237409449090.481118704724546
510.5093311384253580.9813377231492830.490668861574642
520.4595875864231060.9191751728462130.540412413576894
530.4919380010218540.9838760020437070.508061998978147
540.4561417927010010.9122835854020020.543858207298999
550.6185270995401890.7629458009196230.381472900459811
560.5755107353730650.848978529253870.424489264626935
570.5355498462079160.9289003075841690.464450153792084
580.5195855313840920.9608289372318160.480414468615908
590.4717392410606110.9434784821212220.528260758939389
600.4359640218174840.8719280436349680.564035978182516
610.3981574827270490.7963149654540980.601842517272951
620.3623657095105870.7247314190211750.637634290489413
630.317853579835260.635707159670520.68214642016474
640.3266479621709270.6532959243418540.673352037829073
650.2860117960680720.5720235921361440.713988203931928
660.3264786302283360.6529572604566730.673521369771664
670.3857437699770700.7714875399541410.61425623002293
680.4990263875300350.998052775060070.500973612469965
690.451545364878520.903090729757040.54845463512148
700.4360221613942650.872044322788530.563977838605735
710.5105016422196560.9789967155606880.489498357780344
720.4623603290781220.9247206581562440.537639670921878
730.41750624656480.83501249312960.5824937534352
740.3840469850040670.7680939700081330.615953014995933
750.3496293139267970.6992586278535950.650370686073203
760.3248141810752460.6496283621504930.675185818924754
770.2836908203962310.5673816407924620.716309179603769
780.2493707048458170.4987414096916330.750629295154183
790.2145199058510150.4290398117020310.785480094148985
800.1892744401198740.3785488802397480.810725559880126
810.3000387047432110.6000774094864230.699961295256789
820.2710835706479630.5421671412959250.728916429352037
830.2342848305491410.4685696610982830.765715169450859
840.2326053809486090.4652107618972180.767394619051391
850.2081258566275940.4162517132551890.791874143372406
860.2076259006572620.4152518013145230.792374099342738
870.1839739323444880.3679478646889770.816026067655512
880.1713032226199380.3426064452398760.828696777380062
890.1640569014126490.3281138028252990.83594309858735
900.1995838368330280.3991676736660560.800416163166972
910.1698731530501960.3397463061003920.830126846949804
920.1511803368886090.3023606737772170.848819663111391
930.1273550901845680.2547101803691360.872644909815432
940.1172709580655420.2345419161310850.882729041934458
950.1138121052844650.2276242105689310.886187894715535
960.1020335092590480.2040670185180960.897966490740952
970.1040427029230850.2080854058461700.895957297076915
980.09253416721773320.1850683344354660.907465832782267
990.09146912481511880.1829382496302380.908530875184881
1000.07243667932974730.1448733586594950.927563320670253
1010.05723829503347350.1144765900669470.942761704966527
1020.04632572532386120.09265145064772250.953674274676139
1030.0368349835854440.0736699671708880.963165016414556
1040.0389300929345070.0778601858690140.961069907065493
1050.03194431543909780.06388863087819550.968055684560902
1060.02760401680589540.05520803361179080.972395983194105
1070.02354690392575230.04709380785150450.976453096074248
1080.01735871295398820.03471742590797640.982641287046012
1090.01590832805488110.03181665610976210.984091671945119
1100.02190827843321250.04381655686642510.978091721566787
1110.1157082289444000.2314164578888010.8842917710556
1120.1062591126995600.2125182253991210.89374088730044
1130.4570947327532970.9141894655065930.542905267246703
1140.7856502963521160.4286994072957670.214349703647884
1150.7443418695194730.5113162609610540.255658130480527
1160.8219565434877910.3560869130244170.178043456512209
1170.799922502786950.40015499442610.20007749721305
1180.7551673350943040.4896653298113910.244832664905696
1190.764233893069380.4715322138612420.235766106930621
1200.735721300832810.5285573983343810.264278699167190
1210.681943379315360.6361132413692810.318056620684641
1220.7026859069316840.5946281861366330.297314093068316
1230.6476136839698240.7047726320603520.352386316030176
1240.5883769984607260.8232460030785480.411623001539274
1250.547545669816720.904908660366560.45245433018328
1260.5007400884780520.9985198230438960.499259911521948
1270.4447796631440270.8895593262880540.555220336855973
1280.3843992775395220.7687985550790450.615600722460478
1290.3286866656599670.6573733313199340.671313334340033
1300.3096518361904700.6193036723809410.69034816380953
1310.3131151280606020.6262302561212030.686884871939399
1320.3821631470583390.7643262941166780.617836852941661
1330.352283373971770.704566747943540.64771662602823
1340.3022388934269280.6044777868538560.697761106573072
1350.2438292185900090.4876584371800170.756170781409991
1360.1862251455357200.3724502910714390.81377485446428
1370.1797805220026770.3595610440053530.820219477997324
1380.1261461965906670.2522923931813340.873853803409333
1390.09699337880382160.1939867576076430.903006621196178
1400.0729144525093620.1458289050187240.927085547490638
1410.08441511266564360.1688302253312870.915584887334356
1420.1434369215272090.2868738430544190.85656307847279
1430.08226356211768830.1645271242353770.917736437882312
1440.04441999580495240.08883999160990470.955580004195048


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level40.0305343511450382OK
10% type I error level110.083969465648855OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/10ugx51290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/10ugx51290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/16xiu1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/16xiu1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/26xiu1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/26xiu1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/3y6zx1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/3y6zx1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/4y6zx1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/4y6zx1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/5y6zx1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/5y6zx1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/69fyi1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/69fyi1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/717yk1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/717yk1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/817yk1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/817yk1290536540.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/917yk1290536540.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290536452exrwvl6aj8wad8o/917yk1290536540.ps (open in new window)


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