Home » date » 2010 » Nov » 23 »

*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 17:09:19 +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/t1290532424z2o9sxpcaucj74c.htm/, Retrieved Tue, 23 Nov 2010 18:13:44 +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/t1290532424z2o9sxpcaucj74c.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 24 14 11 12 24 26 9 25 11 7 8 25 23 9 17 6 17 8 30 25 9 18 12 10 8 19 23 9 18 8 12 9 22 19 9 16 10 12 7 22 29 10 20 10 11 4 25 25 10 16 11 11 11 23 21 10 18 16 12 7 17 22 10 17 11 13 7 21 25 10 23 13 14 12 19 24 10 30 12 16 10 19 18 10 23 8 11 10 15 22 10 18 12 10 8 16 15 10 15 11 11 8 23 22 10 12 4 15 4 27 28 10 21 9 9 9 22 20 10 15 8 11 8 14 12 10 20 8 17 7 22 24 10 31 14 17 11 23 20 10 27 15 11 9 23 21 10 34 16 18 11 21 20 10 21 9 14 13 19 21 10 31 14 10 8 18 23 10 19 11 11 8 20 28 10 16 8 15 9 23 24 10 20 9 15 6 25 24 10 21 9 13 9 19 24 10 22 9 16 9 24 23 10 17 9 13 6 22 23 10 24 10 9 6 25 29 10 25 16 18 16 26 24 10 26 11 18 5 29 18 10 25 8 12 7 32 25 10 17 9 17 9 25 21 10 32 16 9 6 29 26 10 33 11 9 6 28 22 10 13 16 12 5 17 22 10 32 12 18 12 28 22 10 25 12 12 7 29 23 10 29 14 18 10 26 30 10 22 9 14 9 25 23 10 18 10 15 8 14 17 10 17 9 16 5 25 23 10 20 10 10 8 26 23 10 15 12 11 8 20 25 10 20 14 14 10 18 24 10 33 14 9 6 32 24 10 29 10 12 8 25 23 10 23 14 17 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 time22 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 28.2103187556998 -1.21064258019504month[t] -0.0662911074151963CM[t] + 0.220046465031066D[t] -0.137980253016111PE[t] -0.26784726733119PC[t] + 0.415218299040597PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)28.210318755699814.9452051.88760.0609880.030494
month-1.210642580195041.484765-0.81540.4161330.208066
CM-0.06629110741519630.06322-1.04860.2960390.148019
D0.2200464650310660.1127691.95130.0528590.02643
PE-0.1379802530161110.105245-1.3110.1918230.095912
PC-0.267847267331190.131479-2.03720.0433660.021683
PS0.4152182990405970.0762625.444700


Multiple Linear Regression - Regression Statistics
Multiple R0.475140658091823
R-squared0.225758644971931
Adjusted R-squared0.195196486220823
F-TEST (value)7.38686840842831
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value5.99882120311257e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.50319920019948
Sum Squared Residuals1865.40550471430


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12624.03748865223751.96251134776248
22325.3495865301589-2.34958653015894
32525.4759720293670-0.475972029367048
42323.1284201938045-0.128420193804457
51922.9500814574386-3.95008145743857
62924.05845113699354.94154886300652
72524.76982107926910.230178920730872
82122.5496645045615-1.54966450456146
92221.95941363695150.0405863630485437
102522.44836536235762.5516346376424
112420.18305846017533.8169415398247
121819.7587082718680-1.75870827186802
132218.37158823256833.6284117674317
141520.6721227164876-5.67212271648763
152223.4194974139702-1.41949741397022
162824.25838673442113.74161326557894
172022.1745527790773-2.17455277907735
181219.0223933275117-7.02239332751165
192421.45264993199502.54735006800503
202021.3875557703300-1.38755577033004
212123.2363427177809-2.23634271778094
222020.6603585270493-0.660358527049277
232119.16760754755021.83239245244976
242321.08086784823341.91913215176660
252821.90867808718766.09132191281236
262421.87329863206622.12670136793381
272423.46215906751120.537840932488761
282420.37697686989113.62302313010889
292321.97283649863061.02716350136943
302322.69133799866730.308662001332742
312924.24492262097824.75507737902181
322421.99383365233312.00616634766692
331825.0192850575274-7.01928505752744
342525.9632786504055-0.963278650405516
352122.5815300817310-1.58153008173103
362626.6957457480054-0.695745748005398
372225.1140040163943-3.11400401639428
382222.8265637086898-0.826563708689818
392222.5514357077084-0.551435707708399
402325.597809613408-2.59780961340799
413022.89565989659737.1043401034027
422322.66401530370340.335984696296612
431718.7116919232637-1.71169192326375
442323.7908994040719-0.790899404071906
452324.2516305620011-1.25163056200108
462522.39388898187952.60611101812050
472420.72245448307373.27754551692626
482427.4350166076499-3.43501660764986
492322.96383179019150.0361682098085087
502123.8197102970576-2.81971029705757
512425.6897981449798-1.68979814497982
522421.81211431056522.18788568943480
532821.48436026172536.51563973827473
541621.0239734605562-5.02397346055622
552019.79619121857990.203808781420071
562923.40762620848975.59237379151032
572723.84308784113853.15691215886154
582223.1637478787013-1.16374787870128
592823.94627665844024.05372334155984
601620.3530491841121-4.35304918411208
612522.8562130477712.14378695222901
622423.47665663211870.523343367881267
632823.64350425666404.35649574333604
642424.2220288125445-0.222028812544506
652322.67357509184630.326424908153682
663026.89267061050803.10732938949195
672421.28348200119332.71651799880671
682124.0991527443775-3.09915274437747
692523.27013858003961.72986141996037
702523.91847847497541.08152152502457
712220.78178573967281.21821426032724
722322.42761122952950.572388770470477
732622.82614278944693.1738572105531
742321.60220419717541.39779580282461
752523.06441242302011.93558757697994
762121.2854869394797-0.285486939479683
772523.64151645444281.35848354555723
782422.144790909091.85520909091001
792923.51235970235665.48764029764339
802223.647883644284-1.64788364428402
812723.56808950712843.43191049287156
822619.62908197232576.37091802767428
832221.30496353231550.695036467684502
842422.03274328013931.96725671986070
852723.10591731462143.89408268537864
862421.35404187460792.64595812539211
872424.8509010035633-0.85090100356334
882924.35559731509564.64440268490436
892222.1416478096984-0.141647809698429
902120.57284373934990.427156260650134
912420.44518407420433.55481592579566
922421.71943625840812.28056374159187
932321.94139882033721.05860117966277
942022.3039684205901-2.30396842059012
952721.34810892150375.65189107849627
962623.42456632217552.57543367782448
972521.94684739602173.05315260397831
982120.06382740170090.936172598299128
992120.76801557335940.231984426640602
1001920.3833611957976-1.38336119579757
1012121.5815065428908-0.581506542890761
1022121.2761526393298-0.276152639329839
1031619.7627574909190-3.76275749091905
1042220.64243255182341.35756744817658
1052921.76795851795777.23204148204232
1061521.7289577426614-6.72895774266144
1071720.6913473995302-3.69134739953016
1081519.9102562803143-4.91025628031433
1092121.6460446218128-0.646044621812844
1102121.0230224835545-0.0230224835545167
1111919.2848425566571-0.284842556657121
1122418.06019179287125.93980820712883
1132022.2492483774651-2.24924837746510
1141725.0896164950748-8.08961649507482
1152324.8187204846044-1.81872048460442
1162422.3902116093421.60978839065802
1171422.0566557391386-8.05665573913864
1181922.8529153427126-3.85291534271264
1192422.18173915647521.81826084352478
1201320.4211887148614-7.42118871486136
1212225.3603868886685-3.36038688866847
1221621.1243457414569-5.12434574145691
1231923.2285530941963-4.22855309419634
1242522.73929892149822.26070107850183
1252524.15566599980620.844334000193838
1262321.42972376071641.57027623928362
1272423.55350904217730.446490957822701
1282623.50326017593482.49673982406516
1292621.48835300223284.51164699776715
1302524.13205177271170.867948227288323
1311822.2911756530787-4.29117565307865
1322119.86860503019261.13139496980740
1332623.65036407107132.34963592892873
1342321.96432499161581.03567500838418
1352319.75719595814773.24280404185231
1362222.5985262477796-0.598526247779604
1372022.3975581072706-2.39755810727064
1381322.0664261853111-9.0664261853111
1392421.39051168561812.60948831438186
1401521.5031177034133-6.50311770341332
1411423.0933834365365-9.0933834365365
1422224.0488715152901-2.04887151529010
1431017.6446697470617-7.64466974706173
1442424.4269628455801-0.426962845580127
1452221.83042037945090.169579620549062
1462425.7882219661376-1.78822196613757
1471921.6534545779183-2.65345457791829
1482022.0853596160821-2.08535961608210
1491317.1094479686178-4.10944796861783
1502020.1000300761381-0.100030076138146
1512223.1856636465606-1.18566364656058
1522423.38326237668800.616737623311961
1532923.27415647483445.72584352516563
1541220.9762473114534-8.97624731145338
1552020.9222015621339-0.922201562133887
1562121.4456831015455-0.445683101545466
1572423.63307071170650.366929288293536
1582221.89271874635860.107281253641443
1592017.72114206346042.27885793653958


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5270283643144660.9459432713710680.472971635685534
110.5620721769234450.875855646153110.437927823076555
120.4888201218553440.9776402437106870.511179878144656
130.5403409971217120.9193180057565770.459659002878288
140.7416341416927370.5167317166145250.258365858307263
150.654767779922360.6904644401552810.345232220077641
160.6238402036212980.7523195927574040.376159796378702
170.5381604118785770.9236791762428450.461839588121423
180.6761028227204410.6477943545591180.323897177279559
190.6013206563170260.7973586873659490.398679343682974
200.5885070534294230.8229858931411540.411492946570577
210.5246008119634880.9507983760730240.475399188036512
220.4551930008433710.9103860016867430.544806999156629
230.4045132330494310.8090264660988620.595486766950569
240.4089286325352490.8178572650704980.591071367464751
250.5713124779890450.8573750440219090.428687522010955
260.5100366375963890.9799267248072210.489963362403611
270.4430170306403380.8860340612806770.556982969359662
280.4374636088203230.8749272176406460.562536391179677
290.3733175255846310.7466350511692620.626682474415369
300.3129254693000430.6258509386000860.687074530699957
310.3467053025993500.6934106051986990.65329469740065
320.2956848691865090.5913697383730190.70431513081349
330.5218562366792980.9562875266414040.478143763320702
340.4707206954930710.9414413909861420.529279304506929
350.4327585476229680.8655170952459370.567241452377032
360.3754389188255490.7508778376510990.624561081174451
370.3488126340243330.6976252680486650.651187365975667
380.2972001395534950.594400279106990.702799860446505
390.2498292770490690.4996585540981380.750170722950931
400.2224962417419920.4449924834839840.777503758258008
410.3751097500675780.7502195001351560.624890249932422
420.323329351373810.646658702747620.67667064862619
430.2913097444098280.5826194888196570.708690255590172
440.247741142935440.495482285870880.75225885706456
450.2113446507543220.4226893015086440.788655349245678
460.1919434164478600.3838868328957210.80805658355214
470.1795112931879280.3590225863758560.820488706812072
480.1644349986815220.3288699973630430.835565001318478
490.1343471198614550.268694239722910.865652880138545
500.1247300837685850.249460167537170.875269916231415
510.1029539738582300.2059079477164600.89704602614177
520.08783550096624440.1756710019324890.912164499033756
530.1473975884524610.2947951769049220.852602411547539
540.176789105538170.353578211076340.82321089446183
550.1652671865387720.3305343730775440.834732813461228
560.2226869754661210.4453739509322410.77731302453388
570.2151319088197590.4302638176395180.784868091180241
580.1841536430785530.3683072861571060.815846356921447
590.1973511380899130.3947022761798270.802648861910087
600.2250919989972310.4501839979944620.774908001002769
610.1988802369784350.397760473956870.801119763021565
620.1671182584235660.3342365168471330.832881741576434
630.1823448707505050.3646897415010100.817655129249495
640.1532548126361270.3065096252722540.846745187363873
650.1264389685164600.2528779370329210.87356103148354
660.1228832953083440.2457665906166880.877116704691656
670.1122482173709420.2244964347418850.887751782629058
680.1113449234101170.2226898468202330.888655076589883
690.09475658474965160.1895131694993030.905243415250348
700.07736051432496660.1547210286499330.922639485675033
710.0628681336664160.1257362673328320.937131866333584
720.04965621586309240.09931243172618480.950343784136908
730.04661542310497210.09323084620994430.953384576895028
740.03734136422593920.07468272845187840.96265863577406
750.03103143747197540.06206287494395070.968968562528025
760.02380097559040180.04760195118080360.976199024409598
770.01868590141621300.03737180283242610.981314098583787
780.01495714068057480.02991428136114960.985042859319425
790.02247810815643580.04495621631287160.977521891843564
800.01792120620812360.03584241241624730.982078793791876
810.01752536410636590.03505072821273170.982474635893634
820.03135058596689520.06270117193379030.968649414033105
830.02417738786077970.04835477572155940.97582261213922
840.02017265224147260.04034530448294520.979827347758527
850.0220913036379970.0441826072759940.977908696362003
860.01957790681058920.03915581362117840.98042209318941
870.01488339564409610.02976679128819210.985116604355904
880.01943484492832470.03886968985664930.980565155071675
890.0152819340229260.0305638680458520.984718065977074
900.01143503976743190.02287007953486380.988564960232568
910.01149360150002350.02298720300004710.988506398499976
920.01004879652614630.02009759305229270.989951203473854
930.007706348891424130.01541269778284830.992293651108576
940.006370954451671880.01274190890334380.993629045548328
950.01167643040904590.02335286081809190.988323569590954
960.01057507286336620.02115014572673240.989424927136634
970.01005793173773180.02011586347546360.989942068262268
980.00769645881097110.01539291762194220.992303541189029
990.005678852227648490.01135770445529700.994321147772351
1000.004347520484855530.008695040969711060.995652479515144
1010.003212265659623620.006424531319247250.996787734340376
1020.002285633287830210.004571266575660420.99771436671217
1030.002443964708573920.004887929417147830.997556035291426
1040.001914651603452030.003829303206904060.998085348396548
1050.0081141298252850.016228259650570.991885870174715
1060.01816718460084590.03633436920169180.981832815399154
1070.01802955125972390.03605910251944780.981970448740276
1080.02272115350154470.04544230700308940.977278846498455
1090.01752965006428280.03505930012856570.982470349935717
1100.01280354570534050.02560709141068110.98719645429466
1110.009269762016710920.01853952403342180.99073023798329
1120.02273309451267320.04546618902534650.977266905487327
1130.02059644815267270.04119289630534550.979403551847327
1140.05719326271490.11438652542980.9428067372851
1150.04845018371725410.09690036743450820.951549816282746
1160.03926472906087980.07852945812175970.96073527093912
1170.1157125762394340.2314251524788680.884287423760566
1180.1108706235566050.221741247113210.889129376443395
1190.09829755436003950.1965951087200790.90170244563996
1200.1718239045700470.3436478091400930.828176095429954
1210.1637067916363780.3274135832727570.836293208363622
1220.1950620238804540.3901240477609080.804937976119546
1230.1880429805116200.3760859610232400.81195701948838
1240.1872256420395590.3744512840791180.81277435796044
1250.1699933065863630.3399866131727260.830006693413637
1260.1383323830819520.2766647661639030.861667616918048
1270.1081702103029710.2163404206059420.891829789697029
1280.1116225072733080.2232450145466160.888377492726692
1290.1601248309655520.3202496619311040.839875169034448
1300.1379440028202490.2758880056404970.862055997179751
1310.1204113511155690.2408227022311390.87958864888443
1320.1042886228655740.2085772457311480.895711377134426
1330.09566304356770080.1913260871354020.9043369564323
1340.07809052629471870.1561810525894370.921909473705281
1350.1065685015349180.2131370030698350.893431498465082
1360.07901952437298280.1580390487459660.920980475627017
1370.05762954179662760.1152590835932550.942370458203372
1380.1468580666087140.2937161332174280.853141933391286
1390.2081200446700520.4162400893401030.791879955329948
1400.1885131002139580.3770262004279160.811486899786042
1410.4060256499171640.8120512998343280.593974350082836
1420.3563760407383630.7127520814767270.643623959261637
1430.666004373267960.667991253464080.33399562673204
1440.604797946544660.790404106910680.39520205345534
1450.4941731293712490.9883462587424990.505826870628751
1460.4232865036024230.8465730072048460.576713496397577
1470.433583274988950.86716654997790.56641672501105
1480.3032838121562250.606567624312450.696716187843775
1490.2114026001644030.4228052003288050.788597399835597


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/23/t1290532424z2o9sxpcaucj74c/10qfad1290532134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/10qfad1290532134.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/11du11290532134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/11du11290532134.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/21du11290532134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/21du11290532134.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/6mebp1290532134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/6mebp1290532134.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/7fnaa1290532134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290532424z2o9sxpcaucj74c/7fnaa1290532134.ps (open in new window)


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


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


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