Home » date » 2010 » Dec » 02 »

parent expectations

*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: Thu, 02 Dec 2010 11:21:28 +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/02/t12912888355d0a8wxmtxde9ku.htm/, Retrieved Thu, 02 Dec 2010 12:20:53 +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/02/t12912888355d0a8wxmtxde9ku.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 2 1 2 1 2 1 1 5 4 2 4 3 2 1 2 3 3 2 2 3 4 1 2 2 3 3 2 3 3 1 2 4 3 1 1 4 2 1 4 4 4 2 2 2 4 4 3 2 3 2 2 2 3 1 2 4 4 1 1 4 4 3 3 3 3 2 1 2 3 2 2 5 3 3 4 4 4 3 4 3 2 1 3 4 5 2 2 3 4 2 3 2 2 2 2 2 3 2 2 3 4 3 3 4 4 2 3 4 3 2 2 5 4 2 4 4 4 2 2 3 1 2 2 4 4 3 3 4 5 2 5 4 2 2 2 5 4 2 3 2 3 2 1 2 2 2 2 4 4 1 2 5 5 2 4 3 4 1 2 5 4 2 4 2 4 2 3 4 3 2 2 4 4 2 4 2 2 2 2 2 2 3 2 4 4 2 2 2 2 2 2 2 4 2 2 4 4 4 3 1 1 1 1 2 4 2 2 4 2 2 2 1 1 1 1 5 4 5 5 4 3 2 2 4 2 2 2 4 4 2 2 1 3 1 1 4 2 2 2 4 2 2 2 4 3 2 2 4 2 2 4 2 1 2 2 4 3 1 1 3 2 1 2 2 3 2 2 4 3 2 2 4 3 1 1 3 2 2 2 3 3 2 2 2 2 1 2 4 4 3 3 4 4 3 3 4 4 3 2 4 2 2 2 4 3 2 3 4 4 2 2 2 3 1 2 2 4 4 2 4 2 3 2 2 3 2 2 4 3 2 1 5 4 2 3 2 2 1 2 4 4 2 4 2 2 3 2 4 2 1 1 4 4 2 4 2 3 2 3 4 4 2 2 1 2 1 3 2 2 1 2 5 3 2 3 2 3 2 2 5 5 4 5 4 2 2 3 4 3 4 4 2 4 1 2 2 3 3 2 4 4 2 2 2 3 2 3 4 3 4 4 4 2 3 3 2 3 2 2 4 2 1 2 2 3 1 3 4 2 2 2 4 4 3 2 4 2 2 2 3 4 1 2 3 4 2 3 2 1 2 2 5 5 2 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 time15 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
best[t] = + 1.22151640213814 + 0.231803248360643standards[t] + 0.0583245373239288performance[t] + 0.467278936963013excellence[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.221516402138140.2849864.28623.2e-051.6e-05
standards0.2318032483606430.0880292.63330.0093140.004657
performance0.05832453732392880.1092040.53410.5940460.297023
excellence0.4672789369630130.1027734.54671.1e-055e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.536873098061071
R-squared0.288232723421692
Adjusted R-squared0.274456582584693
F-TEST (value)20.9226028415423
F-TEST (DF numerator)3
F-TEST (DF denominator)155
p-value1.95858884666222e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.963925850954448
Sum Squared Residuals144.018722151430


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
142.678005310109391.32199468989061
212.21072637314639-1.21072637314639
354.134494218080620.86550578191938
432.678005310109390.321994689890611
532.968133095793960.0318669042060444
633.14161180683067-0.141611806830668
723.02645763311788-1.02645763311788
832.909808558470030.0901914415299734
942.442529621507011.55747037849299
1043.612563184035410.387436815964589
1143.19993634415460.800063655845403
1223.78386435576547-1.78386435576547
1322.96813309579396-0.968133095793956
1422.90980855847003-0.909808558470027
1542.674332869867661.32566713013234
1643.725539818441540.274460181558461
1732.500854158830940.499145841169057
1822.96813309579396-0.968133095793956
1953.961015507043911.03898449295609
2044.19281875540455-0.192818755404552
2133.1452842470724-0.145284247072398
2243.431739592515240.568260407484761
2333.66721528111761-0.66721528111761
2422.73632984743331-0.736329847433314
2522.96813309579396-0.968133095793956
2633.72553981844154-0.725539818441539
2743.667215281117610.33278471888239
2842.968133095793961.03186690420604
2954.134494218080620.865505781919377
3043.19993634415460.800063655845403
3132.504526599072670.495473400927328
3243.725539818441540.274460181558461
3344.83357640340428-0.833576403404278
3442.736329847433311.26367015256669
3553.667215281117611.33278471888239
3622.50085415883094-0.500854158830943
3722.73632984743331-0.736329847433314
3843.141611806830670.858388193169332
3954.366297466441270.633702533558735
4033.14161180683067-0.141611806830668
4154.134494218080620.865505781919377
4223.66721528111761-1.66721528111761
4342.968133095793961.03186690420604
4444.13449421808062-0.134494218080623
4522.73632984743331-0.736329847433314
4622.79465438475724-0.794654384757243
4743.19993634415460.800063655845403
4822.73632984743331-0.736329847433314
4923.1999363441546-1.19993634415460
5043.783864355765470.216135644234532
5111.97892312478573-0.97892312478573
5223.1999363441546-1.19993634415460
5342.736329847433311.26367015256669
5411.97892312478573-0.97892312478573
5554.776746767015420.223253232984577
5642.968133095793961.03186690420604
5742.736329847433311.26367015256669
5843.19993634415460.800063655845403
5912.44252962150701-1.44252962150701
6042.736329847433311.26367015256669
6142.736329847433311.26367015256669
6242.968133095793961.03186690420604
6343.670887721359340.32911227864066
6422.50452659907267-0.504526599072672
6542.442529621507011.55747037849299
6632.678005310109390.321994689890615
6722.96813309579396-0.968133095793956
6842.968133095793961.03186690420604
6942.442529621507011.55747037849299
7032.736329847433310.263670152566686
7132.968133095793960.0318669042060444
7222.67800531010939-0.678005310109385
7343.725539818441540.274460181558461
7443.725539818441540.274460181558461
7543.258260881478530.741739118521474
7642.736329847433311.26367015256669
7743.435412032756970.564587967243031
7843.19993634415460.800063655845403
7922.90980855847003-0.909808558470027
8023.31658541880245-1.31658541880245
8142.794654384757241.20534561524276
8222.96813309579396-0.968133095793956
8342.500854158830941.49914584116906
8453.667215281117611.33278471888239
8522.67800531010939-0.678005310109385
8644.13449421808062-0.134494218080623
8722.79465438475724-0.794654384757243
8842.210726373146371.78927362685363
8944.13449421808062-0.134494218080623
9023.43541203275697-1.43541203275697
9143.19993634415460.800063655845403
9213.1452842470724-2.1452842470724
9322.67800531010939-0.678005310109385
9453.435412032756971.56458796724303
9522.96813309579396-0.968133095793956
9654.950225478052140.049774521947864
9743.203608784396330.796391215603673
9844.01934004436784-0.0193400443678395
9923.14161180683067-1.14161180683067
10023.02645763311788-1.02645763311788
10143.19993634415460.800063655845403
10223.43541203275697-1.43541203275697
10344.01934004436784-0.0193400443678395
10443.261933321720260.738066678279744
10522.96813309579396-0.968133095793956
10642.678005310109391.32199468989062
10723.37708749543304-1.37708749543304
10842.736329847433311.26367015256669
10943.258260881478530.741739118521474
11042.736329847433311.26367015256669
11133.14161180683067-0.141611806830668
11233.66721528111761-0.66721528111761
11322.50452659907267-0.504526599072672
11454.366297466441270.633702533558735
11532.210726373146370.789273626853628
11642.968133095793961.03186690420604
11734.19281875540455-1.19281875540455
11822.50452659907267-0.504526599072672
11943.431739592515240.568260407484761
12022.44252962150701-0.442529621507014
12112.44252962150701-1.44252962150701
12223.43541203275697-1.43541203275697
12343.435412032756970.564587967243031
12412.21072637314637-1.21072637314637
12512.2690509104703-1.2690509104703
12643.725539818441540.274460181558461
12732.674332869867660.325667130132345
12822.96813309579396-0.968133095793956
12933.43541203275697-0.435412032756969
13022.96813309579396-0.968133095793956
13133.1999363441546-0.199936344154597
13242.968133095793961.03186690420604
13323.14161180683067-1.14161180683067
13413.14161180683067-2.14161180683067
13542.736329847433311.26367015256669
13644.25114329272848-0.251143292728481
13742.736329847433311.26367015256669
13833.1999363441546-0.199936344154597
13923.43541203275697-1.43541203275697
14022.96813309579396-0.968133095793956
14122.73632984743331-0.736329847433314
14253.670887721359341.32911227864066
14354.541271078413050.458728921586948
14422.21072637314637-0.210726373146372
14533.78386435576547-0.783864355765468
14622.96813309579396-0.968133095793956
14743.961015507043910.0389844929560892
14822.96813309579396-0.968133095793956
14922.50085415883094-0.500854158830943
15043.19993634415460.800063655845403
15123.14161180683067-1.14161180683067
15253.667215281117611.33278471888239
15354.776746767015420.223253232984577
15443.19993634415460.800063655845403
15544.42462200376519-0.424622003765194
15642.968133095793961.03186690420604
15722.96813309579396-0.968133095793956
15843.667215281117610.33278471888239
15934.25114329272848-1.25114329272848


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.3487057722836070.6974115445672130.651294227716393
80.1969261176747610.3938522353495210.80307388232524
90.6490903449723480.7018193100553050.350909655027653
100.5635811084804160.8728377830391670.436418891519584
110.4955478226514280.9910956453028570.504452177348572
120.4604981025359050.920996205071810.539501897464095
130.4186588978687570.8373177957375150.581341102131243
140.518552545823940.962894908352120.48144745417606
150.4860344379328170.9720688758656340.513965562067183
160.4501722550359020.9003445100718030.549827744964098
170.4285116319428730.8570232638857450.571488368057127
180.4027477000936280.8054954001872560.597252299906372
190.5166931415780950.966613716843810.483306858421905
200.4439596818092710.8879193636185420.556040318190729
210.3857102204920610.7714204409841220.614289779507939
220.3192041457818720.6384082915637450.680795854218128
230.324741242016080.649482484032160.67525875798392
240.2712406879879900.5424813759759810.72875931201201
250.2553610688545130.5107221377090270.744638931145487
260.2154306136301480.4308612272602960.784569386369852
270.1701930059414720.3403860118829430.829806994058528
280.2058334806692130.4116669613384260.794166519330787
290.1752465913807670.3504931827615330.824753408619233
300.1566033568313140.3132067136626280.843396643168686
310.1741953604543850.348390720908770.825804639545615
320.1461198575255790.2922397150511590.85388014247442
330.1827474109965910.3654948219931820.817252589003409
340.2277064769996120.4554129539992250.772293523000388
350.2603847948115860.5207695896231720.739615205188414
360.2284569850437270.4569139700874550.771543014956273
370.2077340323651060.4154680647302110.792265967634894
380.1804569797859850.3609139595719700.819543020214015
390.1525002203535880.3050004407071760.847499779646412
400.1353560026202450.2707120052404890.864643997379755
410.1236943737348630.2473887474697260.876305626265137
420.2165882120896640.4331764241793280.783411787910336
430.2258252252143390.4516504504286790.77417477478566
440.1913889278741390.3827778557482790.80861107212586
450.1741180738070880.3482361476141760.825881926192912
460.1521980190599450.3043960381198910.847801980940055
470.1409459715788950.2818919431577900.859054028421105
480.1260434944772980.2520869889545950.873956505522702
490.1501955468115670.3003910936231350.849804453188433
500.1384165255560950.2768330511121890.861583474443905
510.1396414696798190.2792829393596370.860358530320181
520.1621637079686030.3243274159372060.837836292031397
530.2005385163621020.4010770327242030.799461483637898
540.2013187138631040.4026374277262090.798681286136896
550.1794460091367080.3588920182734160.820553990863292
560.1884927021148460.3769854042296920.811507297885154
570.2221598099159790.4443196198319580.777840190084021
580.2097466838203660.4194933676407310.790253316179634
590.2629536773414650.525907354682930.737046322658535
600.2969952639701960.5939905279403930.703004736029804
610.3285663938965800.6571327877931590.67143360610342
620.3338409258373940.6676818516747870.666159074162606
630.2969593938413080.5939187876826170.703040606158692
640.2679141853524510.5358283707049020.732085814647549
650.3277360075035930.6554720150071850.672263992496407
660.2904950081018990.5809900162037990.7095049918981
670.2926506924682130.5853013849364270.707349307531786
680.2976307907757060.5952615815514120.702369209224294
690.3588641188347670.7177282376695340.641135881165233
700.3191957318483840.6383914636967670.680804268151616
710.2789654828002490.5579309656004980.721034517199751
720.2645018624429750.5290037248859510.735498137557025
730.2309187160162090.4618374320324180.769081283983791
740.1998623004366880.3997246008733770.800137699563312
750.1870605953600490.3741211907200980.812939404639951
760.2107988440015450.421597688003090.789201155998455
770.1899996027161590.3799992054323170.810000397283841
780.1802723456679620.3605446913359250.819727654332038
790.1815497203057710.3630994406115420.81845027969423
800.210931935607020.421863871214040.78906806439298
810.2313689529330790.4627379058661580.768631047066921
820.2327601392033980.4655202784067960.767239860796602
830.2843785675965100.5687571351930190.71562143240349
840.3259036405423490.6518072810846980.674096359457651
850.3061125394473410.6122250788946820.693887460552659
860.2704077872774400.5408155745548810.72959221272256
870.2599897355978350.519979471195670.740010264402165
880.3668272995430040.7336545990860080.633172700456996
890.3277369484273110.6554738968546220.672263051572689
900.3738876491142840.7477752982285680.626112350885716
910.3664659840104320.7329319680208640.633534015989568
920.5366151436144980.9267697127710040.463384856385502
930.511123577045940.977752845908120.48887642295406
940.5967232365786080.8065535268427830.403276763421392
950.5929967908943910.8140064182112180.407003209105609
960.5470710946293740.9058578107412520.452928905370626
970.5360105793098080.9279788413803830.463989420690192
980.489318445796320.978636891592640.51068155420368
990.498113804852730.996227609705460.50188619514727
1000.5041414641639610.9917170716720780.495858535836039
1010.5002365099432810.9995269801134380.499763490056719
1020.5483136044307810.9033727911384370.451686395569218
1030.5014937916465210.9970124167069570.498506208353479
1040.4782912728350130.9565825456700270.521708727164987
1050.4720586489364990.9441172978729970.527941351063501
1060.5326161509851850.934767698029630.467383849014815
1070.5626762393393270.8746475213213450.437323760660673
1080.6076903846524460.7846192306951070.392309615347554
1090.5990341493722270.8019317012555450.400965850627773
1100.6534492547825410.6931014904349170.346550745217459
1110.6080510531431080.7838978937137840.391948946856892
1120.5760333426150830.8479333147698350.423966657384918
1130.5330781323896040.9338437352207920.466921867610396
1140.5127241780255750.974551643948850.487275821974425
1150.5223889008853860.9552221982292270.477611099114614
1160.5596545415143060.8806909169713880.440345458485694
1170.5850709717887850.829858056422430.414929028211215
1180.5386474788622570.9227050422754870.461352521137743
1190.53873766148540.92252467702920.4612623385146
1200.4918284867976510.9836569735953010.508171513202349
1210.5093145564725330.9813708870549340.490685443527467
1220.5680481124423050.863903775115390.431951887557695
1230.5343530963851980.9312938072296040.465646903614802
1240.5370003151446040.9259993697107910.462999684855396
1250.5645582681781490.8708834636437010.435441731821851
1260.5190274159923780.9619451680152440.480972584007622
1270.513944345333220.972111309333560.48605565466678
1280.4977109030521840.9954218061043690.502289096947816
1290.4478178984497120.8956357968994240.552182101550288
1300.4340727669987870.8681455339975750.565927233001213
1310.3784405352558410.7568810705116820.621559464744159
1320.4039641599730860.8079283199461720.596035840026914
1330.3740108870437080.7480217740874160.625989112956292
1340.543569514972710.912860970054580.45643048502729
1350.6013925712070930.7972148575858150.398607428792907
1360.5349726408297590.9300547183404820.465027359170241
1370.6444970524794590.7110058950410830.355502947520541
1380.5738182119029090.8523635761941820.426181788097091
1390.6785906149442570.6428187701114850.321409385055743
1400.6509215745141030.6981568509717930.349078425485897
1410.5980468285585130.8039063428829730.401953171441487
1420.6273678537054830.7452642925890340.372632146294517
1430.5831024575861130.8337950848277740.416897542413887
1440.4952822107479150.990564421495830.504717789252085
1450.4213600692509320.8427201385018630.578639930749068
1460.383388266025270.766776532050540.61661173397473
1470.2953010237286320.5906020474572650.704698976271368
1480.2699615312885960.5399230625771910.730038468711405
1490.2130893155253690.4261786310507380.786910684474631
1500.1651555238184290.3303110476368580.834844476181571
1510.2553385869633920.5106771739267850.744661413036608
1520.2368264840466430.4736529680932850.763173515953357


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/Dec/02/t12912888355d0a8wxmtxde9ku/100sp81291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/100sp81291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/1trsw1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/1trsw1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/2trsw1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/2trsw1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/3mi9h1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/3mi9h1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/4mi9h1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/4mi9h1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/5mi9h1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/5mi9h1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/6esqk1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/6esqk1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/7esqk1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/7esqk1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/8p1qn1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/8p1qn1291288871.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/9p1qn1291288871.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t12912888355d0a8wxmtxde9ku/9p1qn1291288871.ps (open in new window)


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