Home » date » 2010 » Nov » 24 »

Workshop 7: Model 2: Run sequence plot of Yt

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 02:03:27 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d.htm/, Retrieved Wed, 24 Nov 2010 03:02:50 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d.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:
Effect maand?
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9 4 2 5 4 3 9 4 2 4 3 2 9 5 4 4 2 2 9 3 2 4 2 2 9 4 3 2 2 2 9 3 4 5 2 2 10 4 3 5 3 2 10 3 3 4 2 1 10 2 3 3 1 2 10 4 2 4 2 2 10 2 4 4 2 2 10 2 3 3 2 2 10 1 3 3 2 2 10 4 4 4 2 2 10 4 4 5 1 1 10 2 3 4 2 2 10 2 3 2 2 1 10 3 3 4 3 2 10 3 4 4 4 2 10 3 2 4 4 2 10 4 5 4 4 4 10 3 4 4 4 2 10 2 2 4 4 4 10 2 3 5 2 2 10 4 4 4 2 2 10 4 4 4 4 2 10 3 3 4 2 2 10 4 4 4 3 2 10 2 4 4 2 2 10 4 1 4 4 2 10 4 4 4 3 3 10 5 5 2 4 2 10 5 2 4 2 2 10 4 4 4 2 2 10 4 3 5 4 3 10 4 2 5 5 4 10 2 4 4 2 1 10 4 5 3 4 2 10 4 4 4 4 3 10 4 4 5 5 3 10 3 4 4 3 2 10 2 3 4 2 2 10 3 4 5 3 2 10 4 2 4 2 2 10 3 2 5 1 2 10 2 4 4 2 2 10 4 2 4 4 4 10 4 4 4 4 4 10 3 4 3 4 2 10 4 1 4 4 3 10 3 4 4 2 2 10 4 2 4 2 2 10 2 1 2 1 1 10 4 4 3 4 3 10 4 3 5 2 4 10 4 2 4 4 2 10 4 4 4 2 2 10 3 3 5 2 1 10 1 2 3 1 2 10 3 2 5 2 2 10 3 3 4 2 2 10 4 2 5 2 2 10 2 1 4 2 2 10 3 3 4 1 1 10 5 2 5 5 2 10 4 3 4 3 3 10 4 3 4 2 2 10 3 3 5 1 1 10 4 2 4 2 2 10 2 3 3 4 4 10 3 2 4 2 2 10 4 4 5 5 3 10 3 4 5 4 4 10 4 4 5 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
YT[t] = + 8.3338907536128 -0.707921514339912T1[t] + 0.0765528746818019X1[t] + 0.247513466468538X2[t] + 0.365683209924910X3[t] -0.115580997002373X4[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.33389075361283.5874742.32310.0215110.010756
T1-0.7079215143399120.35828-1.97590.049990.024995
X10.07655287468180190.0730271.04830.2961860.148093
X20.2475134664685380.0818683.02330.0029380.001469
X30.3656832099249100.0717685.09531e-061e-06
X4-0.1155809970023730.088948-1.29940.1957820.097891


Multiple Linear Regression - Regression Statistics
Multiple R0.478227147881943
R-squared0.228701204971298
Adjusted R-squared0.203161509771672
F-TEST (value)8.95473509702057
F-TEST (DF numerator)5
F-TEST (DF denominator)151
p-value1.80539287519821e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.858434433593512
Sum Squared Residuals111.273361193631


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.46926005495247-0.469260054952466
243.971644375561340.0283556244386557
353.759066915000021.24093308499998
433.60596116563642-0.605961165636421
543.187487107381150.812512892618853
634.00658038146856-1.00658038146856
743.587789202371750.412210797628249
833.09017352298068-0.090173522980676
922.36139584958486-0.361395849584856
1042.89803965129651.10196034870350
1123.05114540066011-1.05114540066010
1222.72707905950977-0.727079059509766
1312.72707905950977-1.72707905950977
1443.051145400660110.948854599339895
1543.048556654206110.951443345793894
1622.9745925259783-0.974592525978303
1722.5951465900436-0.5951465900436
1833.34027573590321-0.340275735903213
1933.78251182050992-0.782511820509924
2033.62940607114632-0.629406071146321
2143.627902701186980.372097298813020
2233.78251182050992-0.782511820509924
2323.39824407714158-1.39824407714158
2423.22210599244684-1.22210599244684
2543.051145400660110.948854599339895
2643.782511820509920.217488179490076
2732.974592525978300.0254074740216966
2843.416828610585010.583171389414985
2923.05114540066011-1.05114540066010
3043.552853196464520.44714680353548
3143.301247613582640.698752386417358
3253.364037762254651.63596223774535
3352.89803965129652.1019603487035
3443.051145400660110.948854599339895
3543.837891415294290.162108584705712
3644.01144075353502-0.0114407535350236
3723.16672639766248-1.16672639766248
3843.611551228723190.388448771276812
3943.666930823507550.333069176492448
4044.280127499901-0.280127499900999
4133.41682861058501-0.416828610585014
4222.9745925259783-0.974592525978303
4333.66434207705355-0.664342077053552
4442.89803965129651.10196034870350
4532.779869907840130.22013009215987
4623.05114540066011-1.05114540066010
4743.398244077141580.601755922858424
4843.551349826505180.448650173494821
4933.53499835404139-0.534998354041386
5043.437272199462150.562727800537853
5133.05114540066010-0.0511454006601048
5242.89803965129651.10196034870350
5322.07635763075509-0.0763576307550877
5443.419417357039010.580582642960986
5542.990943998442101.00905600155790
5643.629406071146320.370593928853679
5743.051145400660110.948854599339895
5833.33768698944921-0.337686989449214
5912.28484297490305-1.28484297490305
6033.14555311776504-0.145553117765040
6132.974592525978300.0254074740216966
6243.145553117765040.85444688223496
6322.8214867766147-0.8214867766147
6432.724490313055770.275509686944234
6554.242602747539770.757397252460232
6643.224694738900840.77530526109916
6742.974592525978301.02540747402170
6832.972003779524300.027996220475696
6942.89803965129651.10196034870350
7023.22728348535484-1.22728348535484
7132.89803965129650.101960348703498
7244.280127499901-0.280127499900999
7333.79886329297372-0.798863292973717
7443.664342077053550.335657922946448
7542.666877657291761.33312234270824
7633.09017352298068-0.090173522980676
7733.29865886712864-0.298658867128643
7823.22210599244684-1.22210599244684
7943.551349826505180.448650173494821
8033.02997212076267-0.0299721207626672
8122.72707905950977-0.727079059509766
8223.70595894582812-1.70595894582812
8333.78251182050992-0.782511820509924
8422.78245865429413-0.78245865429413
8523.05114540066011-1.05114540066010
8643.263722861221410.736277138778588
8743.261134114767410.738865885232588
8843.782511820509920.217488179490076
8922.9745925259783-0.974592525978303
9023.55134982650518-1.55134982650518
9142.89545090484251.10454909515750
9222.65052618482796-0.650526184827964
9333.09276226943468-0.0927622694346752
9433.22210599244684-0.222105992446841
9553.875416167655521.12458383234448
9632.666877657291760.333122342708243
9743.224694738900840.77530526109916
9833.05114540066010-0.0511454006601048
9922.85901152897593-0.85901152897593
10043.051145400660110.948854599339895
10133.09017352298068-0.090173522980676
10232.974592525978300.0254074740216966
10332.89803965129650.101960348703498
10443.587789202371750.412210797628249
10512.17185072435468-1.17185072435468
10632.974592525978300.0254074740216966
10723.01879814120687-1.01879814120687
10833.30124761358264-0.301247613582642
10923.14555311776504-1.14555311776504
11022.55352972126903-0.55352972126903
11122.81998340665536-0.81998340665536
11242.573973310146161.42602668985384
11354.224747905116630.775252094883365
11452.647937438373962.35206256162604
11532.974592525978300.0254074740216966
11642.556118467723031.44388153227697
11742.078946377209091.92105362279091
11833.01211727833953-0.0121172783395337
11922.84266005651214-0.842660056512138
12043.956061158750660.0439388412493403
12122.72707905950977-0.727079059509766
12232.611498062507390.388501937492607
12323.26113411476741-1.26113411476741
12422.8980396512965-0.898039651296502
12522.68805093718919-0.688050937189195
12643.166726397662480.833273602337522
12743.340275735903210.659724264096787
12842.974592525978301.02540747402170
12943.590377948825750.40962205117425
13033.53499835404139-0.534998354041386
13122.9745925259783-0.974592525978303
13243.782511820509920.217488179490076
13333.78251182050992-0.782511820509924
13422.8980396512965-0.898039651296502
13543.782511820509920.217488179490076
13632.90062839775050.0993716022494987
13733.05114540066010-0.0511454006601048
13832.974592525978300.0254074740216966
13932.729667805963770.270332194036235
14033.13437913820925-0.134379138209246
14143.629406071146320.370593928853679
14253.845301969181931.15469803081807
14323.01362064829887-1.01362064829887
14443.109113741898470.890886258101532
14533.70854769228212-0.708547692282122
14632.363984596038860.636015403961145
14712.47956559304123-1.47956559304123
14823.05114540066011-1.05114540066010
14942.803631934191571.19636806580843
15042.819983406655361.18001659334464
15154.032614033432460.96738596656754
15222.80622068064557-0.806220680645567
15343.375211741810440.624788258189556
15432.974592525978300.0254074740216966
15523.34027573590321-1.34027573590321
15643.301247613582640.698752386417358
15722.45688894318445-0.456888943184449


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.4785168085295330.9570336170590660.521483191470467
100.699572051804780.6008558963904390.300427948195220
110.7805608935647020.4388782128705950.219439106435298
120.7682443346515710.4635113306968570.231755665348429
130.8752719626610180.2494560746779650.124728037338982
140.909776371747670.1804472565046590.0902236282523297
150.888346165263250.2233076694735010.111653834736751
160.8704928033754960.2590143932490070.129507196624504
170.8395166895817510.3209666208364970.160483310418249
180.7832543064188670.4334913871622660.216745693581133
190.7266564084857540.5466871830284930.273343591514246
200.6602118482109790.6795763035780420.339788151789021
210.6608475882702250.678304823459550.339152411729775
220.6064812423148240.7870375153703510.393518757685176
230.5901152782907660.8197694434184670.409884721709234
240.619949318179880.7601013636402390.380050681820120
250.6421921633292370.7156156733415270.357807836670763
260.5949396067649870.8101207864700260.405060393235013
270.5352354649131790.9295290701736430.464764535086821
280.5062163728457680.9875672543084640.493783627154232
290.5370691538893770.9258616922212460.462930846110623
300.5735105106800050.8529789786399890.426489489319995
310.5806905754856950.8386188490286090.419309424514304
320.65798056569580.68403886860840.3420194343042
330.9086508619588650.1826982760822710.0913491380411354
340.9082660765304640.1834678469390730.0917339234695363
350.88678072791680.2264385441664020.113219272083201
360.8626414238523930.2747171522952140.137358576147607
370.8868429048533290.2263141902933420.113157095146671
380.8604365248694570.2791269502610870.139563475130544
390.8307400364784430.3385199270431150.169259963521558
400.7977176141570920.4045647716858170.202282385842908
410.7670014479842240.4659971040315520.232998552015776
420.7668809127043170.4662381745913660.233119087295683
430.743261163513560.513477672972880.25673883648644
440.781164077443930.437671845112140.21883592255607
450.7479048510603320.5041902978793350.252095148939668
460.7626611501390350.474677699721930.237338849860965
470.7390851390738380.5218297218523250.260914860926162
480.702632362957380.594735274085240.29736763704262
490.6748121739056530.6503756521886940.325187826094347
500.6467772484940040.7064455030119930.353222751505997
510.5984837450678750.8030325098642490.401516254932125
520.6253914590579260.7492170818841470.374608540942074
530.5798303289448680.8403393421102630.420169671055132
540.5456694628914960.9086610742170090.454330537108504
550.5422123356753890.9155753286492230.457787664324611
560.5059876875405080.9880246249189830.494012312459492
570.512256373948260.975487252103480.48774362605174
580.4668370749672940.9336741499345880.533162925032706
590.5419740971303150.916051805739370.458025902869685
600.493972016016420.987944032032840.50602798398358
610.4454776878597680.8909553757195350.554522312140232
620.4476188436462870.8952376872925740.552381156353713
630.440831037734450.88166207546890.55916896226555
640.4008822152536970.8017644305073950.599117784746303
650.3975590418660290.7951180837320590.602440958133971
660.3834591543892350.7669183087784690.616540845610765
670.3992511968848790.7985023937697580.600748803115121
680.3544643820149660.7089287640299310.645535617985034
690.3798501946688420.7597003893376830.620149805331158
700.4379051998232550.875810399646510.562094800176745
710.3922993209402460.7845986418804910.607700679059754
720.3522939675696510.7045879351393030.647706032430349
730.3471251387082780.6942502774165550.652874861291722
740.3107815801302080.6215631602604150.689218419869792
750.3623784456845240.7247568913690470.637621554315476
760.3193568084471060.6387136168942130.680643191552894
770.2833004052888230.5666008105776460.716699594711177
780.3218514237517810.6437028475035630.678148576248219
790.2910597794507070.5821195589014130.708940220549293
800.2532750244002870.5065500488005740.746724975599713
810.2443517343309500.4887034686619010.75564826566905
820.3512241318111340.7024482636222690.648775868188866
830.3416376454164400.6832752908328790.65836235458356
840.3357011502013210.6714023004026410.66429884979868
850.3581147433507720.7162294867015430.641885256649228
860.3472114919025170.6944229838050330.652788508097483
870.3370732407680960.6741464815361910.662926759231904
880.2981666865227290.5963333730454580.701833313477271
890.3085252690334480.6170505380668960.691474730966552
900.4031367341606160.8062734683212330.596863265839384
910.4363044032862270.8726088065724530.563695596713773
920.4122388972171480.8244777944342950.587761102782852
930.3671138062446890.7342276124893790.632886193755311
940.3252543689963020.6505087379926030.674745631003698
950.3495588247382630.6991176494765250.650441175261737
960.3179279592819540.6358559185639070.682072040718046
970.313106220215190.626212440430380.68689377978481
980.2717191767083640.5434383534167280.728280823291636
990.2656336914726060.5312673829452120.734366308527394
1000.2700027411312770.5400054822625550.729997258868723
1010.2314439316501970.4628878633003930.768556068349803
1020.1956784674079470.3913569348158950.804321532592053
1030.1646523917644210.3293047835288420.835347608235579
1040.1441299216531280.2882598433062560.855870078346872
1050.1625736367339190.3251472734678370.837426363266081
1060.1337918834181290.2675837668362580.866208116581871
1070.1485995680305550.2971991360611110.851400431969444
1080.1236578032607590.2473156065215180.87634219673924
1090.1341106645323490.2682213290646980.86588933546765
1100.1199958578365300.2399917156730590.88000414216347
1110.1161617240731320.2323234481462650.883838275926868
1120.1644947766122730.3289895532245470.835505223387727
1130.1530063337267740.3060126674535480.846993666273226
1140.4904043988975150.980808797795030.509595601102485
1150.4393814822374350.8787629644748710.560618517762565
1160.5133236136508700.973352772698260.48667638634913
1170.8388638864635290.3222722270729420.161136113536471
1180.8128053020515980.3743893958968030.187194697948402
1190.7868191617171930.4263616765656140.213180838282807
1200.7445503752056680.5108992495886640.255449624794332
1210.7115090734425460.5769818531149090.288490926557454
1220.6810536780829190.6378926438341630.318946321917081
1230.6843668034069420.6312663931861160.315633196593058
1240.654955413133430.6900891737331390.345044586866570
1250.644310836396070.711378327207860.35568916360393
1260.6513800117866860.6972399764266280.348619988213314
1270.6382897986384420.7234204027231150.361710201361558
1280.7166841755360180.5666316489279640.283315824463982
1290.6643178215107860.6713643569784290.335682178489214
1300.6422663892665620.7154672214668760.357733610733438
1310.6210888699345610.7578222601308770.378911130065439
1320.5531763441188710.8936473117622580.446823655881129
1330.5971495507474210.8057008985051590.402850449252579
1340.54457558075650.9108488384870.4554244192435
1350.474316721188370.948633442376740.52568327881163
1360.4153465160102550.830693032020510.584653483989745
1370.3422745818213340.6845491636426680.657725418178666
1380.2773471936065460.5546943872130910.722652806393454
1390.2284883274687470.4569766549374930.771511672531253
1400.1848619086838890.3697238173677780.815138091316111
1410.1769745194046520.3539490388093030.823025480595349
1420.1825972274419300.3651944548838590.81740277255807
1430.1315443708162630.2630887416325260.868455629183737
1440.1099431672229190.2198863344458380.89005683277708
1450.07419428992001090.1483885798400220.92580571007999
1460.1235529618095280.2471059236190550.876447038190472
1470.07764914811552520.1552982962310500.922350851884475
1480.09882863518400120.1976572703680020.901171364815999


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/107fdq1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/107fdq1290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/1ieyf1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/1ieyf1290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/2toyi1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/2toyi1290564190.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/44fxl1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/44fxl1290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/54fxl1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/54fxl1290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/64fxl1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/64fxl1290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/7woe51290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/7woe51290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/87fdq1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/87fdq1290564190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/97fdq1290564190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290564159wayws8i6bv5zr8d/97fdq1290564190.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