Home » date » 2010 » Dec » 03 »

*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: Fri, 03 Dec 2010 12:47:09 +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/Dec/03/t1291380395kfxagoxbc8jpeu8.htm/, Retrieved Fri, 03 Dec 2010 13:46:45 +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/Dec/03/t1291380395kfxagoxbc8jpeu8.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 «
4 4 5 4 4 4 4 4 4 4 4 3 4 4 5 5 4 4 5 5 4 3 3 2 3 4 4 3 2 3 2 3 2 4 3 5 4 3 3 4 5 4 4 3 3 3 3 4 4 2 3 4 4 2 4 2 4 4 3 4 4 5 3 4 3 2 3 2 2 3 4 3 2 4 4 4 4 2 3 2 4 2 3 2 5 4 2 5 5 5 4 3 4 2 3 3 4 4 4 3 4 4 4 4 4 4 3 3 4 4 5 4 3 2 3 3 3 3 3 4 4 4 4 4 4 4 2 3 2 2 2 4 2 4 2 4 4 3 4 4 3 3 2 4 4 4 3 3 2 4 4 2 3 4 4 4 2 4 4 4 4 4 4 3 4 4 4 4 4 4 4 4 4 4 4 4 3 3 4 3 4 3 5 4 4 4 4 4 4 3 4 3 2 4 4 4 1 4 4 4 4 4 4 4 2 4 4 4 3 4 4 2 4 4 4 4 4 3 4 3 2 4 4 4 3 2 4 4 4 3 4 4 5 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 3 2 3 3 5 4 4 4 2 4 4 4 4 4 3 3 3 3 4 4 4 4 3 4 3 4 4 3 3 4 4 3 3 3 4 4 4 4 3 4 4 2 3 2 3 2 3 2 2 2 4 2 2 5 2 4 3 4 4 4 5 4 4 4 4 4 2 4 4 5 4 4 4 4 5 5 4 3 2 4 4 4 4 4 3 3 4 3 4 3 4 4 2 4 4 4 4 5 4 2 4 4 4 4 3 3 4 3 3 4 3 2 2 4 2 1 4 4 4 4 4 4 4 4 4 4 4 3 4 4 4 3 2 3 4 4 2 4 3 2 2 5 2 2 4 2 4 4 4 4 4 4 4 4 3 4 4 4 4 4 4 3 4 4 3 4 4 3 4 4 4 3 4 4 2 3 2 3 1 4 3 4 4 4 4 4 4 4 5 3 4 4 2 4 4 4 4 3 4 4 4 4 5 4 4 5 5 5 5 4 4 2 4 3 4 4 3 3 2 3 3 4 3 3 3 2 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 time15 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 0.85901483403914 + 0.00480364594500278x1[t] + 0.248974358803874x2[t] + 0.147059243206037x3[t] + 0.162154471874077x4[t] + 0.163836595619903x5[t] + 0.0504204407030673x6[t] -0.00332137712527254t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.859014834039140.4114782.08760.0385920.019296
x10.004803645945002780.0611180.07860.9374630.468732
x20.2489743588038740.0716573.47450.0006760.000338
x30.1470592432060370.064612.27610.0243150.012158
x40.1621544718740770.0829371.95510.0525030.026251
x50.1638365956199030.0734672.23010.027290.013645
x60.05042044070306730.0610450.8260.4101970.205098
t-0.003321377125272540.00124-2.67940.0082340.004117


Multiple Linear Regression - Regression Statistics
Multiple R0.585208926340266
R-squared0.342469487468327
Adjusted R-squared0.310506198664704
F-TEST (value)10.7144633824260
F-TEST (DF numerator)7
F-TEST (DF denominator)144
p-value7.9982798162348e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.630641441916382
Sum Squared Residuals57.2700424697817


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.21366284032564-0.213662840325641
243.799212632522370.200787367477632
354.288840440710160.711159559289841
433.25449230268405-0.254492302684047
522.92686198181061-0.926861981810613
653.715884589505341.28411541049466
743.381768498941090.618231501058912
823.51148537054551-1.51148537054551
943.802559260632500.197440739367505
1042.582581904944441.41741809505556
1143.428722346716240.571277653283762
1222.83641454881677-0.836414548816773
1353.899933549110711.10006645088929
1433.11434814620531-0.114348146205308
1543.91338555582290.0866144441771042
1643.824926415513650.175073584486348
1733.12949404542039-0.129494045420389
1843.908225070392080.0917749296079187
1922.68288301814769-0.682883018147693
2043.729820552377450.270179447622548
2133.34508813476045-0.345088134760445
2233.39718673063293-0.397186730632927
2343.393669467157970.60633053284203
2443.639322448836570.360677551163428
2543.884975430515170.115024569484827
2643.415301136063880.584698863936121
2753.878332676264631.12166732373537
2833.33191845392341-0.331918453923407
2913.87168992201408-2.87168992201408
3043.69492465737890.305075342621098
3143.855439875873530.144560124126468
3233.31863294542232-0.318632945422317
3333.68496052600308-0.684960526003084
3444.0220411542068-0.0220411542068012
3543.851761659262450.148238340737552
3643.898860722840240.101139277159757
3733.60163248298606-0.601632482986063
3843.832190235996620.167809764003376
3933.43763890280644-0.437638902806443
4043.632871443781980.367128556218022
4133.35878308581080-0.358783085810795
4243.580611894773370.419388105226632
4332.681821960634300.318178039365705
4422.86428334174944-0.864283341749444
4533.9807023598838-0.9807023598838
4643.571528465175440.428471534824557
4744.13789620125316-0.137896201253158
4833.7989764647439-0.798976464743899
4933.48956289473769-0.489562894737689
5043.842754151196420.157245848803579
5143.738591892665010.261408107334986
5233.13458716909687-0.134587169096866
5322.85285042378168-0.852850423781682
5443.788655493882270.211344506117730
5543.515852993785960.484147006214043
5633.22321677619361-0.223216776193613
5722.66375461319183-0.663754613191827
5843.775369985381180.224630014618820
5933.77204860825591-0.772048608255907
6033.57124754722153-0.57124754722153
6143.517505729393190.48249427060681
6232.898488500948190.101511499051806
6343.809183540457880.190816459542116
6433.46132323621747-0.46132323621747
6543.797737140262340.202262859737664
6644.47082363788289-0.470823637882891
6743.538390615454620.461609384545384
6833.12225828390557-0.122258283905566
6932.696307036783340.303692963216657
7033.68509301917484-0.685093019174842
7142.760585164890751.23941483510925
7232.528992079478450.471007920521548
7322.54578120064939-0.54578120064939
7443.925195572063960.0748044279360424
7543.906778966270640.0932210337293552
7644.04637991056526-0.0463799105652571
7732.480789393570360.519210606429637
7854.019838281701670.980161718298331
7933.35147484674531-0.351474846745308
8022.92024728652822-0.920247286528218
8133.28616735707613-0.286167357076134
8233.29962333236473-0.299623332364727
8343.347796630134220.652203369865776
8443.129143982494280.87085601750572
8533.37669071160187-0.376690711601873
8622.35554405481481-0.355544054814809
8743.496665593507210.503334406492789
8843.112129062239890.887870937760112
8932.74053929125720.259460708742799
9043.461998941573350.538001058426653
9133.12267169503124-0.122671695031237
9223.03253043097617-1.03253043097617
9333.44006110372867-0.440061103728667
9433.04550977053849-0.0455097705384864
9532.76181412067730.238185879322702
9643.231543054252040.768456945747957
9743.680553599976450.319446400023546
9842.970302782015331.02969721798467
9933.00928079109926-0.00928079109925973
10043.697185736587680.302814263412324
10143.067876925419640.932123074580357
10232.509488996609560.490511003390441
10343.778455194727990.221544805272014
10433.68329866104475-0.683298661044747
10543.437488694806430.562511305193571
10643.987551745620140.0124482543798581
10733.46075961709178-0.460759617091784
10833.43585724160764-0.435857241607643
10933.39889277619317-0.398892776193169
11033.34515095836483-0.345150958364829
11132.85368404187150.146315958128501
11222.47627522535683-0.476275225356834
11343.514118651276950.485881348723046
11422.68016009567596-0.680160095675958
11533.04295864402470-0.0429586440246957
11633.26703062734443-0.267030627344429
11733.01473489141528-0.0147348914152821
11843.592864710278690.407135289721308
11942.959353820207491.04064617979251
12032.852907870888420.147092129111576
12143.510899139840940.489100860159061
12232.847947240383700.152052759616296
12333.40761758308742-0.407617583087424
12433.32227996497736-0.322279964977358
12543.609347662510860.390652337489141
12622.78797070293285-0.787970702932848
12743.362736274304610.637263725695393
12833.33578661081299-0.335786610812991
12932.902876926850080.0971230731499242
13043.482688869459310.517311130540689
13142.969917735407291.03008226459271
13243.474363991462940.525636008537059
13332.99252010419310.00747989580690048
13421.965479829935850.0345201700641528
13543.519623946735190.480376053264806
13623.41546168820379-1.41546168820379
13733.11214394452973-0.112143944529734
13843.474334603324350.525665396675651
13933.07302071964316-0.0730207196431601
14032.797981367701970.202018632298028
14133.15515675686842-0.155156756868416
14233.33253771123838-0.332537711238383
14343.493052929733010.506947070266987
14433.48012426071773-0.480124260717735
14533.40066452274437-0.400664522744374
14622.69996216206853-0.699962162068528
14723.47976742123192-1.47976742123192
14832.894994848117970.105005151882032
14943.413096934388300.586903065611695
15033.01854560119812-0.0185456011981236
15143.360235818337860.639764181662143
15234.18998885105445-1.18998885105446


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.1719522175410520.3439044350821040.828047782458948
120.1226091185766540.2452182371533090.877390881423346
130.08849757631710050.1769951526342010.9115024236829
140.8641299032460830.2717401935078340.135870096753917
150.8127163567809490.3745672864381030.187283643219051
160.7395437084715780.5209125830568430.260456291528422
170.6528915745018670.6942168509962660.347108425498133
180.602241291471020.7955174170579590.397758708528979
190.5293467358044140.9413065283911730.470653264195586
200.508185801424930.983628397150140.49181419857507
210.4743902994735990.9487805989471980.525609700526401
220.4126467214928680.8252934429857360.587353278507132
230.3516900689109160.7033801378218330.648309931089084
240.2885442007157350.577088401431470.711455799284265
250.2281191036571130.4562382073142270.771880896342887
260.3571746735921380.7143493471842750.642825326407862
270.4070807314457070.8141614628914150.592919268554293
280.4896574328099110.9793148656198230.510342567190089
290.9986616075894020.002676784821195160.00133839241059758
300.9979959736618210.004008052676357880.00200402633817894
310.9969828986565640.006034202686871350.00301710134343568
320.995437927705440.009124144589118560.00456207229455928
330.9954197181379020.00916056372419670.00458028186209835
340.9933347583780060.01333048324398760.0066652416219938
350.9916128787336680.01677424253266440.0083871212663322
360.9879152266095260.02416954678094880.0120847733904744
370.9858951652666020.02820966946679620.0141048347333981
380.983464629262980.03307074147404270.0165353707370213
390.9779735173894430.04405296522111360.0220264826105568
400.9875445936169750.02491081276605030.0124554063830252
410.9836146457022180.03277070859556450.0163853542977823
420.989825762898160.02034847420368240.0101742371018412
430.988875673096130.02224865380773940.0111243269038697
440.9931536697779630.01369266044407410.00684633022203705
450.9948438432114560.01031231357708840.00515615678854418
460.994137599618970.01172480076206010.00586240038103003
470.9915732155970370.01685356880592540.0084267844029627
480.991652758041850.01669448391630130.00834724195815066
490.9896370840135140.02072583197297180.0103629159864859
500.9862774790256040.02744504194879170.0137225209743958
510.9846206751168440.0307586497663130.0153793248831565
520.9802831293387840.03943374132243170.0197168706612159
530.9816260928491360.03674781430172690.0183739071508635
540.9774547859250860.04509042814982830.0225452140749141
550.9774164708803930.04516705823921410.0225835291196071
560.9718170472082650.05636590558347090.0281829527917355
570.9701657357990630.05966852840187330.0298342642009366
580.9632006280626710.07359874387465780.0367993719373289
590.965886166243840.06822766751232070.0341138337561604
600.9639351179810770.07212976403784580.0360648820189229
610.9625929423713150.07481411525737080.0374070576286854
620.9554871254694170.08902574906116630.0445128745305831
630.9456508814300780.1086982371398440.0543491185699219
640.9407855484012060.1184289031975870.0592144515987936
650.9277271993571350.1445456012857300.0722728006428651
660.9221033714369180.1557932571261640.0778966285630821
670.9152703368878340.1694593262243320.084729663112166
680.8964467532577520.2071064934844970.103553246742248
690.8850436234170940.2299127531658120.114956376582906
700.8958667968919120.2082664062161760.104133203108088
710.9443468575194970.1113062849610070.0556531424805034
720.9393150326815650.1213699346368690.0606849673184345
730.93683759427790.1263248114441980.0631624057220992
740.9204358864688140.1591282270623720.079564113531186
750.9011801822332990.1976396355334030.0988198177667015
760.8803367912346150.2393264175307710.119663208765385
770.8669038245143820.2661923509712350.133096175485618
780.889119843897740.221760312204520.11088015610226
790.87719838650380.2456032269924000.122801613496200
800.91717472023380.16565055953240.0828252797662
810.9056005238370110.1887989523259780.0943994761629891
820.8947198740060290.2105602519879420.105280125993971
830.8911562649433640.2176874701132710.108843735056636
840.901078926229240.1978421475415220.098921073770761
850.8959434962591090.2081130074817830.104056503740891
860.8892258497961880.2215483004076230.110774150203811
870.8773743263259820.2452513473480360.122625673674018
880.8884625646199430.2230748707601150.111537435380057
890.8645477382878240.2709045234243510.135452261712176
900.847813721006520.3043725579869590.152186278993480
910.820336317430370.3593273651392610.179663682569630
920.884108644553020.2317827108939590.115891355446980
930.8826522880038710.2346954239922570.117347711996129
940.8612143121821430.2775713756357140.138785687817857
950.8328930539204620.3342138921590770.167106946079538
960.8293399546850780.3413200906298440.170660045314922
970.7984490941935520.4031018116128970.201550905806448
980.849994235866240.3000115282675190.150005764133759
990.8196399221183080.3607201557633830.180360077881691
1000.7895693213148260.4208613573703470.210430678685174
1010.8261053847033890.3477892305932220.173894615296611
1020.8210496058875520.3579007882248960.178950394112448
1030.791112399904150.4177752001916980.208887600095849
1040.786716470855390.4265670582892190.213283529144610
1050.7725460981948310.4549078036103380.227453901805169
1060.7299617711464030.5400764577071930.270038228853597
1070.7057574456963970.5884851086072050.294242554303603
1080.680712705000460.638574589999080.31928729499954
1090.6698023694396780.6603952611206440.330197630560322
1100.6638963817076750.672207236584650.336103618292325
1110.6166414669357710.7667170661284580.383358533064229
1120.5858904834066490.8282190331867030.414109516593351
1130.5413551098940880.9172897802118240.458644890105912
1140.5903401856123710.8193196287752580.409659814387629
1150.5386051796955260.9227896406089470.461394820304474
1160.5082212054617860.9835575890764290.491778794538214
1170.4579741351710950.915948270342190.542025864828905
1180.4071860295301480.8143720590602960.592813970469852
1190.4484104656019440.8968209312038890.551589534398056
1200.3999812392345950.799962478469190.600018760765405
1210.3597041564193900.7194083128387790.64029584358061
1220.3065760005306770.6131520010613530.693423999469323
1230.3012543741275560.6025087482551120.698745625872444
1240.2925155623297180.5850311246594360.707484437670282
1250.2381509590452720.4763019180905430.761849040954728
1260.3705605056984180.7411210113968370.629439494301582
1270.3115069059934720.6230138119869430.688493094006528
1280.4125661456781190.8251322913562390.58743385432188
1290.4099134236120800.8198268472241590.59008657638792
1300.3784981188938020.7569962377876040.621501881106198
1310.4452749560586930.8905499121173870.554725043941307
1320.403862609233880.807725218467760.59613739076612
1330.410564898542620.821129797085240.58943510145738
1340.3284521717052130.6569043434104270.671547828294787
1350.4308187196843030.8616374393686070.569181280315697
1360.426228730637820.852457461275640.57377126936218
1370.330293393482610.660586786965220.66970660651739
1380.2662626428649300.5325252857298610.73373735713507
1390.1854018813272810.3708037626545620.814598118672719
1400.1343638264473790.2687276528947570.865636173552621
1410.08078694590539850.1615738918107970.919213054094602


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0381679389312977NOK
5% type I error level270.206106870229008NOK
10% type I error level340.259541984732824NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/10dqnf1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/10dqnf1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/1o7731291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/1o7731291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/2o7731291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/2o7731291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/3zypo1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/3zypo1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/4zypo1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/4zypo1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/5zypo1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/5zypo1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/6spor1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/6spor1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/7kynt1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/7kynt1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/8kynt1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/8kynt1291380412.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/9kynt1291380412.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291380395kfxagoxbc8jpeu8/9kynt1291380412.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by