Home » date » 2009 » Nov » 20 »

workshop 7

*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: Fri, 20 Nov 2009 06:56:36 -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/Nov/20/t12587254534kiqlvup0iz641j.htm/, Retrieved Fri, 20 Nov 2009 14:57:46 +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/Nov/20/t12587254534kiqlvup0iz641j.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 «
6.9 2.28 6.8 2.26 6.7 2.71 6.6 2.77 6.5 2.77 6.5 2.64 7.0 2.56 7.5 2.07 7.6 2.32 7.6 2.16 7.6 2.23 7.8 2.40 8.0 2.84 8.0 2.77 8.0 2.93 7.9 2.91 7.9 2.69 8.0 2.38 8.5 2.58 9.2 3.19 9.4 2.82 9.5 2.72 9.5 2.53 9.6 2.70 9.7 2.42 9.7 2.50 9.6 2.31 9.5 2.41 9.4 2.56 9.3 2.76 9.6 2.71 10.2 2.44 10.2 2.46 10.1 2.12 9.9 1.99 9.8 1.86 9.8 1.88 9.7 1.82 9.5 1.74 9.3 1.71 9.1 1.38 9.0 1.27 9.5 1.19 10.0 1.28 10.2 1.19 10.1 1.22 10.0 1.47 9.9 1.46 10.0 1.96 9.9 1.88 9.7 2.03 9.5 2.04 9.2 1.90 9.0 1.80 9.3 1.92 9.8 1.92 9.8 1.97 9.6 2.46 9.4 2.36 9.3 2.53 9.2 2.31 9.2 1.98 9.0 1.46 8.8 1.26 8.7 1.58 8.7 1.74 9.1 1.89 9.7 1.85 9.8 1.62 9.6 1.30 9.4 1.42 9.4 1.15 9.5 0.42 9.4 0.74 9.3 1.02 9.2 1.51 9.0 1.86 8.9 1.59 9.2 1.03 9.8 0.44 9.9 0.82 9.6 0.86 9.2 0.58 9.1 0.59 9.1 0.95 9.0 0.98 8.9 1.23 8.7 1.17 8.5 0.84 8.3 0.74 8.5 0.65 8.7 0.91 8.4 1.19 8.1 1.30 7.8 1.53 7.7 1.94 7.5 1.79 7.2 1.95 6.8 2.26 6.7 2.04 6.4 2.16 6.3 2. 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 time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 10.1924266397789 -0.529300900085433X[t] -0.0745355431955221M1[t] -0.152394972116518M2[t] -0.292295981835693M3[t] -0.443765988554583M4[t] -0.610056420475866M5[t] -0.713284481199883M6[t] -0.221024193589143M7[t] + 0.151941828555044M8[t] + 0.203849248899061M9[t] + 0.108661512507523M10[t] -0.0302565182136459M11[t] -0.00633716687860314t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)10.19242663977890.3569728.552600
X-0.5293009000854330.107545-4.92172e-061e-06
M1-0.07453554319552210.351679-0.21190.8324120.416206
M2-0.1523949721165180.351625-0.43340.6652860.332643
M3-0.2922959818356930.351607-0.83130.406990.203495
M4-0.4437659885545830.351626-1.2620.2087050.104352
M5-0.6100564204758660.351592-1.73510.0845740.042287
M6-0.7132844811998830.351489-2.02930.0440230.022011
M7-0.2210241935891430.351439-0.62890.5302710.265136
M80.1519418285550440.3514010.43240.666020.33301
M90.2038492488990610.3513720.58020.5625990.281299
M100.1086615125075230.3513650.30930.7575150.378757
M11-0.03025651821364590.351354-0.08610.9314790.46574
t-0.006337166878603140.001387-4.56871e-055e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.509219366095136
R-squared0.259304362806332
Adjusted R-squared0.201298077965864
F-TEST (value)4.47028047942537
F-TEST (DF numerator)13
F-TEST (DF denominator)166
p-value1.69466380439687e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.96219474589104
Sum Squared Residuals153.685909017374


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.98.90474787751007-2.00474787751007
26.88.83113729971214-2.03113729971214
36.78.44671371807591-1.74671371807591
46.68.25714849047329-1.65714849047329
56.58.0845208916734-1.58452089167340
66.58.04376478108189-1.54376478108189
778.57203197382086-1.57203197382086
87.59.19801827012831-1.69801827012831
97.69.11126329857236-1.51126329857236
107.69.09442653931589-1.49442653931589
117.68.91212027871014-1.31212027871014
127.88.84605847703066-1.04605847703066
1388.53229337091894-0.532293370918943
1488.48514783812533-0.485147838125327
1588.25422151751388-0.254221517513876
167.98.10700036191809-0.207000361918091
177.98.050818961137-0.150818961137000
1888.10533701256086-0.105337012560865
198.58.485399953275910.0146000467240849
209.28.529155259489390.670844740510614
219.48.770566845986410.629433154013591
229.58.721972032724810.778027967275188
239.58.677284006141270.822715993858728
249.68.611222204461790.98877779553821
259.78.678553746411591.02144625358841
269.78.552013078605151.14798692139485
279.68.50634207302361.09365792697639
289.58.295604809417571.20439519058243
299.48.043582075604871.35641792439513
309.37.828156667985161.47184333201484
319.68.340544833721571.25945516627843
3210.28.850084932010221.34991506798978
3310.28.885069167473931.31493083252607
3410.18.963506570232831.13649342976717
359.98.887060489644171.01293951035583
369.88.979788957990320.820211042009683
379.88.888330229914480.911669770085518
389.78.835891688120.86410831187999
399.58.731997583529070.768002416470934
409.38.590069436934130.709930563065865
419.18.592111135162440.507888864837557
4298.540769006569220.45923099343078
439.59.069036199308190.430963800691808
44109.38802797356610.611972026433913
4510.29.48123530803920.718764691960809
4610.19.363831377766490.736168622233514
47109.086250955145350.913749044854645
489.99.115463315481250.784536684518748
49108.769940155364411.23005984463559
509.98.728087631571651.17191236842835
519.78.502454319961051.19754568003895
529.58.33935413736271.16064586263730
539.28.240828664574780.95917133542522
5498.18419352698070.815806473019297
559.38.606600539702590.693399460297413
569.88.973229394968170.826770605031828
579.88.992334603429310.807665396570687
589.68.631452259117310.96854774088269
599.48.539127151526080.860872848473918
609.38.47306534984660.8269346501534
619.28.508638837791270.691361162208729
629.28.599111539019860.600888460980135
6398.728109830466510.271890169533488
648.88.67616283688610.123837163113896
658.78.334158950058880.365841049941119
668.78.139905578442590.560094421557408
679.18.546433564161910.553566435838086
689.78.934234455430910.765765544569084
699.89.101543915915980.698456084084022
709.69.169395300673170.430604699326824
719.48.960623995063150.439376004936848
729.49.127454589421260.272545410578739
739.59.43297153640950.0670284635904984
749.49.179398652582560.220601347417436
759.38.884956223960860.415043776039136
769.28.467791609321510.73220839067849
7798.109908695491720.890091304508278
788.98.143254710912170.756745289087832
799.28.925586335692150.274413664307852
809.89.604502722008140.195497277991863
819.99.448938633441090.451061366558914
829.69.326241694167530.273758305832471
839.29.32919074859168-0.129190748591678
849.19.34781709092587-0.247817090925866
859.19.076396056820980.0236039431790155
8698.976320434018820.0236795659811778
878.98.697757032399690.202242967600314
888.78.571707912807320.128292087192681
898.58.57374961103563-0.0737496110356252
908.38.51711447344155-0.217114473441548
918.59.05067467518137-0.550674675181374
928.79.27968529642475-0.579685296424747
938.49.17705129786624-0.777051297866239
948.19.0173032955867-0.9173032955867
957.88.75030889096728-0.95030889096728
967.78.5572148732673-0.857214873267293
977.58.55573729820598-1.05573729820598
987.28.38685255839271-1.18685255839271
996.88.07653110276845-1.27653110276845
1006.78.03517012718975-1.33517012718975
1016.47.79902642037962-1.39902642037962
1026.37.37717366172659-1.07717366172659
1036.87.84192474645531-1.04192474645531
1047.38.1609165207132-0.860916520713206
1057.17.95242234213761-0.852422342137612
10678.05732478990079-1.05732478990079
1076.87.84326047528991-1.04326047528991
1086.68.19005337567707-1.59005337567707
1096.38.26267792662772-1.96267792662772
1106.18.15201628582385-2.05201628582385
1116.18.09046625323974-1.99046625323974
1126.37.56214844958244-1.26214844958244
1136.37.20426553575265-0.904265535752654
11467.20585349716798-1.20585349716798
1156.27.83998086992403-1.63998086992403
1166.48.19602370718791-1.79602370718791
1176.88.45860732968835-1.65860732968835
1187.58.30944534541052-0.80944534541052
1197.58.28063634582954-0.780636345829543
1207.68.27809065216031-0.678090652160314
1217.67.81612129402468-0.216121294024677
1227.47.87483594124815-0.474835941248144
1237.37.70742572864695-0.40742572864695
1247.18.00481732912293-0.904817329122929
1256.98.08625416236405-1.18625416236405
1266.88.21487433979988-1.41487433979988
1277.58.48907710049784-0.989077100497838
1287.68.86629197376513-1.26629197376513
1297.88.91186222723054-1.11186222723055
13088.79445829695784-0.794458296957842
1318.18.7497702703743-0.649770270374302
1328.28.63077837868628-0.430778378686278
1338.38.63459381262582-0.33459381262582
1348.28.26986773978094-0.069867739780943
13588.11304354518146-0.113043545181456
1367.98.10344062360788-0.203440623607883
1377.68.16370542084559-0.563705420845588
1387.67.74714567119342-0.147145671193417
1398.38.30187790893666-0.00187790893665934
1408.48.50971649417662-0.109716494176614
1418.48.54999373864117-0.149993738641174
1428.48.56491503338983-0.164915033389828
1438.48.271455583766140.128544416233866
1448.68.358891043111430.241108956888570
1458.98.357413468050120.542586531949882
1468.88.447886169278710.352113830721288
1478.38.37045710969204-0.0704571096920402
1487.57.79450222502706-0.294502225027055
1497.27.25665700516822-0.0566570051682201
1507.47.33234709259550.0676529074044981
1518.87.738875078314821.06112492168518
1529.38.184899068593221.11510093140678
1539.38.352208529078290.947791470921714
1548.77.811363878737240.888636121262764
1558.27.830191960163950.369808039836051
1568.38.002315563522910.297684436477089
1578.57.926735862449640.573264137550359
1588.67.678455987623560.921544012376442
1598.57.267567360983061.23243263901694
1608.27.273843466412050.926156533587945
1618.17.233541092633530.866458907366473
1627.96.933427541000150.96657245899985
1638.67.276439418709221.32356058129078
1648.77.658947300977371.04105269902263
1658.77.678052509438511.02194749056149
1668.57.941745227227320.558254772772683
1678.47.7435599396190.656440060380998
1688.57.59810300292670.901896997073294
1698.77.65484852687481.04515147312521
1708.77.702977156096550.997022843903447
1718.67.921956600557720.678043399442277
1728.57.621238183937160.878761816062838
1738.37.326871378117630.973128621882374
17487.386682438542350.613317561457654
1758.28.015516802297550.18448319770245
1768.18.36626663056057-0.266266630560571
1778.18.62885025306101-0.528850253061013
17888.53261835879172-0.532618358791725
1797.98.23915890916803-0.339158909168032
1807.98.18368312549026-0.283683125490259


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
173.58770505602729e-057.17541011205459e-050.99996412294944
189.68040658815184e-071.93608131763037e-060.999999031959341
199.56176480925752e-071.91235296185150e-060.99999904382352
200.0001095118728844830.0002190237457689650.999890488127116
218.03770335346255e-050.0001607540670692510.999919622966465
225.85043133439328e-050.0001170086266878660.999941495686656
233.64563606760843e-057.29127213521686e-050.999963543639324
241.29613160842164e-052.59226321684328e-050.999987038683916
252.89121739568935e-065.78243479137869e-060.999997108782604
266.31090861442762e-071.26218172288552e-060.999999368909139
271.32526107355518e-072.65052214711035e-070.999999867473893
282.66492513926113e-085.32985027852227e-080.999999973350749
295.37702444247734e-091.07540488849547e-080.999999994622976
301.91603296836497e-093.83206593672994e-090.999999998083967
311.83825372805512e-093.67650745611025e-090.999999998161746
321.06003236228473e-092.12006472456946e-090.999999998939968
331.2880174001719e-092.5760348003438e-090.999999998711983
342.07754885372836e-094.15509770745673e-090.999999997922451
355.69951654562223e-091.13990330912445e-080.999999994300483
361.47282443944703e-082.94564887889406e-080.999999985271756
374.77954560682425e-089.5590912136485e-080.999999952204544
387.00640869837282e-081.40128173967456e-070.999999929935913
395.67945397821156e-081.13589079564231e-070.99999994320546
403.78144106377944e-087.56288212755888e-080.99999996218559
411.57124658892956e-083.14249317785912e-080.999999984287534
426.66111671499001e-091.33222334299800e-080.999999993338883
432.24786679980756e-094.49573359961512e-090.999999997752133
449.86896207590831e-101.97379241518166e-090.999999999013104
453.49107392064177e-106.98214784128354e-100.999999999650893
462.13803343435628e-104.27606686871257e-100.999999999786197
474.98707268975733e-109.97414537951466e-100.999999999501293
481.21895691412810e-092.43791382825621e-090.999999998781043
492.9611500593653e-085.9223001187306e-080.9999999703885
501.89419435423451e-073.78838870846901e-070.999999810580565
511.12796034184656e-062.25592068369313e-060.999998872039658
524.48071041743086e-068.96142083486172e-060.999995519289583
531.72856955070143e-053.45713910140286e-050.999982714304493
546.41699305350706e-050.0001283398610701410.999935830069465
550.0002620519057038780.0005241038114077570.999737948094296
560.0008571925713009180.001714385142601840.9991428074287
570.002689817020077360.005379634040154720.997310182979923
580.01214880635043270.02429761270086540.987851193649567
590.03135802259769210.06271604519538410.968641977402308
600.06477126052061540.1295425210412310.935228739479385
610.09943331186717310.1988666237343460.900566688132827
620.1277800717269970.2555601434539940.872219928273003
630.1521573538214810.3043147076429620.847842646178519
640.1723024731512590.3446049463025180.82769752684874
650.1930716385245120.3861432770490250.806928361475488
660.2161277181323580.4322554362647170.783872281867642
670.2397711737589460.4795423475178930.760228826241054
680.2778256899849940.5556513799699880.722174310015006
690.3146020002098160.6292040004196310.685397999790184
700.3442556948560440.6885113897120890.655744305143956
710.3858800325377580.7717600650755160.614119967462242
720.4127705374148710.8255410748297420.587229462585129
730.3934722557008610.7869445114017230.606527744299139
740.3860953683143070.7721907366286130.613904631685693
750.3940937146502300.7881874293004590.60590628534977
760.4395757439209180.8791514878418360.560424256079082
770.5261839916137410.9476320167725190.473816008386259
780.6066077671697210.7867844656605580.393392232830279
790.6319302629844360.7361394740311270.368069737015564
800.654515935053240.690968129893520.34548406494676
810.7199939607503550.560012078499290.280006039249645
820.7797997915429840.4404004169140320.220200208457016
830.8156731610477480.3686536779045040.184326838952252
840.8465410416326160.3069179167347680.153458958367384
850.8780207565264360.2439584869471280.121979243473564
860.9097926920976580.1804146158046850.0902073079023424
870.9473829334435960.1052341331128080.0526170665564041
880.9735325473441020.05293490531179510.0264674526558975
890.9875046955104950.02499060897901040.0124953044895052
900.995088787177790.009822425644420010.00491121282221001
910.9975858180342560.004828363931488980.00241418196574449
920.9993900110278720.001219977944256750.000609988972128376
930.9998840004553380.0002319990893230510.000115999544661526
940.9999773560091734.52879816542379e-052.26439908271190e-05
950.9999955598924268.88021514794799e-064.44010757397400e-06
960.9999990132811551.97343769007032e-069.8671884503516e-07
970.9999995154577829.69084436239374e-074.84542218119687e-07
980.9999997190233625.61953276777141e-072.80976638388570e-07
990.9999998132325583.73534884673340e-071.86767442336670e-07
1000.999999853921892.92156219809121e-071.46078109904561e-07
1010.9999998700376392.59924722556199e-071.29962361278099e-07
1020.9999998365297593.26940481982119e-071.63470240991059e-07
1030.9999997460652075.07869584997642e-072.53934792498821e-07
1040.9999996415002137.16999574036539e-073.58499787018270e-07
1050.9999993986281361.20274372830912e-066.01371864154561e-07
1060.9999989992031242.00159375206796e-061.00079687603398e-06
1070.9999982683845683.4632308639394e-061.7316154319697e-06
1080.9999979025298014.19494039736443e-062.09747019868222e-06
1090.9999991627685631.67446287298736e-068.37231436493682e-07
1100.9999998024387483.95122504999358e-071.97561252499679e-07
1110.9999999423750321.15249936398954e-075.76249681994768e-08
1120.9999999304260181.39147963649550e-076.95739818247749e-08
1130.9999998865004252.26999150449387e-071.13499575224693e-07
1140.9999998782035952.43592809229517e-071.21796404614758e-07
1150.9999999786377964.27244088501177e-082.13622044250589e-08
1160.9999999980940383.81192378726514e-091.90596189363257e-09
1170.999999999631457.37099340044694e-103.68549670022347e-10
1180.9999999992980241.40395265048439e-097.01976325242196e-10
1190.9999999984779833.04403370315009e-091.52201685157504e-09
1200.999999996780266.43947849272497e-093.21973924636249e-09
1210.9999999978329354.33413072900069e-092.16706536450034e-09
1220.9999999992641691.47166255075065e-097.35831275375327e-10
1230.9999999997971294.05742287200292e-102.02871143600146e-10
1240.999999999832073.35861402095126e-101.67930701047563e-10
1250.999999999812493.75021364664025e-101.87510682332012e-10
1260.9999999997715764.5684834849761e-102.28424174248805e-10
1270.9999999998099233.80154787742344e-101.90077393871172e-10
1280.999999999900441.99119423603734e-109.9559711801867e-11
1290.999999999919111.61780867582005e-108.08904337910023e-11
1300.9999999998070473.85906924161408e-101.92953462080704e-10
1310.9999999994558181.08836488604254e-095.44182443021268e-10
1320.9999999984630043.07399230006482e-091.53699615003241e-09
1330.9999999962425037.5149942767126e-093.7574971383563e-09
1340.9999999944609021.10781961961725e-085.53909809808623e-09
1350.9999999920196041.59607928181845e-087.98039640909224e-09
1360.9999999787504124.24991767907767e-082.12495883953884e-08
1370.999999942769041.14461921183215e-075.72309605916075e-08
1380.9999998564670852.87065829431072e-071.43532914715536e-07
1390.9999996639626516.7207469722384e-073.3603734861192e-07
1400.9999993309321341.33813573136258e-066.69067865681289e-07
1410.9999987880878122.42382437661934e-061.21191218830967e-06
1420.9999969961698246.00766035122342e-063.00383017561171e-06
1430.9999932810656281.34378687440956e-056.71893437204782e-06
1440.9999879207894382.41584211246173e-051.20792105623087e-05
1450.999980755418453.84891630994681e-051.92445815497340e-05
1460.9999675035027656.49929944696098e-053.24964972348049e-05
1470.9999236848306080.0001526303387840127.63151693920061e-05
1480.9999371155052720.0001257689894560386.28844947280191e-05
1490.9999939502761721.20994476555286e-056.0497238277643e-06
1500.9999980361502523.92769949555414e-061.96384974777707e-06
1510.999994826770281.03464594396212e-055.17322971981059e-06
1520.9999970865949335.82681013371674e-062.91340506685837e-06
1530.9999998870230912.25953817226283e-071.12976908613141e-07
1540.9999996905427546.18914492868363e-073.09457246434182e-07
1550.9999984996928793.00061424287693e-061.50030712143847e-06
1560.9999967119682846.57606343217758e-063.28803171608879e-06
1570.9999886600686642.26798626712191e-051.13399313356096e-05
1580.9999568502388268.62995223489735e-054.31497611744868e-05
1590.9999553635123478.92729753052813e-054.46364876526406e-05
1600.9999286965070970.0001426069858053977.13034929026985e-05
1610.9995974594230480.0008050811539035270.000402540576951764
1620.9999644644010197.10711979629306e-053.55355989814653e-05
1630.9999389871417060.0001220257165876446.1012858293822e-05


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1150.782312925170068NOK
5% type I error level1170.795918367346939NOK
10% type I error level1190.80952380952381NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/102xo11258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/102xo11258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/144dj1258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/144dj1258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/2zbcl1258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/2zbcl1258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/3656v1258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/3656v1258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/4gja71258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/4gja71258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/5so031258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/5so031258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/6a7pi1258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/6a7pi1258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/7c6251258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/7c6251258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/8o4ny1258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/8o4ny1258725386.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/9r53b1258725386.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587254534kiqlvup0iz641j/9r53b1258725386.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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