Home » date » 2010 » Nov » 23 »

WS7 comp 5

*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 09:29:52 +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/t1290504523k1944ebujjn9elz.htm/, Retrieved Tue, 23 Nov 2010 10:28:47 +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/t1290504523k1944ebujjn9elz.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 «
27 24 14 11 12 24 23 25 11 7 8 25 25 17 6 17 8 30 23 18 12 10 8 19 19 18 8 12 9 22 29 16 10 12 7 22 25 20 10 11 4 25 21 16 11 11 11 23 22 18 16 12 7 17 25 17 11 13 7 21 24 23 13 14 12 19 18 30 12 16 10 19 22 23 8 11 10 15 15 18 12 10 8 16 22 15 11 11 8 23 28 12 4 15 4 27 20 21 9 9 9 22 12 15 8 11 8 14 24 20 8 17 7 22 20 31 14 17 11 23 21 27 15 11 9 23 20 34 16 18 11 21 21 21 9 14 13 19 23 31 14 10 8 18 28 19 11 11 8 20 24 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 23 22 9 16 9 24 23 17 9 13 6 22 29 24 10 9 6 25 24 25 16 18 16 26 18 26 11 18 5 29 25 25 8 12 7 32 21 17 9 17 9 25 26 32 16 9 6 29 22 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 23 25 12 12 7 29 30 29 14 18 10 26 23 22 9 14 9 25 17 18 10 15 8 14 23 17 9 16 5 25 23 20 10 10 8 26 25 15 12 11 8 20 24 20 14 14 10 18 24 33 14 9 6 32 23 29 10 12 8 25 21 23 14 17 7 25 24 26 16 5 4 23 24 18 9 12 8 21 28 20 10 12 8 20 16 11 6 6 4 15 20 28 8 24 20 30 29 26 13 12 8 24 27 22 10 12 8 26 22 17 8 14 6 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
O[t] = + 17.4557480017071 -0.0596220828042757CM[t] + 0.218935765813514D[t] -0.136852917502793PE[t] -0.247202455609299PC[t] + 0.396808017049338PS[t] -0.0151046024523753t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.45574800170712.0449858.535900
CM-0.05962208280427570.062157-0.95920.3389690.169485
D0.2189357658135140.1109491.97330.0502740.025137
PE-0.1368529175027930.102916-1.32970.1855930.092796
PC-0.2472024556092990.128476-1.92410.0562080.028104
PS0.3968080170493380.0752825.27100
t-0.01510460245237530.006042-2.49990.0134860.006743


Multiple Linear Regression - Regression Statistics
Multiple R0.502833009131382
R-squared0.252841035072121
Adjusted R-squared0.223347918035494
F-TEST (value)8.57288277661948
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value4.9650928590772e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.44732602810375
Sum Squared Residuals1806.37662509432


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12724.12639498268312.87360501731687
22325.3278905094837-2.32789050948365
32525.3105946506167-0.310594650616672
42323.1425647952179-0.142564795217939
51922.9212328900446-3.92123289004464
62923.95764889604645.04235110395356
72525.7729402978557-0.772940297855665
82123.6912265690701-2.69122656907014
92223.1226654327152-1.12266543271515
102523.5228832346941.47711676530596
112421.42143643739512.57856356260492
121820.9907405657123-2.99074056571227
132219.61427999895242.38572000104762
141521.8010947195462-6.80109471954617
152224.3867238015357-2.38672380153568
162825.04656530742492.95343469257509
172023.1906059305252-3.1906059305252
181220.113330543294-8.11333054329397
192422.40066461380751.59933538619254
202022.4513298900013-2.45132989000128
212124.2091718008149-3.20917180081488
222021.7496570167093-1.74965701670926
232120.23647985471180.763520145288229
242322.10644918429250.89355081570746
252822.80676539464685.19323460535319
262422.70952966869431.29047033130573
272424.2100959017649-0.210095901764875
282421.28661958238992.71338041761012
292322.78537422987150.214625770128455
302323.4269301266781-0.426930126678148
312924.95124243156854.04875756843146
322422.88323754462421.11676245537582
331825.6234830931503-7.62348309315027
342526.5283299210078-1.5283299210078
352123.2528121287252-2.25281212872522
362627.2995894199509-1.2995894199509
372225.7333758885773-3.73337588857734
382223.4771472868362-1.47714728683625
392223.2668335411094-1.26683354110945
402326.1230213183996-3.12302131839959
413023.55415099336456.44584900663553
422323.2595282500456-0.25952825004559
431719.4473090951876-2.44730909518762
442324.2425334465938-1.24253344659383
452324.7438165167803-1.74381651678034
462522.94699284017752.05300715982245
472421.37306965750522.62693034249483
482427.8112646272391-3.81126462723911
492323.4762855096774-0.476285509677433
502124.2575943354001-3.2575943354001
512426.0917213589247-2.09172135892466
522422.28064677915651.71935322084353
532821.96842575985976.03157424014028
541621.440064081599-5.44006408159904
552020.382784054042-0.382784054042012
562923.80941882131485.19058117868516
572724.16961128673772.8303887132623
582223.441828608794-1.44182860879401
592824.1646579541893.83534204581103
601620.7974038487875-4.7974038487875
612523.14754903542811.85245096457191
622423.71764631689720.282353683102773
632823.87560203856834.12439796143166
642424.4657678785319-0.465767878531913
652322.86504362575530.134956374244671
663026.97145725543293.02854274456713
672421.59371583465392.40628416534612
682124.2233462419074-3.22334624190743
692523.41070505808411.58929494191586
702524.05147628673230.94852371326766
712221.0288971772650.971102822734967
722322.57669385542240.423306144577629
732622.97107202818363.02892797181637
742321.83700837149231.16299162850771
752523.12734248722521.87265751277479
762121.4421536550423-0.442153655042264
772523.65337295465181.34662704534815
782422.24176789085691.75823210914312
792923.53732959668295.46267040331713
802223.6441526759874-1.64415267598739
812723.59515596255973.40484403744026
822619.72032225745016.27967774254989
832221.35987620055910.640123799440915
842422.0045350562261.99546494377402
852723.07416631601473.92583368398533
862421.32907834753872.6709216524613
872424.6545555803014-0.654555580301407
882924.21460095495844.78539904504158
892222.1325846564454-0.132584656445435
902120.52595595638740.474044043612602
912420.44833154694433.55166845305574
922421.52589682737272.47410317262729
932321.78340782698361.21659217301641
942022.1073550865127-2.10735508651268
952721.21397479718435.78602520281575
962623.20429506819032.79570493180972
972521.83749466242373.16250533757629
982119.99580789130031.00419210869972
992120.56788678555180.432113214448156
1001920.2087963273881-1.20879632738806
1012121.3499989811539-0.349998981153919
1022120.96720025044340.0327997495565692
1031619.5418845376893-3.54188453768929
1042220.37130802209251.62869197790753
1052921.52231125346167.47768874653837
1061521.4335507122992-6.43355071229919
1071720.3825758695164-3.38257586951636
1081519.6521826821777-4.65218268217773
1092121.3416505865218-0.341650586521784
1102120.67243755771310.327562442286877
1111918.93819621893810.0618037810618711
1122417.83256849456136.1674315054387
1132021.8208394521637-1.82083945216374
1141724.4815226826983-7.48152268269833
1152324.1891167120328-1.18911671203275
1162421.81901507132462.1809849286754
1171421.4853857201907-7.48538572019065
1181922.2893922784086-3.28939227840865
1192421.68500947321662.31499052678337
1201319.9339185344671-6.9339185344671
1212224.6775723259204-2.67757232592043
1221620.5596548577463-4.55965485774628
1231922.6363293692522-3.63632936925217
1242522.07176028437082.92823971562922
1252523.52768023279931.47231976720075
1262320.79726897618522.20273102381479
1272422.76705575231981.23294424768024
1282622.77860132744523.22139867255476
1292620.81561986552225.1843801344778
1302523.42372837762411.57627162237588
1311821.5987301526461-3.59873015264608
1322119.20748266332831.79251733667169
1332622.78887238174773.21112761825228
1342321.15132230165431.8486776983457
1352319.08299420776333.91700579223668
1362221.80543840798250.194561592017452
1372021.5732875110786-1.57328751107855
1381321.2544028925807-8.25440289258065
1392420.56003022718133.43996977281871
1401520.7494922343872-5.74949223438724
1411422.2725233273091-8.2725233273091
1422223.1320753348997-1.13207533489966
1431017.0344098108871-7.03440981088713
1442423.45164365434810.548356345651932
1452220.94053964568361.05946035431638
1462424.7496275294982-0.749627529498184
1471920.7263874947993-1.72638749479933
1482021.095416151232-1.09541615123199
1491316.3226538637326-3.32265386373261
1502019.17805287851960.821947121480443
1512222.1018659862759-0.101865986275926
1522422.34952844770761.65047155229237
1532922.1905021414876.80949785851305
1541219.9285720399114-7.92857203991143
1552019.90308852565950.0969114743405294
1562120.33332616653080.66667383346915
1572422.52039849133271.47960150866731
1582220.8086580045641.19134199543599
1592016.89909546543.10090453459997


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.7186199108279950.562760178344010.281380089172005
110.6600194150133520.6799611699732960.339980584986648
120.5996068511600850.800786297679830.400393148839915
130.6255776213900010.7488447572199980.374422378609999
140.7513029834540270.4973940330919460.248697016545973
150.6751443341942060.6497113316115870.324855665805794
160.689095192109560.621809615780880.31090480789044
170.6067502023855190.7864995952289630.393249797614481
180.7290590554751750.5418818890496510.270940944524825
190.6707032937680160.6585934124639680.329296706231984
200.6211441516709950.757711696658010.378855848329005
210.5527790972945160.8944418054109680.447220902705484
220.4797215180119310.9594430360238620.520278481988069
230.4658683285768820.9317366571537650.534131671423118
240.5189900538701130.9620198922597740.481009946129887
250.6879959554737410.6240080890525180.312004044526259
260.6261218604605430.7477562790789140.373878139539457
270.5627128638193260.8745742723613480.437287136180674
280.5442866218351850.9114267563296310.455713378164815
290.4798324487856960.9596648975713920.520167551214304
300.4172624225995920.8345248451991840.582737577400408
310.4178517282417440.8357034564834890.582148271758256
320.3568293999505810.7136587999011630.643170600049419
330.618502441044590.762995117910820.38149755895541
340.578211751402320.843576497195360.42178824859768
350.5473024857698620.9053950284602760.452697514230138
360.4921190048475730.9842380096951460.507880995152427
370.4777482997756680.9554965995513350.522251700224332
380.4257702585132730.8515405170265470.574229741486727
390.3768871436878020.7537742873756050.623112856312198
400.3539181783426440.7078363566852880.646081821657356
410.5186758949460840.9626482101078330.481324105053916
420.4647950961917450.929590192383490.535204903808255
430.4351177449755450.870235489951090.564882255024455
440.387983839706830.775967679413660.61201616029317
450.3486089145507640.6972178291015280.651391085449236
460.321786707684390.6435734153687810.67821329231561
470.2976348227898120.5952696455796230.702365177210188
480.2942300509372830.5884601018745660.705769949062717
490.256853152301420.5137063046028390.74314684769858
500.256757177901530.5135143558030590.74324282209847
510.2366690752837490.4733381505674970.763330924716251
520.2065534150842970.4131068301685940.793446584915703
530.2768400598578890.5536801197157780.723159940142111
540.3550390810004390.7100781620008780.644960918999561
550.3400317152602090.6800634305204170.659968284739791
560.4007557585166330.8015115170332650.599244241483367
570.3774430003414630.7548860006829260.622556999658537
580.346348089446170.6926961788923410.65365191055383
590.3468410836019470.6936821672038930.653158916398053
600.4278762810348030.8557525620696050.572123718965197
610.3837405564306130.7674811128612260.616259443569387
620.3415489900662720.6830979801325450.658451009933728
630.3433016298784870.6866032597569730.656698370121513
640.3096327656362880.6192655312725760.690367234363712
650.2704146898923040.5408293797846080.729585310107696
660.2539917671825070.5079835343650150.746008232817493
670.2258332666433050.451666533286610.774166733356695
680.248782084906630.4975641698132590.75121791509337
690.2150165177325110.4300330354650210.78498348226749
700.1820937341758950.364187468351790.817906265824105
710.1531393823205020.3062787646410030.846860617679498
720.1277265266781270.2554530533562530.872273473321873
730.1115302323103140.2230604646206270.888469767689686
740.09100350751550110.1820070150310020.908996492484499
750.07444390556507190.1488878111301440.925556094434928
760.0623755378787910.1247510757575820.937624462121209
770.04961724208239740.0992344841647950.950382757917603
780.03882973140844080.07765946281688160.961170268591559
790.04411768162213110.08823536324426220.955882318377869
800.04046375875493210.08092751750986430.959536241245068
810.03396472280680690.06792944561361380.966035277193193
820.04504896975408230.09009793950816450.954951030245918
830.03529589428664280.07059178857328560.964704105713357
840.02772374331052750.05544748662105510.972276256689472
850.02550629200706670.05101258401413350.974493707992933
860.02029345535535480.04058691071070960.979706544644645
870.01653619585135850.03307239170271710.983463804148641
880.01694849614609450.03389699229218890.983051503853905
890.01431085404708690.02862170809417380.985689145952913
900.01083819328286050.0216763865657210.98916180671714
910.009292071293622060.01858414258724410.990707928706378
920.00760871173837320.01521742347674640.992391288261627
930.005622981697617360.01124596339523470.994377018302383
940.005316713315786490.0106334266315730.994683286684213
950.007886377530229280.01577275506045860.99211362246977
960.006454362154878410.01290872430975680.993545637845122
970.005531670832827570.01106334166565510.994468329167172
980.004248575726899450.00849715145379890.9957514242731
990.003212600628338870.006425201256677740.996787399371661
1000.002667847364548830.005335694729097660.997332152635451
1010.002103406987817010.004206813975634030.997896593012183
1020.001547178954356290.003094357908712590.998452821045644
1030.001883756615409670.003767513230819340.99811624338459
1040.001475768016740010.002951536033480010.99852423198326
1050.006374876189270630.01274975237854130.99362512381073
1060.01521242438782290.03042484877564590.984787575612177
1070.01600733120153970.03201466240307940.98399266879846
1080.02168842070743230.04337684141486460.978311579292568
1090.01700165860417110.03400331720834210.982998341395829
1100.01241894063536340.02483788127072680.987581059364637
1110.009034571816756850.01806914363351370.990965428183243
1120.02589348251335090.05178696502670170.974106517486649
1130.02607726166907350.05215452333814690.973922738330927
1140.06371830275631070.1274366055126210.93628169724369
1150.05494996546086430.1098999309217290.945050034539136
1160.04649721765091360.09299443530182730.953502782349086
1170.1184641576630750.2369283153261510.881535842336925
1180.1121862051485250.2243724102970510.887813794851475
1190.100826087401450.20165217480290.89917391259855
1200.1726539781023360.3453079562046710.827346021897664
1210.1701254179984840.3402508359969680.829874582001516
1220.214658122624510.4293162452490210.78534187737549
1230.2149436411664040.4298872823328070.785056358833596
1240.2049061985176870.4098123970353730.795093801482313
1250.1793550657003050.3587101314006090.820644934299695
1260.1458731824007850.291746364801570.854126817599215
1270.1159763657875240.2319527315750480.884023634212476
1280.1137430664352530.2274861328705060.886256933564747
1290.1580697073999530.3161394147999060.841930292600047
1300.1384746153267920.2769492306535830.861525384673208
1310.1178057816927860.2356115633855720.882194218307214
1320.105936269992990.211872539985980.89406373000701
1330.1046215139517030.2092430279034060.895378486048297
1340.09447347430754630.1889469486150930.905526525692454
1350.2126124780564310.4252249561128620.78738752194357
1360.1735167437927450.347033487585490.826483256207255
1370.148414592975740.296829185951480.85158540702426
1380.2065790742505370.4131581485010740.793420925749463
1390.4667712297550110.9335424595100230.533228770244988
1400.4129678295775620.8259356591551230.587032170422438
1410.5678396632406230.8643206735187540.432160336759377
1420.4791970818706730.9583941637413470.520802918129327
1430.6504885884651450.6990228230697090.349511411534855
1440.605555081070250.78888983785950.39444491892975
1450.5157944529676790.9684110940646420.484205547032321
1460.4117691749345620.8235383498691250.588230825065438
1470.4170306879965470.8340613759930940.582969312003453
1480.2869840211298870.5739680422597730.713015978870113
1490.2000209444922560.4000418889845130.799979055507744


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level70.05NOK
5% type I error level260.185714285714286NOK
10% type I error level380.271428571428571NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/1058e71290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/1058e71290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/1gohd1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/1gohd1290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/2gohd1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/2gohd1290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/39ggy1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/39ggy1290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/49ggy1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/49ggy1290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/59ggy1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/59ggy1290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/62pf11290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/62pf11290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/72pf11290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/72pf11290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/8cyem1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/8cyem1290504579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/9cyem1290504579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290504523k1944ebujjn9elz/9cyem1290504579.ps (open in new window)


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