Home » date » 2010 » Nov » 24 »

ws 7 4

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 13:33:12 +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/24/t1290605629tpo6mafqislrwxu.htm/, Retrieved Wed, 24 Nov 2010 14:34:01 +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/24/t1290605629tpo6mafqislrwxu.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 «
9 26 24 14 11 12 24 9 23 25 11 7 8 25 9 25 17 6 17 8 30 9 23 18 12 10 8 19 9 19 18 8 12 9 22 10 29 16 10 12 7 22 10 25 20 10 11 4 25 10 21 16 11 11 11 23 10 22 18 16 12 7 17 10 25 17 11 13 7 21 10 24 23 13 14 12 19 10 18 30 12 16 10 19 10 22 23 8 11 10 15 10 15 18 12 10 8 16 10 22 15 11 11 8 23 10 28 12 4 15 4 27 10 20 21 9 9 9 22 10 12 15 8 11 8 14 10 24 20 8 17 7 22 10 20 31 14 17 11 23 10 21 27 15 11 9 23 10 20 34 16 18 11 21 10 21 21 9 14 13 19 10 23 31 14 10 8 18 10 28 19 11 11 8 20 10 24 16 8 15 9 23 10 24 20 9 15 6 25 10 24 21 9 13 9 19 10 23 22 9 16 9 24 10 23 17 9 13 6 22 10 29 24 10 9 6 25 10 24 25 16 18 16 26 10 18 26 11 18 5 29 10 25 25 8 12 7 32 10 21 17 9 17 9 25 10 26 32 16 9 6 29 10 22 33 11 9 6 28 10 22 13 16 12 5 17 10 22 32 12 18 12 28 10 23 25 12 12 7 29 10 30 29 14 18 10 26 10 23 22 9 14 9 25 10 17 18 10 15 8 14 10 23 17 9 16 5 25 10 23 20 10 10 8 26 10 25 15 12 11 8 20 10 24 20 14 14 10 18 10 24 33 14 9 6 32 10 23 29 10 12 8 25 10 21 23 14 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] = + 17.5320115250951 -0.139909328473949maand[t] -0.070363411108702CM[t] + 0.218463701335249D[t] -0.147631760526752PE[t] -0.256721327474915PC[t] + 0.421989595060317PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.532011525095116.3706061.07090.2858920.142946
maand-0.1399093284739491.626397-0.0860.931560.46578
CM-0.0703634111087020.063231-1.11280.2675550.133777
D0.2184637013352490.1130391.93260.0551410.02757
PE-0.1476317605267520.105729-1.39630.1646540.082327
PC-0.2567213274749150.132088-1.94360.0537950.026897
PS0.4219895950603170.0763855.524500


Multiple Linear Regression - Regression Statistics
Multiple R0.47160366663133
R-squared0.222410018380114
Adjusted R-squared0.191715677000382
F-TEST (value)7.24596158062454
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value8.09619131958428e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.51076676883417
Sum Squared Residuals1873.47346238284


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12623.06574250686852.93425749313151
22324.3793899388211-1.37938993882106
32524.48360909104850.516390908951501
42322.11556466597510.884435334024934
51921.9556937972866-2.95569379728661
62922.90688134865046.09311865134962
72524.80919223234800.190807767651953
82122.6680810956730-1.66808109567305
92221.96698875914290.0330112408571081
102522.48536028328992.51463971671013
112420.22488963128623.77511036871381
121819.7320611860864-1.73206118608635
132218.40095068089883.59904931910124
141520.7096865523202-5.70968655232017
152223.5086084892065-1.50860848920649
162824.31476946121983.68523053878023
172022.2660532184021-2.26605321840206
181219.0553110296579-7.05531102965789
192421.45034149891132.54965850108868
202021.3822304698878-1.38223046988775
212123.2813810337682-2.28138103376815
222020.6164566885848-0.61645668858476
232119.23504032068771.76495967931231
242321.07586880069821.92413119930183
252821.96118605959076.03881394040927
262421.93560560451012.06439439548988
272423.48675883395590.513241166044059
282420.40955739111413.59044260888591
292322.00624667372670.993753326273276
302322.72714380315460.272856196845402
312924.30955945401694.69044054598311
322422.07606872649011.92393127350990
331825.0032901961102-7.00329019611016
342526.0565791966047-1.05657919660475
352122.6324215638038-1.6324215638038
362626.7453927534000-0.745392753400043
372225.1607212405548-3.16072124055478
382222.8322484696362-0.832248469636231
392222.5805345434085-0.580534543408475
402325.6644652167648-2.66446521676479
413022.89801564423437.10198435576573
422322.72349978984050.276500210159454
431718.6906211568953-1.69062115689527
442323.8069386342302-0.80693863423021
452324.3519282780354-1.35192827803544
462522.46110340536082.53889659463921
472420.74589662583713.25410337416294
482427.5040707248018-3.50407072480179
492323.0014044619433-0.00140446194329844
502123.8160022587777-2.81600225877766
512425.7396053467472-1.73960534674719
522421.86897990256252.1310200974375
532821.52472718662006.47527281337997
541621.0868709790159-5.08687097901593
552019.89255138966310.107448610336903
562923.44589620421485.55410379578516
572723.91593793476453.08406206523547
582223.2050275314132-1.20502753141323
592824.04126667413803.95873332586205
601620.3596568290598-4.35965682905983
612522.94859077137722.05140922862276
622423.50813305017570.491866949824326
632823.68143418706194.31856581293809
642424.3426092077165-0.342609207716546
652322.72416744559820.275832554401772
663026.96486499764543.03513500235455
672421.30541321240122.69458678759881
682124.1829223012890-3.18292230128895
692523.34083239376451.65916760623548
702524.00077062378360.999229376216382
712220.78161382255481.21838617744517
722322.49823310050900.50176689949103
732622.85693993056483.14306006943519
742321.59378923291371.40621076708634
752523.06457836730371.93542163269627
762121.3136369532939-0.313636953293923
772523.67892635920531.32107364079466
782422.18328551977401.81671448022596
792923.59325030663375.40674969336631
802223.6560424688103-1.65604246881033
812723.63636531845993.36363468154007
822619.67326217884226.32673782115776
832221.32166982259480.678330177405243
842422.09377806219431.90622193780572
852723.12619318810643.87380681189365
862421.33902176221452.66097823778552
872424.9040970888247-0.904097088824728
882924.45926311426574.54073688573425
892222.2218194588866-0.221819458886641
902120.58584314002270.414156859977307
912420.41516921907443.58483078092564
922421.81802289302732.18197710697268
932321.97173501121411.02826498878587
942022.2985269278928-2.29852692789283
952721.43280559703075.56719440296928
962623.45903365050772.54096634949231
972521.93151661896773.0684833810323
982120.05616131264760.943838687352392
992120.78936903374780.210630966252239
1001920.3923894137552-1.39238941375524
1012121.6232678019448-0.623267801944792
1022121.3126061980473-0.312606198047303
1031619.7593985066477-3.75939850664769
1042220.69417826469721.30582173530283
1052921.82168086421187.17831913578816
1061521.6985918941881-6.69859189418806
1071720.7254420312486-3.72544203124861
1081519.9417458303131-4.94174583031307
1092121.6776848625332-0.677684862533154
1102121.0131669049354-0.0131669049353742
1111919.3051274188235-0.305127418823454
1122418.06350095295265.93649904704739
1132022.3781260522376-2.37812605223761
1141725.1914084073903-8.19140840739028
1152325.0431393186999-2.04313931869988
1162422.41377524534261.58622475465735
1171422.0930249650556-8.09302496505556
1181922.9106190578115-3.91061905781147
1192422.1911275174831.80887248251702
1201320.4066760745397-7.40667607453972
1212225.4069018708723-3.40690187087228
1221621.1561238969015-5.15612389690145
1231923.3023756415670-4.30237564156697
1242522.83885005760342.16114994239662
1252524.20498638560280.79501361439717
1262321.42702168038181.57297831961816
1272423.60574486056680.394255139433163
1282623.57878102872332.4212189712767
1292621.53545875536934.46454124463067
1302524.16342697843660.836573021563442
1311822.3726267030276-4.37262670302765
1322119.89975874947831.10024125052168
1332623.70111824674332.29888175325667
1342321.99505482974361.00494517025638
1352319.76640539527013.23359460472994
1362222.5953786551716-0.595378655171626
1372022.4122981727327-2.41229817273269
1381322.1200179185666-9.12001791856658
1392421.46415828486102.53584171513896
1401521.5997640211544-6.59976402115444
1411423.1470906201603-9.1470906201603
1422224.0995888972163-2.09958889721628
1431017.6868808865665-7.68688088656654
1442424.4769946623064-0.476994662306395
1452221.86740087963950.132599120360474
1462425.817240275552-1.81724027555201
1471921.6473338082820-2.64733380828197
1482022.1326061683468-2.13260616834676
1491317.1110998516415-4.1110998516415
1502020.1383667857288-0.138366785728794
1512223.2921840860280-1.29218408602802
1522423.37003344389620.629966556103828
1532923.20259132627565.79740867372435
1541220.9617262019034-8.96172620190338
1552020.9664885466080-0.966488546607962
1562121.4611750179736-0.461175017973646
1572423.67126484385940.328735156140567
1582221.92703272199890.0729672780010754
1592017.70835014376832.29164985623173


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.7339779191592240.5320441616815520.266022080840776
110.593608937009970.812782125980060.40639106299003
120.5567833082807790.8864333834384410.443216691719221
130.5335999587883480.9328000824233040.466400041211652
140.757315033325510.4853699333489790.242684966674489
150.7004508995709690.5990982008580630.299549100429031
160.6425622482594240.7148755034811530.357437751740576
170.5844141557020670.8311716885958650.415585844297932
180.6946487428577370.6107025142845260.305351257142263
190.6206567344262680.7586865311474640.379343265573732
200.6298925617828020.7402148764343970.370107438217199
210.5826509784814480.8346980430371050.417349021518552
220.5119644986289730.9760710027420540.488035501371027
230.4491803417773890.8983606835547790.55081965822261
240.4463237905547780.8926475811095560.553676209445222
250.5813062081957060.8373875836085870.418693791804294
260.5166106705299690.9667786589400630.483389329470031
270.4520403543280030.9040807086560050.547959645671997
280.4417039890376540.8834079780753080.558296010962346
290.3785851957467220.7571703914934440.621414804253278
300.3186382103185130.6372764206370250.681361789681487
310.3295522800988550.659104560197710.670447719901145
320.2761781738477590.5523563476955180.723821826152241
330.5052818984470160.9894362031059680.494718101552984
340.4668305879456460.9336611758912920.533169412054354
350.4323217076689860.8646434153379720.567678292331014
360.3748146036452480.7496292072904960.625185396354752
370.3535333809088470.7070667618176940.646466619091153
380.3015686206121930.6031372412243870.698431379387807
390.2543088909617310.5086177819234620.745691109038269
400.230540651601020.461081303202040.76945934839898
410.386704988358970.773409976717940.61329501164103
420.3347717078716470.6695434157432930.665228292128353
430.3006599039486240.6013198078972480.699340096051376
440.2565102264288650.5130204528577290.743489773571135
450.2228335013308650.4456670026617290.777166498669135
460.1995781257508740.3991562515017470.800421874249126
470.1858139877096510.3716279754193030.814186012290348
480.1722472822582270.3444945645164540.827752717741773
490.1409292760905660.2818585521811320.859070723909434
500.1301620966777480.2603241933554960.869837903322252
510.107639169991680.215278339983360.89236083000832
520.09095777166601830.1819155433320370.909042228333982
530.1484058625977680.2968117251955360.851594137402232
540.1820095389293900.3640190778587800.81799046107061
550.1748132735929780.3496265471859560.825186726407022
560.2309473115656860.4618946231313720.769052688434314
570.2202982611199050.440596522239810.779701738880095
580.1893866316537440.3787732633074880.810613368346256
590.1979849094347630.3959698188695250.802015090565237
600.2263810174538410.4527620349076810.773618982546159
610.1988934453767010.3977868907534030.801106554623299
620.1670228987183330.3340457974366660.832977101281667
630.18109763362190.36219526724380.8189023663781
640.1533345294586450.3066690589172900.846665470541355
650.1265258091069440.2530516182138870.873474190893056
660.1216990397290040.2433980794580090.878300960270996
670.1108818981822980.2217637963645960.889118101817702
680.1117637120871290.2235274241742580.888236287912871
690.094630980160030.189261960320060.90536901983997
700.07709178181492380.1541835636298480.922908218185076
710.06264738436564240.1252947687312850.937352615634358
720.04947212205106560.09894424410213110.950527877948934
730.04627586585125780.09255173170251560.953724134148742
740.03708925006505460.07417850013010910.962910749934945
750.03087336140707770.06174672281415540.969126638592922
760.02370750360803550.04741500721607090.976292496391965
770.01857652957248010.03715305914496020.98142347042752
780.01482432370152340.02964864740304680.985175676298477
790.02178668314776790.04357336629553580.978213316852232
800.01733615141884840.03467230283769680.982663848581152
810.01678604614859070.03357209229718150.98321395385141
820.02976162095840650.0595232419168130.970238379041593
830.0228977028445810.0457954056891620.97710229715542
840.01903710001129520.03807420002259030.980962899988705
850.02086561803932370.04173123607864740.979134381960676
860.0185574636570870.0371149273141740.981442536342913
870.01411045253224010.02822090506448020.98588954746776
880.01814935466331500.03629870932662990.981850645336685
890.01435700019575240.02871400039150490.985642999804248
900.01071741695829590.02143483391659180.989282583041704
910.01085079893015480.02170159786030950.989149201069845
920.009437307568738280.01887461513747660.990562692431262
930.007220703428501070.01444140685700210.9927792965715
940.005944410118359780.01188882023671960.99405558988164
950.01077647590665950.02155295181331890.98922352409334
960.009725712629091350.01945142525818270.99027428737091
970.009273380323045670.01854676064609130.990726619676954
980.007077020136360550.01415404027272110.99292297986364
990.005209230172206760.01041846034441350.994790769827793
1000.003982591076381680.007965182152763370.996017408923618
1010.00294643899417670.00589287798835340.997053561005823
1020.002093476882380930.004186953764761860.99790652311762
1030.002237503438431330.004475006876862660.997762496561569
1040.001748842886625510.003497685773251010.998251157113375
1050.007424649205784170.01484929841156830.992575350794216
1060.01665990833839090.03331981667678190.98334009166161
1070.01665011060816090.03330022121632180.983349889391839
1080.0212513592330920.0425027184661840.978748640766908
1090.01638823772137840.03277647544275670.983611762278622
1100.01193441018848500.02386882037697000.988065589811515
1110.008617471161824530.01723494232364910.991382528838175
1120.02133035329738680.04266070659477350.978669646702613
1130.01969336073236150.0393867214647230.980306639267639
1140.05630525266148590.1126105053229720.943694747338514
1150.04841776458453210.09683552916906420.951582235415468
1160.03922355780484610.07844711560969230.960776442195154
1170.1158950141484710.2317900282969410.88410498585153
1180.1114301215287500.2228602430574990.88856987847125
1190.0987865692165210.1975731384330420.901213430783479
1200.1723381424267470.3446762848534930.827661857573253
1210.1644329301470930.3288658602941860.835567069852907
1220.1961702604348000.3923405208696000.8038297395652
1230.1898684644373560.3797369288747130.810131535562644
1240.1886753798992460.3773507597984920.811324620100754
1250.1713600120769450.3427200241538890.828639987923055
1260.1395314153986600.2790628307973190.86046858460134
1270.1091324819671570.2182649639343140.890867518032843
1280.1124145582224210.2248291164448420.887585441777579
1290.1608462632883430.3216925265766850.839153736711657
1300.138563154567970.277126309135940.86143684543203
1310.1214548600992080.2429097201984150.878545139900792
1320.1052016371327100.2104032742654190.89479836286729
1330.09641233628066310.1928246725613260.903587663719337
1340.07870771225101660.1574154245020330.921292287748983
1350.1072888436216770.2145776872433530.892711156378323
1360.07958831739446610.1591766347889320.920411682605534
1370.05808222341849840.1161644468369970.941917776581502
1380.1481414379383210.2962828758766420.85185856206168
1390.2094649397479460.4189298794958910.790535060252054
1400.1904988553116270.3809977106232540.809501144688373
1410.4090575404738720.8181150809477450.590942459526128
1420.3593135166221460.7186270332442920.640686483377854
1430.6686627549384320.6626744901231350.331337245061568
1440.6075302677172170.7849394645655670.392469732282783
1450.4969329092259360.9938658184518720.503067090774064
1460.4258981679708740.8517963359417480.574101832029126
1470.435936439576130.871872879152260.56406356042387
1480.3053550856118840.6107101712237680.694644914388116
1490.2129890526437380.4259781052874750.787010947356262


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0357142857142857NOK
5% type I error level370.264285714285714NOK
10% type I error level440.314285714285714NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/10w19s1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/10w19s1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/18iug1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/18iug1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/28iug1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/28iug1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/3iatj1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/3iatj1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/4iatj1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/4iatj1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/5iatj1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/5iatj1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/6t1sm1290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/6t1sm1290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/74as71290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/74as71290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/84as71290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/84as71290605581.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/94as71290605581.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290605629tpo6mafqislrwxu/94as71290605581.ps (open in new window)


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