Home » date » 2010 » Dec » 03 »

include trend

*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 14:45:03 +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/t1291387413orn8iriqasoksam.htm/, Retrieved Fri, 03 Dec 2010 15:43:33 +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/t1291387413orn8iriqasoksam.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 1 4 5 4 2 1 4 4 4 3 2 5 5 4 2 1 3 4 4 2 2 4 3 5 2 1 3 5 4 1 3 4 4 3 1 1 3 4 4 1 1 2 4 4 2 1 4 4 4 2 2 2 4 4 2 4 2 4 4 2 2 2 4 2 2 1 1 3 3 1 1 4 4 4 3 3 4 5 3 2 2 2 4 2 2 2 2 2 4 2 3 3 4 3 2 3 3 4 3 3 1 3 4 4 4 2 4 4 3 2 2 3 4 3 2 2 2 4 4 2 2 2 5 4 1 3 4 4 4 2 2 4 4 4 2 2 3 4 4 2 2 4 4 4 2 2 2 4 5 4 2 4 5 4 2 3 4 4 4 4 2 5 2 4 3 2 5 5 3 1 2 4 4 4 4 2 4 5 3 3 2 4 4 4 2 1 2 4 4 4 2 4 4 3 2 1 4 4 5 3 2 4 5 4 3 2 3 4 3 2 2 2 4 3 1 2 3 5 3 2 2 4 4 4 1 3 3 4 4 2 2 2 4 4 4 2 4 4 4 2 2 4 4 4 2 4 3 4 4 2 1 4 4 4 2 2 3 4 5 2 2 4 5 3 1 1 2 3 3 2 5 4 4 5 3 2 4 5 5 2 2 4 5 4 2 2 4 4 4 1 1 3 5 3 1 2 1 2 4 2 2 3 4 4 2 2 3 4 5 1 2 4 4 4 2 2 2 4 4 1 1 3 4 5 4 1 5 5 4 4 2 4 4 3 1 2 4 4 4 1 1 3 4 4 3 2 4 4 4 4 2 2 3 4 2 1 3 4 4 4 3 4 5 4 4 3 3 5 4 3 3 4 4 3 4 2 4 4 4 2 2 3 5 3 2 2 3 4 5 2 1 2 5 4 2 4 4 3 5 2 3 3 4 5 2 2 2 4 4 2 2 2 4 4 1 2 3 4 4 3 1 2 5 4 3 2 2 4 4 2 3 4 4 5 4 1 4 5 4 4 2 4 3 3 2 2 2 4 4 2 2 2 4 3 1 1 4 5 4 1 1 2 4 4 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
neat[t] = + 1.91248932919395 + 0.22582746701983fail[t] -0.0151695182184149performance[t] + 0.0407018900354282goals[t] + 0.408125426799028`organized `[t] -0.108520379228040M1[t] -0.320677772100933M2[t] -0.0523926228821235M3[t] -0.100794438378459M4[t] -0.0408498667731373M5[t] -0.325277806373867M6[t] -0.129584987021746M7[t] -0.168273241267620M8[t] + 0.353475024355944M9[t] + 0.368840159639130M10[t] + 0.0953099758679434M11[t] -0.00910905651160431t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.912489329193950.5063513.7770.0002330.000116
fail0.225827467019830.0704893.20370.0016750.000838
performance-0.01516951821841490.078959-0.19210.8479240.423962
goals0.04070189003542820.0743550.54740.5849620.292481
`organized `0.4081254267990280.0868224.70076e-063e-06
M1-0.1085203792280400.3161-0.34330.7318730.365937
M2-0.3206777721009330.314246-1.02050.3092420.154621
M3-0.05239262288212350.320743-0.16330.8704770.435238
M4-0.1007944383784590.321759-0.31330.7545420.377271
M5-0.04084986677313730.322792-0.12660.8994740.449737
M6-0.3252778063738670.320407-1.01520.3117360.155868
M7-0.1295849870217460.32523-0.39840.6909030.345452
M8-0.1682732412676200.323169-0.52070.6033880.301694
M90.3534750243559440.3208611.10160.2724790.136239
M100.3688401596391300.3238681.13890.2566790.128339
M110.09530997586794340.3209170.2970.7669060.383453
t-0.009109056511604310.00162-5.623100


Multiple Linear Regression - Regression Statistics
Multiple R0.661871167577602
R-squared0.438073442470539
Adjusted R-squared0.374757774016515
F-TEST (value)6.91887889944086
F-TEST (DF numerator)16
F-TEST (DF denominator)142
p-value1.57234225639513e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.812915986590508
Sum Squared Residuals93.8382009781274


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.88643493745207-0.886434937452065
243.805388127228880.194611872771119
344.72404948557196-0.724049485571957
443.966351457892720.0336485421072819
543.634593918004420.36540608199558
654.131775403673130.86822459632687
743.694769126293390.305230873706614
833.63660896193731-0.63660896193731
944.10854628101384-0.108546281013841
1044.42203360687611-0.42203360687611
1144.04282106830405-0.0428210683040475
1243.908062999487670.0919370005123304
1343.820772600184860.179227399815144
1423.16584835218432-1.16584835218432
1533.72942807477700-0.729428074777004
1644.50135852717092-0.501358527170923
1733.85200688659334-0.85200688659334
1822.74221903688295-0.74221903688295
1943.770586025138540.229413974861463
2033.72278871438106-0.722788714381059
2134.49159442694968-1.49159442694968
2244.7492103445581-0.749210344558104
2333.97421428020022-0.974214280200224
2433.82909335778525-0.829093357785248
2544.11958934884463-0.119589348844633
2643.330604267493720.669395732506282
2743.830777345439170.169222654560832
2843.73256458339580.267435416604200
2943.824101988524950.175898011475055
3043.449161212341750.550838787658245
3154.576929116091820.423070883908183
3243.654181926277240.345818073722764
3343.858096624084640.141903375915358
3444.86290151623348-0.862901516233478
3533.67978002507657-0.67978002507657
3644.66096882055554-0.660968820555541
3733.90938649099704-0.909386490997039
3843.396058312740270.60394168725973
3944.17312360133958-0.173123601339577
4033.67912731351039-0.679127313510391
4154.348746204204550.651253795795448
4243.606381891257760.393618108742238
4333.52643629704302-0.52643629704302
4433.70163883610017-0.701638836100169
4534.07268197546836-1.07268197546836
4643.797239178966270.202760821033733
4743.714895033886290.285104966113707
4844.14353471561726-0.143534715617261
4943.574250345837960.425749654162042
5043.28194296998120.718057030018798
5143.627329507379080.372670492620921
5243.513947227117300.486052772882704
5354.013610059045470.98638994095453
5432.611760480462810.388239519537192
5533.45302284431938-0.45302284431938
5654.084686982036000.915313017963995
5754.371498724128130.628501275871866
5843.969629376100690.0303706238993117
5943.843755723780080.156244276219918
6032.418387112714180.581612887285822
6143.424239777663280.575760222336722
6243.202973328278780.79702667172122
6353.277023844001581.72297615599842
6443.363936658942620.636063341057384
6543.244816115270350.755183884729653
6654.118290727087390.881709272912612
6743.840877654875030.159122345124967
6833.11559794305807-0.115597943058065
6943.602704780353010.397295219646989
7044.08614816498127-0.0861481649812668
7143.539807184848420.460192815151579
7243.447730053482080.552269946517916
7344.20024383217973-0.200243832179727
7443.93827549275980.0617245072401984
7543.604200581683580.395799418316423
7633.78768669491388-0.787686694913881
7743.754290812731540.245709187268461
7833.05262838982018-0.0526283898201764
7953.621805207642711.37819479235729
8042.793652268702791.20634773129721
8153.688884532796761.31111546720324
8253.669608239751331.33039176024867
8343.386968999468540.613031000531463
8443.097424390104590.902575609895412
8543.814042943386620.185957056613381
8643.169481548984680.830518451015322
8743.269064436524490.730935563475505
8854.101672961792070.898327038207927
8943.321088105069320.678911894930681
9032.902617821645500.0973821783545034
9143.089201584486010.910798415513987
9233.32027553179700-0.320275531797005
9343.343385534039080.656614465960921
9442.967048557828651.03295144217135
9543.726487638163740.273512361836258
9643.673133349418220.326866650581779
9743.730266637064380.269733362935619
9833.33706508149928-0.337065081499283
9933.14939290478664-0.149392904786644
10033.02084110630645-0.0208411063064463
10133.61990485372910-0.619904853729096
10232.834011033541670.165988966458327
10322.39983237336713-0.399832373367134
10432.957627967406300.042372032593703
10553.934264011571131.06573598842887
10623.06086259209742-1.06086259209742
10722.81609762464485-0.816097624644849
10832.473509224232260.52649077576774
10932.971835546887860.0281644531121445
11022.8064405057572-0.806440505757201
11122.79908724140915-0.799087241409148
11242.599980299657441.40001970034256
11332.212351351515300.787648648484702
11412.27106837394815-1.27106837394815
11512.72135387663872-1.72135387663872
11612.07277032570442-1.07277032570442
11723.53091455714499-1.53091455714499
11823.35204505893217-1.35204505893217
11932.309026373305170.690973626694833
12012.32067103885238-1.32067103885238
12132.254106346746760.745893653253241
12212.24830451078349-1.24830451078349
12322.94113840210674-0.94113840210674
12412.67296958129738-1.67296958129738
12522.94963256341093-0.949632563410932
12622.4737976075194-0.473797607519399
12732.627214716717880.372785283282117
12822.80524487298024-0.805244872980235
12923.31788408209219-1.31788408209219
13042.507889307265721.49211069273428
13123.01596854876397-1.01596854876397
13233.33484446140187-0.334844461401867
13322.59362498544196-0.593624985441963
13412.34682616424045-1.34682616424045
13522.8469992421859-0.846999242185903
13632.802678840981760.197321159018235
13711.60077808665618-0.600778086656181
13822.45021359087007-0.450213590870075
13922.31007570698242-0.310075706982419
14032.180874616154090.819125383845914
14132.734215715301470.265784284698527
14231.949753312292011.05024668770799
14343.431697565141100.568302434858904
14442.999708316242781.00029168375721
14523.11073396472818-1.11073396472818
14632.040050008103590.959949991896412
14732.948348512848070.0516514871519341
14822.25688474702127-0.256884747021268
14912.62407905524456-1.62407905524456
15022.35607443094924-0.356074430949238
15122.36789547040395-0.367895470403951
15242.954051053465331.04594894653467
15342.945328755056711.05467124494329
15422.60563074411679-0.60563074411679
15532.5184799344170.481520065583001
15622.69293216010592-0.69293216010592
15742.590472242584691.40952775741531
15821.930741329964340.0692586700356638
15943.080036819947060.91996318005294


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.4286681390447910.8573362780895820.571331860955209
210.277336045790560.554672091581120.72266395420944
220.2407609484984640.4815218969969270.759239051501536
230.1775048179863530.3550096359727060.822495182013647
240.1103886359646640.2207772719293290.889611364035335
250.06635467896980850.1327093579396170.933645321030191
260.0405948073138860.0811896146277720.959405192686114
270.1070944630473190.2141889260946380.892905536952681
280.09134331907985880.1826866381597180.908656680920141
290.06079812432456480.1215962486491300.939201875675435
300.04295511561207720.08591023122415430.957044884387923
310.05642020795376360.1128404159075270.943579792046236
320.05162018598903420.1032403719780680.948379814010966
330.05519507625579320.1103901525115860.944804923744207
340.05872680712205730.1174536142441150.941273192877943
350.06168142061710020.1233628412342000.9383185793829
360.04511354586705460.09022709173410920.954886454132945
370.05046565632946140.1009313126589230.949534343670539
380.05898361374798770.1179672274959750.941016386252012
390.04933708010746840.09867416021493680.950662919892532
400.04392834493281070.08785668986562150.95607165506719
410.03589710652940530.07179421305881050.964102893470595
420.02425397252830550.04850794505661110.975746027471694
430.02037271109879920.04074542219759850.9796272889012
440.01746958978274550.03493917956549110.982530410217254
450.02509532109060460.05019064218120910.974904678909395
460.02074795075530390.04149590151060780.979252049244696
470.02270677293536740.04541354587073480.977293227064633
480.01910274804077250.03820549608154510.980897251959228
490.01572518118073530.03145036236147060.984274818819265
500.01074756669855380.02149513339710770.989252433301446
510.009648065711070340.01929613142214070.99035193428893
520.007325018006962910.01465003601392580.992674981993037
530.006104446922452120.01220889384490420.993895553077548
540.003978339352774520.007956678705549040.996021660647226
550.006635167855815210.01327033571163040.993364832144185
560.008910671018007320.01782134203601460.991089328981993
570.007346537245686960.01469307449137390.992653462754313
580.005233746791843290.01046749358368660.994766253208157
590.003491403673857050.006982807347714110.996508596326143
600.003428984262526410.006857968525052820.996571015737474
610.002397735269104870.004795470538209740.997602264730895
620.001640338089123880.003280676178247760.998359661910876
630.003464867884153940.006929735768307870.996535132115846
640.002439101356608090.004878202713216170.997560898643392
650.001816084349842120.003632168699684240.998183915650158
660.001278678014683350.002557356029366690.998721321985317
670.0008269100129848820.001653820025969760.999173089987015
680.0006671783921395180.001334356784279040.99933282160786
690.000417638042754790.000835276085509580.999582361957245
700.0002876582500467010.0005753165000934010.999712341749953
710.0002294309755840820.0004588619511681640.999770569024416
720.0001420610425295930.0002841220850591860.99985793895747
730.0001332331792463720.0002664663584927440.999866766820754
740.0001046432900407620.0002092865800815250.99989535670996
756.30375019059781e-050.0001260750038119560.999936962498094
760.0001359598101057570.0002719196202115140.999864040189894
770.0001117441608065970.0002234883216131940.999888255839193
780.0001267163253915710.0002534326507831420.999873283674608
790.0001884902406534530.0003769804813069050.999811509759347
800.0002180887245682500.0004361774491364990.999781911275432
810.0002961649425522150.000592329885104430.999703835057448
820.0004542707503912560.0009085415007825110.999545729249609
830.0003118096519347840.0006236193038695680.999688190348065
840.000245707907747560.000491415815495120.999754292092252
850.0001577968966527860.0003155937933055720.999842203103347
860.0001457016026243950.0002914032052487890.999854298397376
870.0001168233079927680.0002336466159855370.999883176692007
889.44260565070915e-050.0001888521130141830.999905573943493
897.32996667704886e-050.0001465993335409770.99992670033323
908.55492302300503e-050.0001710984604601010.99991445076977
910.0001262596083803830.0002525192167607660.99987374039162
920.0001418169311777710.0002836338623555430.999858183068822
930.0001599050555409450.0003198101110818890.99984009494446
940.0002263228381449480.0004526456762898970.999773677161855
950.0001916528341978830.0003833056683957670.999808347165802
960.0001440135571967530.0002880271143935060.999855986442803
970.0001059767744930260.0002119535489860520.999894023225507
980.0001219465877799970.0002438931755599950.99987805341222
990.0001473150321788720.0002946300643577450.999852684967821
1000.0001610543767609280.0003221087535218560.99983894562324
1010.0002054340739101990.0004108681478203970.99979456592609
1020.0002716058035269760.0005432116070539510.999728394196473
1030.0002587174021391550.0005174348042783110.99974128259786
1040.0002034496303711950.000406899260742390.999796550369629
1050.001689695766513530.003379391533027070.998310304233486
1060.001633302280572790.003266604561145580.998366697719427
1070.001605293560227090.003210587120454170.998394706439773
1080.001362009918789480.002724019837578950.99863799008121
1090.001248230891009130.002496461782018260.99875176910899
1100.002006061386372930.004012122772745870.997993938613627
1110.002976170654902500.005952341309805010.997023829345097
1120.02906803084294180.05813606168588360.970931969157058
1130.06041653954270220.1208330790854040.939583460457298
1140.08595361056481650.1719072211296330.914046389435184
1150.1621742759351950.324348551870390.837825724064805
1160.1912991089791910.3825982179583820.808700891020809
1170.1969076510786270.3938153021572540.803092348921373
1180.2005454766335760.4010909532671520.799454523366424
1190.2167818447510670.4335636895021350.783218155248933
1200.2430327951549390.4860655903098780.756967204845061
1210.2559149216984720.5118298433969430.744085078301528
1220.2417801859400030.4835603718800050.758219814059997
1230.2106610331059070.4213220662118140.789338966894093
1240.2207156696351890.4414313392703770.779284330364811
1250.2269854649005210.4539709298010430.773014535099479
1260.1787036095511700.3574072191023390.82129639044883
1270.198512946566470.397025893132940.80148705343353
1280.2359410711156420.4718821422312830.764058928884358
1290.2460131616334160.4920263232668310.753986838366584
1300.3276804262825460.6553608525650930.672319573717454
1310.3247573515156950.649514703031390.675242648484305
1320.2495473745130230.4990947490260460.750452625486977
1330.2105854025177290.4211708050354590.78941459748227
1340.2940353785856770.5880707571713540.705964621414323
1350.4424715756046920.8849431512093840.557528424395308
1360.3623253806262520.7246507612525040.637674619373748
1370.3034953693188940.6069907386377870.696504630681106
1380.1973705148930600.3947410297861200.80262948510694
1390.1282288106919260.2564576213838520.871771189308074


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level540.45NOK
5% type I error level690.575NOK
10% type I error level770.641666666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/10y2d11291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/10y2d11291387490.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/22axs1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/22axs1291387490.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/32axs1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/32axs1291387490.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/42axs1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/42axs1291387490.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/52axs1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/52axs1291387490.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/75tey1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/75tey1291387490.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/85tey1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/85tey1291387490.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/95tey1291387490.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291387413orn8iriqasoksam/95tey1291387490.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly 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