Home » date » 2010 » Nov » 23 »

workshop 7 month

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 15:17:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di.htm/, Retrieved Tue, 23 Nov 2010 16:17:06 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9 3 3 3 3 3 3 9 5 5 5 1 5 5 9 4 4 4 3 3 4 9 4 4 4 3 4 4 9 5 4 4 1 4 4 9 5 3 5 1 5 5 9 2 1 3 5 3 2 9 5 4 4 2 4 4 9 4 4 4 2 4 4 9 4 4 4 2 5 4 9 5 4 5 4 5 4 9 3 3 3 3 3 3 9 5 4 4 2 4 4 9 3 3 3 3 3 3 9 5 4 5 1 5 4 9 3 3 3 3 3 3 9 4 5 4 2 4 4 9 5 4 5 1 5 5 9 4 3 3 3 4 3 9 3 3 3 3 3 3 9 4 4 3 2 4 3 9 4 3 4 2 4 3 9 3 3 3 3 3 3 9 3 3 3 3 4 3 9 4 5 5 1 4 4 9 5 5 5 1 4 4 9 4 4 4 1 4 4 9 4 4 4 1 4 4 9 4 5 4 1 4 4 9 4 4 4 3 4 4 9 4 4 5 1 4 4 9 3 3 3 3 3 3 9 4 4 4 1 4 4 9 5 4 5 2 5 5 9 4 4 4 1 4 4 9 4 4 4 2 4 4 9 3 4 4 2 4 4 9 4 4 4 2 3 4 9 4 3 4 1 5 4 9 4 4 4 3 4 4 9 5 2 4 1 5 3 9 4 4 4 1 4 4 9 3 3 3 3 3 3 9 3 3 3 3 3 3 9 4 4 4 1 3 4 9 4 3 4 2 4 3 9 4 4 4 4 4 4 9 5 4 4 2 4 4 9 4 4 4 1 4 3 9 5 4 4 1 4 4 9 4 4 4 2 4 4 9 4 4 4 2 4 4 9 4 3 3 3 4 4 10 4 4 5 5 4 5 10 4 3 4 2 3 3 10 5 4 4 1 4 4 10 4 4 4 1 4 4 10 4 3 5 1 4 4 10 4 4 4 1 4 4 10 4 4 4 2 4 4 10 3 3 2 2 3 3 10 4 4 4 2 4 4 10 5 4 1 4 4 10 1 3 2 3 3 3 10 3 3 3 3 3 3 10 5 4 5 1 4 4 10 4 4 3 2 4 4 10 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Part_of_team[t] = + 1.16128089731477 + 0.211061793737835month[t] + 0.00834396277775193Respect_of_coach[t] -0.0429963883775932Respect_of_team[t] -0.119630578090363Be_on_different_team[t] + 0.183772781787723Be_liked[t] + 0.153489628576142Proudness[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.161280897314770.8663031.34050.1820570.091028
month0.2110617937378350.0628213.35970.0009840.000492
Respect_of_coach0.008343962777751930.1004560.08310.9339110.466955
Respect_of_team-0.04299638837759320.078237-0.54960.5834150.291708
Be_on_different_team-0.1196305780903630.03822-3.130.0020910.001046
Be_liked0.1837727817877230.0482263.81062e-041e-04
Proudness0.1534896285761420.0522062.94010.0037880.001894


Multiple Linear Regression - Regression Statistics
Multiple R0.755310210130863
R-squared0.570493513527928
Adjusted R-squared0.553759494574471
F-TEST (value)34.0918410045222
F-TEST (DF numerator)6
F-TEST (DF denominator)154
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.81022987195237
Sum Squared Residuals101.096756592209


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.60977526097623-0.609775260976235
254.454256386685060.545743613314936
343.728612463952560.271387536047438
443.912385245740290.087614754259709
554.1516464019210.848353598079
654.437568461129530.562431538870468
723.2003365506639-1.20033655066390
854.032015823830650.967984176169347
944.03201582383065-0.0320158238306529
1044.21578860561838-0.215788605618376
1153.933531061060061.06646893893994
1233.60977526097627-0.609775260976268
1354.032015823830650.967984176169347
1433.60977526097627-0.609775260976268
1554.292422795331140.707577204668856
1633.60977526097627-0.609775260976268
1744.04035978660840-0.0403597866084040
1854.445912423907290.554087576092714
1943.793548042763990.206451957236009
2033.60977526097627-0.609775260976268
2143.921522583632100.0784774163678955
2243.870182232476760.129817767523240
2333.60977526097627-0.609775260976268
2433.79354804276399-0.793548042763991
2544.11699397632117-0.116993976321172
2654.116993976321170.883006023678828
2744.15164640192102-0.151646401921015
2844.15164640192102-0.151646401921015
2944.15999036469877-0.159990364698766
3043.912385245740290.0876147542597093
3144.10865001354342-0.108650013543421
3233.60977526097627-0.609775260976268
3344.15164640192102-0.151646401921015
3454.326281845816920.673718154183076
3544.15164640192102-0.151646401921015
3644.03201582383065-0.0320158238306529
3734.03201582383065-1.03201582383065
3843.848243042042930.15175695795707
3944.32707522093099-0.327075220930987
4043.912385245740290.0876147542597093
4154.165241629577090.834758370422906
4244.15164640192102-0.151646401921015
4333.60977526097627-0.609775260976268
4433.60977526097627-0.609775260976268
4543.967873620133290.0321263798667078
4643.870182232476760.129817767523240
4743.792754667649930.207245332350072
4854.032015823830650.967984176169347
4943.998156773344870.00184322665512705
5054.151646401921020.848353598078985
5144.03201582383065-0.0320158238306529
5244.03201582383065-0.0320158238306529
5343.947037671340130.0529623286598665
5443.994679123495950.00532087650404914
5543.897471244426870.102528755573127
5654.362708195658850.637291804341148
5744.36270819565885-0.362708195658852
5844.31136784450351-0.311367844503507
5944.36270819565885-0.362708195658852
6044.24307761756849-0.243077617568489
6133.98346402118206-0.98346402118206
6244.24307761756849-0.243077617568489
6355.0537433979774-0.0537433979774002
6432.987364348328820.0126356516711787
6533.41783189858225-0.417831898582245
6644.00677839206597-0.00677839206596905
6743.736032284395040.263967715604963
6843.787372635550380.212627364449618
6943.601604680369970.398395319630032
7033.74437624717279-0.744376247172788
7143.744376247172790.255623752827212
7233.41783189858225-0.417831898582245
7333.99843442928822-0.998434429288218
7433.59525589098491-0.595255890984908
7554.062576632985580.937423367014421
7643.81686241364790.183137586352101
7743.744376247172790.255623752827212
7823.78737263555038-1.78737263555038
7943.787372635550380.212627364449618
8033.41783189858225-0.417831898582245
8143.878803851197860.121196148802144
8243.77166525912290.228334740877099
8343.962801454560350.0371985454396466
8443.744376247172790.255623752827212
8543.887147813975610.112852186024393
8643.787372635550380.212627364449618
8743.744376247172790.255623752827212
8833.41783189858225-0.417831898582245
8943.744376247172790.255623752827212
9033.62474566908243-0.624745669082425
9133.41783189858225-0.417831898582245
9253.955438040910621.04456195908938
9343.998434429288220.00156557071178222
9454.182207211075940.81779278892406
9543.787372635550380.212627364449618
9633.74437624717279-0.744376247172788
9733.78737263555038-0.787372635550381
9843.971145417338100.0288545826618956
9943.971145417338100.0288545826618956
10043.744376247172790.255623752827212
10153.787372635550381.21262736444962
10253.887147813975611.11285218602439
10333.70137985879519-0.701379858795194
10453.667742057460021.33225794253998
10543.533314453434950.466685546565049
10643.912441652533030.08755834746697
10743.714093093961210.285906906038793
10833.57132152715839-0.571321527158388
10943.445237885911070.554762114088929
11054.047258110411430.952741889588566
11144.15231291171770-0.152312911717696
11253.595133187460761.40486681253924
11314.00700842990805-3.00700842990806
11444.37171866823328-0.371718668233283
11553.893768481835291.10623151816471
11633.96707638142718-0.967076381427176
11742.083804434115931.91619556588407
11832.280290451069670.71970954893033
11911.73917861010234-0.73917861010234
12031.570132655614071.42986734438593
12112.28029045106967-1.28029045106967
12211.96594778026766-0.965947780267656
12312.06186524368210-1.06186524368210
12431.900031652328211.09996834767179
12522.24563802546983-0.245638025469827
12612.07644102046620-1.07644102046620
12722.08380443411593-0.0838044341159338
12842.11943740884381.8805625911562
12921.900031652328210.0999683476717892
13011.90003165232821-0.900031652328211
13121.900031652328210.0999683476717892
13211.40927961338820-0.409279613388204
13321.900031652328210.0999683476717892
13422.19429767431448-0.194297674314482
13511.73083464732459-0.730834647324588
13631.570132655614071.42986734438593
13731.554425279186591.44557472081341
13841.416643027037932.58335697296207
13921.767599221695830.232400778304167
14011.56276924196435-0.562769241964346
14132.060884694554080.939115305445918
14212.26021380225393-1.26021380225393
14312.26021380225393-1.26021380225393
14412.08380443411593-1.08380443411593
14512.26021380225393-1.26021380225393
14631.797882374907411.20211762509259
14721.877111912766360.122888087233641
14822.11109344606605-0.111093446066047
14912.04080804573834-1.04080804573834
15012.41370343083007-1.41370343083007
15121.900031652328210.0999683476717892
15211.90003165232821-0.900031652328211
15322.05352128090435-0.053521280904353
15422.23729406269208-0.237294062692076
15521.782174998479930.217825001520067
15631.723622284190221.27637771580978
15712.08380443411593-1.08380443411593
15842.303210190631521.69678980936848
15912.20264163709223-1.20264163709223
16012.41370343083007-1.41370343083007
16131.759034009767481.24096599023252


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.2610336073534490.5220672147068980.738966392646551
110.2198416992550640.4396833985101290.780158300744936
120.1189714734671030.2379429469342060.881028526532897
130.1211674789610020.2423349579220040.878832521038998
140.06687244219333670.1337448843866730.933127557806663
150.05854411411572590.1170882282314520.941455885884274
160.03211211029249150.0642242205849830.967887889707508
170.02738135676735660.05476271353471320.972618643232643
180.01655764414943980.03311528829887960.98344235585056
190.02449369866119090.04898739732238180.97550630133881
200.01430784199151440.02861568398302880.985692158008486
210.008140220707256720.01628044141451340.991859779292743
220.004200906898808040.008401813797616080.995799093101192
230.002294757631577830.004589515263155660.997705242368422
240.001605992222768490.003211984445536970.998394007777232
250.00312836232524050.0062567246504810.99687163767476
260.002257064889471450.00451412977894290.997742935110528
270.001449004009269610.002898008018539220.99855099599073
280.0008819090084424850.001763818016884970.999118090991558
290.0006256737831579530.001251347566315910.999374326216842
300.0003266290137466870.0006532580274933750.999673370986253
310.0002424966526422100.0004849933052844210.999757503347358
320.0001334149906155660.0002668299812311320.999866585009384
337.12534929170764e-050.0001425069858341530.999928746507083
343.93683446416408e-057.87366892832816e-050.999960631655358
352.01911196596362e-054.03822393192724e-050.99997980888034
369.93342473136654e-061.98668494627331e-050.999990066575269
377.20251781260196e-050.0001440503562520390.999927974821874
384.24024395185278e-058.48048790370556e-050.999957597560482
392.63371718168281e-055.26743436336562e-050.999973662828183
401.33103418131922e-052.66206836263845e-050.999986689658187
413.01642772341303e-056.03285544682607e-050.999969835722766
421.61191558936880e-053.22383117873761e-050.999983880844106
439.43908973299725e-061.88781794659945e-050.999990560910267
445.67224434989345e-061.13444886997869e-050.99999432775565
453.11265158863802e-066.22530317727604e-060.999996887348411
461.54722520467245e-063.09445040934491e-060.999998452774795
477.53645710918633e-071.50729142183727e-060.99999924635429
482.09390697234421e-064.18781394468841e-060.999997906093028
491.03608850485185e-062.07217700970370e-060.999998963911495
501.91977332278856e-063.83954664557713e-060.999998080226677
519.92667779474897e-071.98533555894979e-060.99999900733222
525.06865913611125e-071.01373182722225e-060.999999493134086
533.01323618756655e-076.0264723751331e-070.999999698676381
541.44951343173615e-072.8990268634723e-070.999999855048657
551.14509486078026e-072.29018972156051e-070.999999885490514
569.17410821469271e-081.83482164293854e-070.999999908258918
578.29743450141144e-081.65948690028229e-070.999999917025655
587.07722543810733e-081.41544508762147e-070.999999929227746
594.14216167696000e-088.28432335391999e-080.999999958578383
602.05558989390729e-084.11117978781458e-080.999999979444101
612.01519890700627e-084.03039781401254e-080.99999997984801
621.12703021358113e-082.25406042716226e-080.999999988729698
631.07114703879871e-082.14229407759742e-080.99999998928853
648.04645289043632e-091.60929057808726e-080.999999991953547
655.54837652011804e-091.10967530402361e-080.999999994451623
662.55243886732591e-095.10487773465182e-090.999999997447561
671.2971451853032e-092.5942903706064e-090.999999998702855
686.33205789010354e-101.26641157802071e-090.999999999366794
693.25273368278388e-106.50546736556776e-100.999999999674727
708.19780690591284e-101.63956138118257e-090.99999999918022
714.0612885768736e-108.1225771537472e-100.99999999959387
722.29211317628570e-104.58422635257141e-100.999999999770789
737.47139586646847e-101.49427917329369e-090.99999999925286
747.5128160859582e-101.50256321719164e-090.999999999248718
751.18138915384737e-092.36277830769474e-090.99999999881861
769.74726229154057e-101.94945245830811e-090.999999999025274
775.0810698949105e-101.0162139789821e-090.999999999491893
785.5221251893794e-081.10442503787588e-070.999999944778748
793.85890021705518e-087.71780043411036e-080.999999961410998
802.25218488425795e-084.50436976851589e-080.999999977478151
811.53187164782841e-083.06374329565682e-080.999999984681283
821.29425462473907e-082.58850924947815e-080.999999987057454
837.61052778759766e-091.52210555751953e-080.999999992389472
844.14348082078551e-098.28696164157101e-090.999999995856519
852.13630403661332e-094.27260807322664e-090.999999997863696
861.28159079478874e-092.56318158957747e-090.99999999871841
876.61918852148587e-101.32383770429717e-090.999999999338081
883.8642988367332e-107.7285976734664e-100.99999999961357
891.95404124989329e-103.90808249978658e-100.999999999804596
902.27881896242416e-104.55763792484832e-100.999999999772118
911.36123088436745e-102.7224617687349e-100.999999999863877
923.1993079693106e-106.3986159386212e-100.99999999968007
932.14210455037159e-104.28420910074318e-100.99999999978579
941.65418136891604e-103.30836273783208e-100.999999999834582
958.91681395982074e-111.78336279196415e-100.999999999910832
961.54269151136039e-103.08538302272077e-100.99999999984573
973.38082332038366e-106.76164664076732e-100.999999999661918
981.77631673138627e-103.55263346277253e-100.999999999822368
999.4053294737118e-111.88106589474236e-100.999999999905947
1004.65146579061645e-119.3029315812329e-110.999999999953485
1012.37530439273108e-104.75060878546216e-100.99999999976247
1025.11688420150711e-101.02337684030142e-090.999999999488312
1037.7251670808088e-101.54503341616176e-090.999999999227483
1043.59111148419096e-097.18222296838193e-090.999999996408889
1052.86019775806195e-095.7203955161239e-090.999999997139802
1061.41182925387604e-092.82365850775207e-090.99999999858817
1078.84797008128238e-101.76959401625648e-090.999999999115203
1086.90972720016737e-101.38194544003347e-090.999999999309027
1091.78621987278277e-073.57243974556554e-070.999999821378013
1101.46934354046284e-072.93868708092569e-070.999999853065646
1111.95778297703408e-073.91556595406815e-070.999999804221702
1121.37125495969273e-072.74250991938546e-070.999999862874504
1139.1330377784455e-050.000182660755568910.999908669622215
1147.82837831146346e-050.0001565675662292690.999921716216885
1150.0001070999874000440.0002141999748000880.9998929000126
1160.0007917115286799970.001583423057359990.99920828847132
1170.003447765989776290.006895531979552580.996552234010224
1180.002665238998978080.005330477997956160.997334761001022
1190.006378087700781570.01275617540156310.993621912299218
1200.007455398802073120.01491079760414620.992544601197927
1210.07463126478737840.1492625295747570.925368735212622
1220.1496024452121920.2992048904243840.850397554787808
1230.1649175537549200.3298351075098390.83508244624508
1240.2222167271313590.4444334542627170.777783272868641
1250.1970550266309390.3941100532618780.802944973369061
1260.2021789573495940.4043579146991880.797821042650406
1270.1665275767272240.3330551534544480.833472423272776
1280.4572959777458590.9145919554917170.542704022254141
1290.4013387161843220.8026774323686440.598661283815678
1300.4275282523853500.8550565047706990.57247174761465
1310.3698192142883350.7396384285766690.630180785711665
1320.3889245752739930.7778491505479860.611075424726007
1330.3299535986833880.6599071973667770.670046401316612
1340.4590483220701480.9180966441402970.540951677929852
1350.4039487807227650.807897561445530.596051219277235
1360.4048850119758460.8097700239516920.595114988024154
1370.5751099934271710.8497800131456590.424890006572829
1380.8025130061503750.3949739876992510.197486993849625
1390.8257107442456950.3485785115086100.174289255754305
1400.7722613494738710.4554773010522580.227738650526129
1410.7227281849941980.5545436300116030.277271815005802
1420.679663323801650.64067335239670.32033667619835
1430.625970367605250.7480592647894990.374029632394750
1440.6816556724477870.6366886551044250.318344327552213
1450.6241106964662480.7517786070675040.375889303533752
1460.6214065486930980.7571869026138050.378593451306902
1470.5467890828011150.906421834397770.453210917198885
1480.4292167075617240.8584334151234480.570783292438276
1490.8257651162610470.3484697674779060.174234883738953
1500.7224484650335290.5551030699329420.277551534966471
1510.8566577455349610.2866845089300780.143342254465039


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level970.683098591549296NOK
5% type I error level1030.725352112676056NOK
10% type I error level1050.73943661971831NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/107v2p1290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/107v2p1290525413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/10cnw1290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/10cnw1290525413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/20cnw1290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/20cnw1290525413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/3tl4h1290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/3tl4h1290525413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/4tl4h1290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/4tl4h1290525413.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/63cm21290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/63cm21290525413.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/8w43n1290525413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290525408zvnwj27u3fa26di/8w43n1290525413.ps (open in new window)


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