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 15:18:29 +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/t129052569867ukczwwrc4v27l.htm/, Retrieved Tue, 23 Nov 2010 16:22:04 +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/t129052569867ukczwwrc4v27l.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 9 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
YT[t] = + 28.2103187556997 -1.21064258019503T1[t] -0.0662911074151968X1[t] + 0.220046465031066X2[t] -0.137980253016112X3[t] -0.267847267331188X4[t] + 0.415218299040598X5[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.210318755699714.9452051.88760.0609880.030494
T1-1.210642580195031.484765-0.81540.4161330.208066
X1-0.06629110741519680.06322-1.04860.2960390.148019
X20.2200464650310660.1127691.95130.0528590.02643
X3-0.1379802530161120.105245-1.3110.1918230.095912
X4-0.2678472673311880.131479-2.03720.0433660.021683
X50.4152182990405980.0762625.444700


Multiple Linear Regression - Regression Statistics
Multiple R0.475140658091823
R-squared0.225758644971930
Adjusted R-squared0.195196486220822
F-TEST (value)7.3868684084283
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value5.99882120422279e-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.03748865223741.96251134776263
22325.3495865301589-2.34958653015892
32525.4759720293670-0.47597202936704
42323.1284201938044-0.128420193804447
51922.9500814574386-3.95008145743856
62924.05845113699354.94154886300653
72524.76982107926910.23017892073088
82122.5496645045615-1.54966450456147
92221.95941363695150.0405863630485405
102522.44836536235762.55163463764240
112420.18305846017533.81694153982470
121819.758708271868-1.75870827186801
132218.37158823256833.6284117674317
141520.6721227164876-5.67212271648763
152223.4194974139702-1.41949741397023
162824.25838673442113.74161326557895
172022.1745527790774-2.17455277907735
181219.0223933275116-7.02239332751165
192421.45264993199502.54735006800504
202021.3875557703300-1.38755577033004
212123.2363427177809-2.23634271778094
222020.6603585270493-0.660358527049277
232119.16760754755021.83239245244975
242321.08086784823341.91913215176660
252821.90867808718766.09132191281235
262421.87329863206622.12670136793380
272423.46215906751120.537840932488764
282420.37697686989113.62302313010889
292321.97283649863061.02716350136943
302322.69133799866730.308662001332743
312924.24492262097824.75507737902181
322421.99383365233312.00616634766691
331825.0192850575274-7.01928505752743
342525.9632786504055-0.963278650405518
352122.5815300817310-1.58153008173104
362626.6957457480054-0.695745748005403
372225.1140040163943-3.11400401639428
382222.8265637086898-0.82656370868982
392222.5514357077084-0.551435707708401
402325.597809613408-2.59780961340799
413022.89565989659737.1043401034027
422322.66401530370340.335984696296611
431718.7116919232637-1.71169192326374
442323.7908994040719-0.790899404071903
452324.2516305620011-1.25163056200108
462522.39388898187952.6061110181205
472420.72245448307373.27754551692626
482427.4350166076499-3.43501660764987
492322.96383179019150.0361682098085093
502123.8197102970576-2.81971029705757
512425.6897981449798-1.68979814497982
522421.81211431056522.18788568943480
532821.48436026172536.51563973827473
541621.0239734605562-5.02397346055621
552019.79619121857990.203808781420062
562923.40762620848975.59237379151032
572723.84308784113853.15691215886153
582223.1637478787013-1.16374787870127
592823.94627665844024.05372334155984
601620.3530491841121-4.35304918411208
612522.8562130477712.143786952229
622423.47665663211870.523343367881268
632823.64350425666404.35649574333604
642424.2220288125445-0.222028812544515
652322.67357509184630.326424908153681
663026.89267061050803.10732938949196
672421.28348200119332.71651799880672
682124.0991527443775-3.09915274437747
692523.27013858003961.72986141996036
702523.91847847497541.08152152502456
712220.78178573967281.21821426032725
722322.42761122952950.572388770470475
732622.82614278944693.1738572105531
742321.60220419717541.39779580282461
752523.06441242302011.93558757697994
762121.2854869394797-0.285486939479683
772523.64151645444281.35848354555722
782422.144790909091.85520909091001
792923.51235970235665.48764029764338
802223.647883644284-1.64788364428402
812723.56808950712843.43191049287155
822619.62908197232576.37091802767428
832221.30496353231550.695036467684501
842422.03274328013931.96725671986070
852723.10591731462143.89408268537864
862421.35404187460792.64595812539212
872424.8509010035633-0.85090100356334
882924.35559731509574.64440268490435
892222.1416478096984-0.141647809698437
902120.57284373934990.427156260650136
912420.44518407420433.55481592579566
922421.71943625840812.28056374159187
932321.94139882033721.05860117966277
942022.3039684205901-2.30396842059012
952721.34810892150375.65189107849627
962623.42456632217552.57543367782448
972521.94684739602173.05315260397831
982120.06382740170090.936172598299126
992120.76801557335940.231984426640604
1001920.3833611957976-1.38336119579757
1012121.5815065428908-0.581506542890763
1022121.2761526393298-0.276152639329836
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.646044621812849
1102121.0230224835545-0.0230224835545169
1111919.2848425566571-0.284842556657119
1122418.06019179287125.93980820712883
1132022.2492483774651-2.24924837746510
1141725.0896164950748-8.08961649507482
1152324.8187204846044-1.81872048460443
1162422.3902116093421.60978839065802
1171422.0566557391386-8.05665573913863
1181922.8529153427126-3.85291534271264
1192422.18173915647521.81826084352477
1201320.4211887148614-7.42118871486136
1212225.3603868886685-3.36038688866847
1221621.1243457414569-5.12434574145691
1231923.2285530941963-4.22855309419634
1242522.73929892149822.26070107850183
1252524.15566599980620.844334000193828
1262321.42972376071641.57027623928362
1272423.55350904217730.446490957822704
1282623.50326017593482.49673982406516
1292621.48835300223284.51164699776715
1302524.13205177271170.86794822728832
1311822.2911756530787-4.29117565307866
1322119.86860503019261.13139496980740
1332623.65036407107132.34963592892873
1342321.96432499161581.03567500838418
1352319.75719595814773.24280404185232
1362222.5985262477796-0.598526247779605
1372022.3975581072706-2.39755810727064
1381322.0664261853111-9.0664261853111
1392421.39051168561812.60948831438186
1401521.5031177034133-6.50311770341333
1411423.0933834365365-9.09338343653651
1422224.0488715152901-2.04887151529010
1431017.6446697470617-7.64466974706174
1442424.4269628455801-0.42696284558013
1452221.83042037945090.169579620549057
1462425.7882219661376-1.78822196613757
1471921.6534545779183-2.65345457791828
1482022.0853596160821-2.08535961608210
1491317.1094479686178-4.10944796861783
1502020.1000300761381-0.100030076138146
1512223.1856636465606-1.18566364656058
1522423.38326237668800.616737623311959
1532923.27415647483445.72584352516564
1541220.9762473114534-8.97624731145337
1552020.9222015621339-0.922201562133892
1562121.4456831015455-0.445683101545463
1572423.63307071170650.366929288293533
1582221.89271874635860.107281253641439
1592017.72114206346042.27885793653958


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5270283643144650.945943271371070.472971635685535
110.5620721769234440.8758556461531130.437927823076556
120.4888201218553440.9776402437106880.511179878144656
130.540340997121710.919318005756580.45965900287829
140.7416341416927360.5167317166145270.258365858307264
150.6547677799223590.6904644401552820.345232220077641
160.6238402036212980.7523195927574040.376159796378702
170.5381604118785770.9236791762428460.461839588121423
180.676102822720440.6477943545591190.323897177279559
190.6013206563170240.7973586873659520.398679343682976
200.5885070534294230.8229858931411550.411492946570577
210.5246008119634860.9507983760730290.475399188036514
220.4551930008433730.9103860016867460.544806999156627
230.4045132330494310.8090264660988620.595486766950569
240.4089286325352480.8178572650704950.591071367464752
250.5713124779890450.857375044021910.428687522010955
260.510036637596390.979926724807220.48996336240361
270.4430170306403400.8860340612806810.55698296935966
280.4374636088203230.8749272176406460.562536391179677
290.3733175255846280.7466350511692550.626682474415373
300.3129254693000450.6258509386000890.687074530699955
310.3467053025993480.6934106051986960.653294697400652
320.2956848691865100.5913697383730210.70431513081349
330.5218562366792980.9562875266414050.478143763320702
340.4707206954930720.9414413909861440.529279304506928
350.4327585476229680.8655170952459370.567241452377032
360.3754389188255470.7508778376510950.624561081174453
370.3488126340243320.6976252680486640.651187365975668
380.2972001395534950.5944002791069910.702799860446505
390.2498292770490700.4996585540981390.75017072295093
400.2224962417419930.4449924834839860.777503758258007
410.3751097500675780.7502195001351560.624890249932422
420.3233293513738100.6466587027476190.67667064862619
430.2913097444098280.5826194888196550.708690255590172
440.2477411429354410.4954822858708820.752258857064559
450.2113446507543240.4226893015086480.788655349245676
460.1919434164478600.3838868328957200.80805658355214
470.1795112931879290.3590225863758580.820488706812071
480.1644349986815210.3288699973630430.835565001318479
490.1343471198614540.2686942397229090.865652880138546
500.1247300837685840.2494601675371690.875269916231415
510.1029539738582300.2059079477164600.89704602614177
520.08783550096624450.1756710019324890.912164499033756
530.1473975884524600.2947951769049200.85260241154754
540.176789105538170.353578211076340.82321089446183
550.1652671865387720.3305343730775440.834732813461228
560.2226869754661200.4453739509322410.77731302453388
570.2151319088197600.4302638176395190.78486809118024
580.1841536430785530.3683072861571060.815846356921447
590.1973511380899140.3947022761798280.802648861910086
600.2250919989972290.4501839979944580.774908001002771
610.1988802369784360.3977604739568710.801119763021564
620.1671182584235650.3342365168471300.832881741576435
630.1823448707505040.3646897415010090.817655129249496
640.1532548126361260.3065096252722520.846745187363874
650.1264389685164600.2528779370329210.87356103148354
660.1228832953083450.245766590616690.877116704691655
670.1122482173709430.2244964347418850.887751782629058
680.1113449234101170.2226898468202340.888655076589883
690.09475658474965190.1895131694993040.905243415250348
700.07736051432496710.1547210286499340.922639485675033
710.0628681336664160.1257362673328320.937131866333584
720.04965621586309260.09931243172618510.950343784136907
730.04661542310497250.0932308462099450.953384576895028
740.0373413642259390.0746827284518780.96265863577406
750.03103143747197540.06206287494395080.968968562528025
760.02380097559040180.04760195118080350.976199024409598
770.01868590141621320.03737180283242640.981314098583787
780.01495714068057460.02991428136114930.985042859319425
790.02247810815643580.04495621631287170.977521891843564
800.01792120620812370.03584241241624740.982078793791876
810.01752536410636600.03505072821273210.982474635893634
820.03135058596689540.06270117193379080.968649414033105
830.02417738786077950.04835477572155910.97582261213922
840.02017265224147270.04034530448294550.979827347758527
850.02209130363799680.04418260727599360.977908696362003
860.01957790681058910.03915581362117830.98042209318941
870.01488339564409600.02976679128819210.985116604355904
880.01943484492832480.03886968985664960.980565155071675
890.01528193402292590.03056386804585170.984718065977074
900.01143503976743200.02287007953486390.988564960232568
910.01149360150002350.0229872030000470.988506398499976
920.01004879652614640.02009759305229280.989951203473854
930.007706348891424210.01541269778284840.992293651108576
940.006370954451671760.01274190890334350.993629045548328
950.01167643040904610.02335286081809220.988323569590954
960.01057507286336610.02115014572673230.989424927136634
970.01005793173773190.02011586347546380.989942068262268
980.00769645881097110.01539291762194220.992303541189029
990.005678852227648470.01135770445529690.994321147772351
1000.004347520484855510.008695040969711020.995652479515144
1010.003212265659623610.006424531319247220.996787734340376
1020.002285633287830200.004571266575660400.99771436671217
1030.002443964708573920.004887929417147840.997556035291426
1040.001914651603452040.003829303206904080.998085348396548
1050.008114129825284910.01622825965056980.991885870174715
1060.01816718460084600.03633436920169190.981832815399154
1070.01802955125972420.03605910251944850.981970448740276
1080.02272115350154470.04544230700308940.977278846498455
1090.01752965006428280.03505930012856560.982470349935717
1100.01280354570534050.02560709141068100.98719645429466
1110.009269762016710840.01853952403342170.99073023798329
1120.02273309451267340.04546618902534670.977266905487327
1130.02059644815267280.04119289630534570.979403551847327
1140.05719326271489970.1143865254297990.9428067372851
1150.04845018371725440.09690036743450880.951549816282746
1160.039264729060880.078529458121760.96073527093912
1170.1157125762394330.2314251524788660.884287423760567
1180.1108706235566050.2217412471132090.889129376443395
1190.09829755436003970.1965951087200790.90170244563996
1200.1718239045700470.3436478091400940.828176095429953
1210.1637067916363790.3274135832727580.83629320836362
1220.1950620238804540.3901240477609090.804937976119546
1230.1880429805116190.3760859610232380.811957019488381
1240.1872256420395590.3744512840791190.81277435796044
1250.1699933065863640.3399866131727280.830006693413636
1260.1383323830819520.2766647661639030.861667616918048
1270.1081702103029710.2163404206059430.891829789697029
1280.1116225072733080.2232450145466150.888377492726692
1290.1601248309655510.3202496619311030.839875169034449
1300.1379440028202490.2758880056404980.862055997179751
1310.1204113511155700.2408227022311390.87958864888443
1320.1042886228655730.2085772457311460.895711377134427
1330.09566304356770120.1913260871354020.904336956432299
1340.07809052629471880.1561810525894380.921909473705281
1350.1065685015349170.2131370030698340.893431498465083
1360.07901952437298270.1580390487459650.920980475627017
1370.05762954179662790.1152590835932560.942370458203372
1380.1468580666087150.293716133217430.853141933391285
1390.2081200446700520.4162400893401040.791879955329948
1400.1885131002139580.3770262004279150.811486899786042
1410.4060256499171640.8120512998343270.593974350082836
1420.3563760407383630.7127520814767260.643623959261637
1430.6660043732679610.6679912534640770.333995626732039
1440.604797946544660.790404106910680.39520205345534
1450.494173129371250.98834625874250.50582687062875
1460.4232865036024230.8465730072048450.576713496397577
1470.4335832749889490.8671665499778970.566416725011051
1480.3032838121562240.6065676243124490.696716187843776
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/t129052569867ukczwwrc4v27l/104bsr1290525496.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/104bsr1290525496.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/281ui1290525496.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/281ui1290525496.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/381ui1290525496.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/381ui1290525496.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/481ui1290525496.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/481ui1290525496.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/84bsr1290525496.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/84bsr1290525496.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/94bsr1290525496.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t129052569867ukczwwrc4v27l/94bsr1290525496.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