Home » date » 2009 » Dec » 12 »

cs.shw.paper.multipleregression

*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: Sat, 12 Dec 2009 08:32:59 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7.htm/, Retrieved Sat, 12 Dec 2009 16:34:47 +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/2009/Dec/12/t1260632074o50agas3tkeh7s7.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
2430,47 1213,8 2516,3 1245,6 2633,63 1306,3 2799,84 1255,8 3001,93 1257,6 3229,29 1287,8 3173,02 1300,4 3322,08 1320,9 3417,88 1370,8 3486,95 1327,3 3016,22 1320 2709,61 1345,3 2914,87 1346,7 3203,08 1395,4 3320,25 1462 3446,25 1491,6 3456,85 1461,8 3566,53 1477,9 3763,67 1490,3 3607,75 1521,1 3747,38 1561,9 3623,91 1552,6 3699,76 1523,6 3629,61 1548,3 3911,52 1552,4 4281,47 1587 4742,42 1621,3 4522,42 1648,7 4879,79 1641,8 5059,11 1650,6 5093,19 1688,6 4941,81 1670,7 4832,67 1682,2 4876,18 1678,9 5018,07 1650,6 4780,34 1662,4 4953,59 1664,5 4622,32 1683,2 4557,13 1736,2 4560,03 1747,6 4105,66 1749 4004,89 1759,7 4277,26 1793,6 4245,98 1817,4 4057,64 1858,4 3931,42 1839,9 3637,15 1809,1 3339,91 1877,7 3465,74 1880,3 3571,25 1930,9 3706,93 2039,3 3584,17 1992,7 3552,11 1987,8 3695,24 1984,4 3510 2016,5 3357,7 2016,7 3060,91 2064,1 2736,98 2031,5 2709,45 2000,3 2314,96 2057,8 2561,29 2041,2 2663,49 2093,2 2407,87 2158,3 2237,74 2128,8 2165,44 2131, 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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
x(t)[t] = + 3393.98713673818 -0.320686134331667`y(t)`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3393.98713673818243.73020113.925200
`y(t)`-0.3206861343316670.072845-4.40232.1e-051e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.345471020666261
R-squared0.119350226120188
Adjusted R-squared0.113191836093056
F-TEST (value)19.3801018763631
F-TEST (DF numerator)1
F-TEST (DF denominator)143
p-value2.08300010995366e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation668.425799998675
Sum Squared Residuals63891406.1648533


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11213.82614.56910782909-1400.76910782909
21245.62587.04461691941-1341.44461691941
31306.32549.41851277827-1243.11851277827
41255.82496.11727039100-1240.31727039100
51257.62431.30980950392-1173.70980950392
61287.82358.39861000227-1070.59861000227
71300.42376.44361878111-1076.04361878111
81320.92328.64214359763-1007.74214359763
91370.82297.92041192866-927.120411928661
101327.32275.77062063037-948.470620630373
1113202426.72720464432-1106.72720464432
121345.32525.05278029175-1179.75278029175
131346.72459.22874435883-1112.52874435883
141395.42366.8037935831-971.403793583103
1514622329.22899922346-867.228999223461
161491.62288.82254629767-797.222546297671
171461.82285.42327327376-823.623273273756
181477.92250.25041806026-772.350418060258
191490.32187.03035353811-696.730353538114
201521.12237.03173560311-715.931735603107
211561.92192.25433066638-630.354330666376
221552.62231.84944767231-679.249447672307
231523.62207.52540438325-683.92540438325
241548.32230.02153670662-681.721536706617
251552.42139.61690857718-587.216908577177
2615872020.97907318118-433.979073181176
271621.31873.15879956099-251.858799560995
281648.71943.70974911396-295.009749113961
291641.81829.10614528785-187.306145287854
301650.61771.6007076795-121.000707679499
311688.61760.67172422148-72.071724221476
321670.71809.21719123660-138.517191236603
331682.21844.21687593756-162.016875937562
341678.91830.26382223279-151.363822232791
351650.61784.76166663247-134.161666632471
361662.41860.99838134714-198.598381347138
371664.51805.43950857418-140.939508574176
381683.21911.67320429423-228.473204294228
391736.21932.57873339131-196.378733391309
401747.61931.64874360175-184.048743601747
4117492077.35890245803-328.358902458027
421759.72109.67444421463-349.974444214629
431793.62022.32916180671-228.729161806713
441817.42032.36022408861-214.960224088607
451858.42092.75825062863-234.358250628633
461839.92133.23525450398-293.335254503976
471809.12227.60356325376-418.503563253756
481877.72322.9243098225-445.224309822501
491880.32282.57237353955-402.272373539547
501930.92248.73677950621-317.836779506213
512039.32205.22608480009-165.926084800092
521992.72244.59351465065-251.893514650648
531987.82254.87471211732-267.074712117321
541984.42208.97490571043-224.574905710430
552016.52268.37880523403-251.878805234028
562016.72317.21930349274-300.519303492741
572064.12412.39574130104-348.295741301036
582031.52516.27560079509-484.775600795093
592000.32525.10409007324-524.804090073244
602057.82651.61156320574-593.811563205743
612041.22572.61694773582-531.416947735823
622093.22539.84282480713-446.642824807127
632158.32621.81661446499-463.516614464988
642128.82676.37494649883-547.574946498834
652131.92699.56055401101-567.660554011014
662170.32720.90221625079-550.602216250786
672190.82650.46350684484-459.663506844835
682217.72651.44159955455-433.741599554547
692254.42625.7931225307-371.3931225307
702223.32600.58719237223-377.287192372231
712210.52598.82341863341-388.323418633407
722250.82628.53498897924-377.734988979236
732249.12580.1370375859-331.037037585901
742288.62570.74414071133-282.144140711326
752329.22540.84336554624-211.643365546242
762313.82529.32752646239-215.527526462391
772309.82512.58129652759-202.781296527592
782345.92539.89734144996-193.997341449963
792361.32525.66849766967-164.368497669667
8023722537.9603971986-165.9603971986
812410.42532.08542721764-121.685427217644
822398.52544.09191608702-145.591916087022
832362.32553.77984420518-191.479844205181
842419.12538.24580785816-119.145807858155
852421.62530.68082194927-109.080821949271
8624652516.05432736240-51.0543273624039
872480.52504.1568717787-23.6568717786991
882506.12489.9119936916916.1880063083135
892506.62466.3832520157740.2167479842279
902525.82474.8750208528750.9249791471256
9125502490.4828150108059.5171849892032
922578.32452.85350400832125.446495991681
932807.82420.2108623947387.589137605302
942815.32387.19301800391428.10698199609
952767.72395.27110172772372.428898272275
962815.42348.13344684231467.266553157687
972838.82367.21747869639471.58252130361
9828642347.09763062842516.902369371578
992948.62319.97720424799628.622795752007
1002922.82288.84820118842633.951798811582
1012917.22281.37300739715635.826992602853
1022936.82269.29917443956667.500825560441
1032993.42259.97682851454733.423171485462
1043007.82316.78637721139691.013622788608
1053046.32310.43679175163735.863208248375
1063011.52287.89255650811723.60744349189
1072958.62264.24516096249694.354839037508
1083019.82255.21784628106764.582153718944
1092998.52217.34160695514781.158393044857
1103040.42238.87568087551801.524319124486
11131662208.33994716445957.660052835547
11231102187.91865413021922.081345869788
1133099.22218.64679952187880.553200478127
1143150.32204.62640172889945.673598271108
1153163.62156.712686398401006.88731360160
1163182.62132.677260630241049.92273936976
1173244.42128.245378253781116.15462174622
1183223.22177.210944104881045.98905589512
1193143.62186.42425674423957.175743255773
12032172168.860277166881048.13972283312
1213182.32148.083022523531034.21697747647
1223217.22190.557901015761026.64209898424
1233262.52212.646761948531049.85323805147
1243227.92354.72354690283873.176453097171
1253171.62371.37677785867800.223222141328
12632192426.16279704789792.837202952106
1273195.42355.86198267971839.538017320294
1283221.62373.39389364362848.206106356381
1293262.12461.93854219394800.161457806065
1303179.52469.97814358163709.52185641837
1313133.62458.98181603540674.618183964603
1323219.22548.93748357677670.262516423227
13332452646.3298625733598.6701374267
1343265.32701.61294527074563.687054729264
1353312.52731.62275372149580.877246278506
1363383.62757.91260301400625.687396985996
1373386.32826.24119765605560.058802343948
1383411.12811.62432365321599.475676346785
1393467.22743.96596303192723.23403696808
1403487.72712.59003164891775.10996835109
1413575.52721.09783479273854.402165207272
1423571.52659.17013539194912.32986460806
1433582.32623.83693711128958.463062888723
1443637.12607.058638563041030.04136143696
14536852621.284275482001063.71572451800


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.000257303568039410.000514607136078820.99974269643196
61.24915824225179e-052.49831648450358e-050.999987508417578
76.33444809067848e-071.26688961813570e-060.99999936655519
83.40605276110422e-086.81210552220843e-080.999999965939472
95.8809910282726e-091.17619820565452e-080.99999999411901
103.06540670146565e-106.1308134029313e-100.99999999969346
112.53845731115398e-115.07691462230795e-110.999999999974615
122.35196063901642e-114.70392127803285e-110.99999999997648
134.68724463319644e-129.37448926639288e-120.999999999995313
141.84561219447523e-123.69122438895046e-120.999999999998154
153.48408004309138e-126.96816008618276e-120.999999999996516
163.01035221966244e-126.02070443932487e-120.99999999999699
176.77696283037e-131.35539256607400e-120.999999999999322
181.25171829932686e-132.50343659865373e-130.999999999999875
191.60092431110596e-143.20184862221191e-140.999999999999984
204.52014222256845e-159.0402844451369e-150.999999999999996
211.29195856483808e-152.58391712967616e-150.999999999999999
224.29573211095298e-168.59146422190595e-161
236.50090879103388e-171.30018175820678e-161
241.62692371029784e-173.25384742059569e-171
252.10334068272262e-184.20668136544525e-181
263.26067156082248e-196.52134312164496e-191
271.11052697145758e-192.22105394291517e-191
281.30403617118243e-202.60807234236485e-201
292.99922883491230e-215.99845766982461e-211
307.78857743064804e-221.55771548612961e-211
311.02169623883964e-222.04339247767928e-221
321.22983578458375e-232.45967156916751e-231
331.43374844161615e-242.8674968832323e-241
341.63225894849174e-253.26451789698349e-251
352.75373341821379e-265.50746683642758e-261
363.30299201065432e-276.60598402130864e-271
374.24923756985437e-288.49847513970874e-281
388.54496078034033e-291.70899215606807e-281
398.181852434768e-291.6363704869536e-281
408.66943087118318e-291.73388617423664e-281
411.66670730402225e-273.33341460804449e-271
423.79600318023699e-267.59200636047399e-261
432.03552408962039e-254.07104817924077e-251
441.58891537437172e-243.17783074874344e-241
456.18158694957136e-231.23631738991427e-221
461.16672039763891e-212.33344079527781e-211
472.23265135398511e-204.46530270797022e-201
482.98778961900883e-185.97557923801766e-181
497.63784874933946e-171.52756974986789e-161
501.61085373173482e-153.22170746346965e-150.999999999999998
515.790374204176e-141.1580748408352e-130.999999999999942
527.72930290411725e-131.54586058082345e-120.999999999999227
537.05582278391672e-121.41116455678334e-110.999999999992944
544.13896200428869e-118.27792400857737e-110.99999999995861
553.16722399396553e-106.33444798793106e-100.999999999683278
562.22059209325622e-094.44118418651244e-090.999999997779408
571.96601563773828e-083.93203127547657e-080.999999980339844
581.16432286277879e-072.32864572555757e-070.999999883567714
594.43465088947712e-078.86930177895423e-070.99999955653491
601.74770806210928e-063.49541612421856e-060.999998252291938
614.91478308609973e-069.82956617219947e-060.999995085216914
621.37683131767708e-052.75366263535416e-050.999986231686823
633.78687863859841e-057.57375727719682e-050.999962131213614
647.96774173055367e-050.0001593548346110730.999920322582694
650.0001491230661768470.0002982461323536930.999850876933823
660.0002683584391730980.0005367168783461970.999731641560827
670.0004864063495775350.000972812699155070.999513593650422
680.000859947076988490.001719894153976980.999140052923011
690.001526489947668780.003052979895337550.998473510052331
700.0025926014576280.0051852029152560.997407398542372
710.004328029470897340.008656058941794670.995671970529103
720.00711919391894830.01423838783789660.992880806081052
730.01190271278995420.02380542557990830.988097287210046
740.01978482894091120.03956965788182240.980215171059089
750.0326364788492420.0652729576984840.967363521150758
760.05260280448692380.1052056089738480.947397195513076
770.08333365362986060.1666673072597210.91666634637014
780.1270485363814160.2540970727628320.872951463618584
790.1880509620685340.3761019241370680.811949037931466
800.2687403338504180.5374806677008370.731259666149582
810.3668393950457510.7336787900915030.633160604954249
820.4844020617538690.9688041235077380.515597938246131
830.6241305294174930.7517389411650150.375869470582507
840.7510883308280.4978233383440010.248911669172001
850.8599575323795990.2800849352408020.140042467620401
860.9323241578106210.1353516843787580.0676758421893788
870.9736922292062580.05261554158748440.0263077707937422
880.991930739861220.01613852027756080.00806926013878042
890.9982493357159490.003501328568102910.00175066428405145
900.9997599653046520.0004800693906950390.000240034695347519
910.999982717889313.45642213789657e-051.72821106894828e-05
920.9999992816285291.43674294266677e-067.18371471333387e-07
930.9999998914425912.17114817164660e-071.08557408582330e-07
940.9999999828804823.4239035138495e-081.71195175692475e-08
950.999999998534282.93144045851656e-091.46572022925828e-09
960.999999999809643.80719795278956e-101.90359897639478e-10
970.9999999999773534.52940037771534e-112.26470018885767e-11
980.9999999999967466.50883527428368e-123.25441763714184e-12
990.9999999999989332.13488744242964e-121.06744372121482e-12
1000.999999999999666.8089761184797e-133.40448805923985e-13
1010.9999999999998942.11204235072192e-131.05602117536096e-13
1020.999999999999968.14353281229227e-144.07176640614613e-14
1030.9999999999999745.25465737113448e-142.62732868556724e-14
1040.9999999999999843.11611238691446e-141.55805619345723e-14
1050.9999999999999872.63479887390193e-141.31739943695097e-14
1060.999999999999991.93550777800765e-149.67753889003823e-15
1070.9999999999999968.93295583916259e-154.46647791958129e-15
1080.9999999999999967.80764418809254e-153.90382209404627e-15
1090.9999999999999976.45722179618088e-153.22861089809044e-15
1100.9999999999999967.00368036305973e-153.50184018152987e-15
1110.9999999999999931.49132007435717e-147.45660037178586e-15
1120.9999999999999843.14501122896670e-141.57250561448335e-14
1130.9999999999999696.20924601006834e-143.10462300503417e-14
1140.9999999999999231.54867765234234e-137.7433882617117e-14
1150.9999999999997934.14166558554622e-132.07083279277311e-13
1160.9999999999994381.12325457969237e-125.61627289846187e-13
1170.9999999999987822.43583281421926e-121.21791640710963e-12
1180.9999999999966756.64960048277667e-123.32480024138833e-12
1190.99999999998942.12004947651702e-111.06002473825851e-11
1200.9999999999692566.14877878155799e-113.07438939077899e-11
1210.9999999999033351.93329587922834e-109.66647939614172e-11
1220.9999999997137135.72574791404592e-102.86287395702296e-10
1230.9999999993495791.30084313304240e-096.50421566521201e-10
1240.999999997723714.55257871244986e-092.27628935622493e-09
1250.999999992063441.58731192460118e-087.93655962300588e-09
1260.9999999722985275.54029460919337e-082.77014730459669e-08
1270.9999999019862011.96027597644302e-079.8013798822151e-08
1280.99999965512386.89752398817254e-073.44876199408627e-07
1290.999998817441322.36511735846387e-061.18255867923193e-06
1300.9999970469537375.90609252502384e-062.95304626251192e-06
1310.9999973410825185.3178349647797e-062.65891748238985e-06
1320.9999989746061622.05078767627521e-061.02539383813761e-06
1330.9999997568802394.86239522588166e-072.43119761294083e-07
1340.9999999554128358.91743293686793e-084.45871646843396e-08
1350.9999999917353661.65292673096122e-088.2646336548061e-09
1360.9999999774544854.50910297964555e-082.25455148982277e-08
1370.9999996309675037.38064993856182e-073.69032496928091e-07
1380.9999942761467621.14477064751576e-055.72385323757881e-06
1390.999928411677970.0001431766440582167.15883220291079e-05
1400.999515803010890.0009683939782175160.000484196989108758


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1190.875NOK
5% type I error level1230.904411764705882NOK
10% type I error level1250.919117647058823NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/10imlm1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/10imlm1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/1m66u1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/1m66u1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/2fcje1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/2fcje1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/3ttan1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/3ttan1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/4b89n1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/4b89n1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/5ekuh1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/5ekuh1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/6uz681260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/6uz681260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/7182c1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/7182c1260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/888u81260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/888u81260631971.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/9dfbd1260631971.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260632074o50agas3tkeh7s7/9dfbd1260631971.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