Home » date » 2010 » Nov » 23 »

Workshop 7 - regression model

*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 09:58:23 +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/t12905062647mfzrimp07s4i6m.htm/, Retrieved Tue, 23 Nov 2010 10:57:55 +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/t12905062647mfzrimp07s4i6m.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 «
24 3 4 4 4 3 2 4 25 4 4 4 3 2 4 4 30 4 5 5 4 4 4 4 19 2 2 3 4 2 3 3 22 2 2 4 4 4 4 2 22 3 4 3 4 2 2 4 25 2 4 4 4 3 4 4 23 3 4 3 4 4 2 3 17 3 4 2 2 1 3 2 21 3 2 4 4 2 3 3 19 3 3 2 3 2 3 3 19 4 4 2 2 2 3 2 15 2 3 2 2 2 2 2 16 2 4 1 3 1 3 2 23 1 4 4 4 2 4 4 27 1 4 4 5 4 5 4 22 3 4 2 4 2 4 3 14 2 2 2 2 2 2 2 22 2 4 3 4 3 3 3 23 3 4 3 3 2 4 4 23 4 4 3 4 3 2 3 21 4 3 4 2 2 3 3 19 3 2 3 2 3 2 4 18 2 4 2 4 2 2 2 20 3 2 2 4 3 2 4 23 4 3 4 4 3 3 2 25 3 4 4 4 4 3 3 19 2 3 3 3 2 3 3 24 1 4 4 4 4 3 4 22 3 4 2 5 3 3 2 25 2 4 4 4 4 3 4 26 4 4 4 4 3 3 4 29 4 4 5 4 4 4 4 32 5 4 5 4 4 5 5 25 2 4 4 4 3 4 4 29 4 5 4 4 5 4 3 28 4 4 4 4 4 4 4 17 2 2 2 4 2 3 2 28 4 4 4 4 4 4 4 29 4 4 4 5 4 4 4 26 2 5 4 4 5 2 4 25 3 4 3 4 4 4 3 14 2 2 2 2 2 2 2 25 4 4 3 4 4 3 3 26 3 4 4 4 4 3 4 20 1 4 3 4 1 4 3 18 2 2 2 4 2 2 4 32 5 5 4 4 5 4 5 25 2 4 4 4 4 3 4 25 4 4 3 4 2 4 4 23 4 4 4 3 3 2 3 21 2 4 3 4 4 2 2 20 2 4 4 4 2 2 2 15 2 3 2 4 1 1 2 30 4 5 4 3 4 5 5 24 3 4 4 3 2 4 4 26 4 4 4 4 4 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 time32 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Yt[t] = + 5.65277449152099e-15 + 0.999999999999998X1t[t] + 1.00000000000000X2t[t] + 1X3t[t] + 1X4t[t] + 1X5t[t] + 1X6t[t] + 1.00000000000000X7t[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.65277449152099e-1502.17140.0314740.015737
X1t0.9999999999999980229530461972672200
X2t1.000000000000000173708892548703500
X3t10168083898888042300
X4t10169059727310860700
X5t10197975307053765000
X6t10190717525801107000
X7t1.000000000000000165975030732375200


Multiple Linear Regression - Regression Statistics
Multiple R1
R-squared1
Adjusted R-squared1
F-TEST (value)1.59029440260596e+31
F-TEST (DF numerator)7
F-TEST (DF denominator)150
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.02271080728302e-15
Sum Squared Residuals3.78414357803965e-27


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.99999999999995.4679233911816e-14
22525.0000000000000-2.34466723732491e-14
330304.40060569066426e-15
41919-6.162445547409e-15
52222-6.95001114635409e-16
62222-5.18669161073777e-15
725252.07099882053762e-15
823232.12019517737531e-15
917179.6944945555234e-16
1021217.77436210298879e-16
1119194.38141436319459e-16
1219197.12315530563665e-16
131515-3.73653379795946e-16
1416161.34092654939325e-15
152323-2.95342082814583e-16
1627274.63216986012391e-16
1722226.56439306485443e-16
1814145.40082240803923e-16
192222-4.67453343341134e-16
2023232.16539268495076e-16
212323-1.16667692028670e-15
2221213.66942880131265e-16
231919-1.385016727195e-16
241818-3.62226921603343e-16
252020-3.46285400048605e-16
2623231.02214280119796e-15
272525-1.20146484791471e-15
2819198.71717219850532e-17
292424-1.75460259035751e-15
302222-4.31016926757548e-16
312525-1.04784318713914e-15
322626-7.24343648051878e-16
332929-1.35638899308394e-16
343232-2.58269908054916e-16
352525-5.28756467219368e-17
362929-1.76325283274044e-16
3728281.19194075351474e-16
3817171.32978507811277e-15
3928281.19194075351474e-16
4029291.65441480513277e-16
412626-3.12307980184998e-15
422525-2.73792413445623e-17
4314145.40082240803923e-16
442525-2.2599468222865e-16
452626-1.28477335485215e-15
4620206.458702439866e-16
471818-3.11196079984962e-16
483232-1.13498397717451e-15
492525-1.04784318713914e-15
5025258.58523774412738e-16
512323-1.60653517818652e-15
522121-7.129785620458e-16
532020-1.81558244185446e-15
541515-1.2287797014343e-15
5530301.16088935041905e-15
5624247.11106835457189e-16
572626-2.16340039831914e-15
5824242.2839261784989e-17
592222-2.04919174317775e-15
6014143.97073410775532e-16
6124246.46046537787993e-16
6224243.18297824888136e-16
6324242.2839261784989e-17
6424242.19860134884790e-16
6519194.86689791810069e-16
663131-6.27729222140305e-16
672222-3.02797614858376e-16
6827273.81947828900892e-16
691919-6.06449295311223e-16
7025253.96531757615815e-16
7120201.53178949344847e-15
722121-3.43166177506857e-16
7327273.56124243064482e-16
7423231.28192278000074e-15
752525-5.30012838651923e-16
762020-1.81558244185446e-15
772121-3.69604675937102e-16
7822224.38955063764887e-16
7923231.83467728186949e-16
802525-5.28756467219368e-17
812525-6.36044127085785e-16
8217171.32978507811277e-15
8319192.37877032938004e-15
842525-2.12177931580617e-16
8519194.38141436319459e-16
8620208.67345083381545e-16
8726262.37550122262004e-16
882323-1.61578293218882e-15
8927273.56124243064482e-16
901717-2.97452024302629e-16
9117171.07515356352717e-15
921919-1.06275845822984e-15
931717-6.36140748408697e-16
942222-4.67453343341134e-16
952121-1.88098814184504e-15
963232-1.25099729366568e-15
972121-3.69604675937102e-16
9821219.52989789784179e-16
991818-6.89940385366812e-16
1001818-1.56503167576656e-16
10123238.71717219850532e-17
1021919-6.03477925834168e-17
1032020-3.43166177506857e-16
1042121-2.7137233371064e-16
10520203.8740123706713e-16
10617177.81102892466329e-16
1071818-1.26529090409144e-15
1081919-2.01221420158322e-15
1092222-1.85204654553362e-16
1101515-8.58368178089289e-16
1111414-8.85982709039911e-16
1121818-4.17320388550468e-16
1132424-9.23917275843618e-16
11435357.46141745770695e-17
1152929-1.09847858098335e-15
1162121-2.3705594404562e-15
1172525-1.48475568927335e-15
11820201.39860867927233e-15
11922221.35597572495392e-15
12013131.61876993845633e-16
1212626-5.5871432562863e-16
12217171.07722196656207e-15
12325252.49679571505464e-16
12420201.87412014690547e-15
12519198.10163784511347e-16
1262121-9.31659726921099e-16
1272222-4.61856279439127e-16
1282424-1.19432992028941e-15
1292121-1.28477335485215e-15
1302626-1.36401985913911e-16
1312424-1.70001156246394e-15
1321616-7.13551212464841e-16
1332323-1.27755875474837e-15
13418182.85632355932166e-16
1351616-1.28477335485215e-15
13626261.97255783690882e-15
13719198.14333699301813e-16
1382121-7.16017700782112e-16
13921218.88336680079244e-16
14022221.6803345918565e-15
1412323-2.67185608551446e-16
1422929-3.33351947284590e-16
1432121-1.72572187981651e-15
1442121-1.14348170687555e-15
14523232.58013733520171e-16
1462727-6.81721525080088e-16
1472525-5.30455275752571e-16
1482121-7.36848301521211e-16
1491010-6.14042652104326e-16
15020201.22726050535130e-15
1512626-2.1283110782555e-15
1522424-1.33027470068247e-15
15329293.40334549005982e-16
15419192.18554800890698e-15
1552424-1.17441156338223e-15
1561919-1.05042300688226e-15
15724247.70453382242686e-17
15822224.12462447823937e-16
15917NANA


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.1987272938695510.3974545877391020.80127270613045
120.0004904914751119960.0009809829502239910.999509508524888
131.94688890818687e-063.89377781637374e-060.999998053111092
140.05768266275885370.1153653255177070.942317337241146
150.0001329720446986310.0002659440893972620.999867027955301
162.70906270740679e-085.41812541481358e-080.999999972909373
177.82291503356155e-131.56458300671231e-120.999999999999218
185.43588848424815e-111.08717769684963e-100.99999999994564
194.86549774806163e-089.73099549612327e-080.999999951345023
202.26872957874386e-114.53745915748772e-110.999999999977313
211.21659006195967e-072.43318012391935e-070.999999878340994
224.71127242425764e-099.42254484851528e-090.999999995288728
230.921418889391870.1571622212162600.0785811106081302
248.15931656494636e-061.63186331298927e-050.999991840683435
252.33936528157533e-074.67873056315065e-070.999999766063472
260.0001306949769049840.0002613899538099670.999869305023095
270.6877790478898010.6244419042203980.312220952110199
284.7555550200333e-179.5111100400666e-171
290.9969439099813710.006112180037257170.00305609001862858
301.18640835779094e-062.37281671558188e-060.999998813591642
310.00237979369601840.00475958739203680.997620206303982
3212.17032219948718e-361.08516109974359e-36
331.21346827995270e-052.42693655990539e-050.9999878653172
340.007225371888355830.01445074377671170.992774628111644
350.00102543750612230.00205087501224460.998974562493878
363.47798144082734e-246.95596288165467e-241
373.56528677374145e-157.1305735474829e-150.999999999999996
383.48854217370139e-216.97708434740277e-211
397.6418565557708e-201.52837131115416e-191
400.9958179635973230.008364072805353620.00418203640267681
410.1267715232698210.2535430465396430.873228476730179
420.8615209412810040.2769581174379910.138479058718996
431.52260053609570e-063.04520107219141e-060.999998477399464
440.4882630592510340.9765261185020680.511736940748966
456.05105651649973e-151.21021130329995e-140.999999999999994
460.001442731430769620.002885462861539250.99855726856923
475.910425385906e-171.1820850771812e-161
484.26411668105976e-238.52823336211952e-231
491.95143593707703e-213.90287187415406e-211
500.939778429869390.1204431402612190.0602215701306094
510.9994307943487920.001138411302416210.000569205651208105
520.01121496237935940.02242992475871890.98878503762064
532.03010174963882e-064.06020349927764e-060.99999796989825
542.05309699349572e-464.10619398699143e-461
5517.14505104207465e-173.57252552103733e-17
560.03094158357245050.06188316714490090.96905841642755
5711.00327916640463e-325.01639583202317e-33
585.45616859408648e-211.09123371881730e-201
590.9999263071983450.0001473856033101797.36928016550894e-05
600.7782531458391550.443493708321690.221746854160845
6116.57638899936315e-333.28819449968158e-33
621.73056098794098e-063.46112197588196e-060.999998269439012
632.48310030101095e-364.9662006020219e-361
642.15316826675274e-174.30633653350548e-171
650.9137406115740310.1725187768519380.0862593884259692
6611.19301945875477e-365.96509729377384e-37
670.9978002077108830.004399584578234120.00219979228911706
6812.65526352413373e-381.32763176206687e-38
691.59887962088185e-193.1977592417637e-191
700.2965202508520070.5930405017040130.703479749147993
710.1466240268863720.2932480537727440.853375973113628
7211.17993338638020e-695.89966693190098e-70
734.72341726308488e-459.44683452616976e-451
744.01124780059783e-138.02249560119567e-130.9999999999996
752.73421917446137e-235.46843834892273e-231
763.0629804335193e-156.1259608670386e-150.999999999999997
771.05803165581653e-442.11606331163306e-441
780.9999999999992361.52730932080693e-127.63654660403465e-13
791.49191426289055e-372.98382852578111e-371
803.90789497978888e-077.81578995957775e-070.999999609210502
8111.99430642065003e-959.97153210325013e-96
820.9999999899175562.01648890094061e-081.00824445047030e-08
831.40309893562625e-332.80619787125249e-331
8412.96674520049018e-161.48337260024509e-16
850.9999999985968662.80626892269445e-091.40313446134722e-09
860.9998946434189620.0002107131620764710.000105356581038236
8715.46741031049254e-292.73370515524627e-29
883.15633442070998e-056.31266884141996e-050.999968436655793
890.01569737042228200.03139474084456400.984302629577718
903.37200759402839e-086.74401518805677e-080.999999966279924
9116.01706842051864e-253.00853421025932e-25
920.9994481054152940.001103789169412530.000551894584706264
930.9999999999770554.58900846909031e-112.29450423454516e-11
940.999999999871452.57098416524765e-101.28549208262382e-10
950.9999974815841175.03683176636401e-062.51841588318200e-06
960.9999999999896582.06845786084223e-111.03422893042111e-11
970.000972018026174770.001944036052349540.999027981973825
9817.49059524779674e-383.74529762389837e-38
992.53653331870966e-075.07306663741932e-070.999999746346668
10018.49598251502897e-564.24799125751449e-56
1010.9999999852902392.941952254783e-081.4709761273915e-08
10219.7653925436888e-184.8826962718444e-18
1031.37044041150991e-172.74088082301982e-171
10417.1771670206962e-453.5885835103481e-45
10511.31631077905512e-156.58155389527561e-16
1061.08318025860870e-162.16636051721740e-161
1070.9974582722385970.005083455522806530.00254172776140327
1080.000793517663755890.001587035327511780.999206482336244
10918.95310763600885e-184.47655381800442e-18
1105.3106178648092e-301.06212357296184e-291
11111.28390320646231e-186.41951603231153e-19
11211.10400558791487e-185.52002793957433e-19
11316.21493048831439e-173.10746524415720e-17
1141.72747190175854e-183.45494380351709e-181
1155.42040149392627e-411.08408029878525e-401
1160.9489738075996950.1020523848006090.0510261924003046
1170.002823153107695630.005646306215391250.997176846892304
1180.1283674959503300.2567349919006600.87163250404967
1190.9999999999093061.81387424317920e-109.06937121589602e-11
1200.6160049026197150.767990194760570.383995097380285
12113.81318743666095e-291.90659371833048e-29
12213.27713339019568e-271.63856669509784e-27
1230.9999102436018120.0001795127963761298.97563981880647e-05
1240.999855915760060.0002881684798776990.000144084239938849
1250.9999983336929693.33261406264709e-061.66630703132354e-06
12614.92231723801526e-292.46115861900763e-29
1270.999999999991131.77414281440152e-118.87071407200762e-12
12811.0641748143815e-235.3208740719075e-24
1290.9933193383738640.01336132325227210.00668066162613604
1300.9999998473256283.05348744952807e-071.52674372476404e-07
1311.78194535966749e-053.56389071933499e-050.999982180546403
1320.7654052817593430.4691894364813150.234594718240657
1330.9999999998656712.68658115532553e-101.34329057766277e-10
13417.30904477198118e-163.65452238599059e-16
1350.9999999316168541.36766292885816e-076.8383146442908e-08
1360.999999871224092.57551820504207e-071.28775910252103e-07
1370.9999997624581794.75083642392734e-072.37541821196367e-07
13811.68954833573697e-188.44774167868483e-19
1390.9999999999999823.64195639708312e-141.82097819854156e-14
1400.9999999612541387.74917233687675e-083.87458616843838e-08
1410.9999999972574555.48508918887605e-092.74254459443803e-09
1420.99999999715935.68139785080545e-092.84069892540273e-09
1430.9999999998872722.25456084643568e-101.12728042321784e-10
1440.8666270651862770.2667458696274450.133372934813723
1450.9996205451412250.000758909717549790.000379454858774895
1460.9999999366966891.26606622515509e-076.33033112577543e-08
1470.9967429318653870.006514136269225470.00325706813461274
1480.3827861926827660.7655723853655330.617213807317234


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1150.833333333333333NOK
5% type I error level1190.86231884057971NOK
10% type I error level1200.869565217391304NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/10j7521290506270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/10j7521290506270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/1u6q81290506270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/1u6q81290506270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/2ngqb1290506270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/2ngqb1290506270.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/6g77d1290506270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/6g77d1290506270.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/9ry6h1290506270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905062647mfzrimp07s4i6m/9ry6h1290506270.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; 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