Home » date » 2008 » Dec » 24 »

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Dec 2008 05:50:55 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i.htm/, Retrieved Wed, 24 Dec 2008 13:51:59 +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/2008/Dec/24/t1230123118xp364sn7916tx6i.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
1778.8 0 1264.9 0 1749.1 0 1795.6 0 1759 0 1645.1 0 1589.9 0 1712.6 0 1782.5 0 1606.6 0 1882.1 0 1846.9 0 1873.2 0 1368.3 0 1843.5 0 2074.5 0 1848.5 0 1909.3 0 1932.9 0 2119.1 0 2202 0 2260.8 0 2097.1 0 2026.2 0 2475.2 0 1732.3 0 2385.2 0 2362.2 0 2119 0 2260.3 0 2006.5 0 2073.2 0 2207.8 0 2018.9 0 2082.8 0 2314.3 0 2252.7 0 1633.1 0 2161.1 0 1987.9 0 1870.3 0 1984.6 0 1735.9 0 1910 0 2410.1 0 1994.6 0 2152.3 0 2554 0 2754.5 0 1812.3 0 2549.9 0 2558.4 0 2279.2 0 2591.8 0 2442.4 0 2607.7 0 3106.7 0 2447.5 0 3129.5 0 2606.6 0 2964.4 0 2211.6 0 3246.1 0 3141.8 0 3125.9 0 2890.5 0 2554.3 0 2771.1 0 2950 0 2512.1 0 2800 0 2877.2 0 3048.7 0 2082.7 0 2454.8 0 2807.8 0 2627.6 0 2515.9 0 2690.3 0 2770.8 0 2907.7 0 2906.3 0 3104.6 0 2862.1 0 3189.1 0 2071.8 0 2907.7 0 3194.5 0 2722.9 0 2854.8 0 2803 0 2744.9 0 2574.2 0 2740.9 0 2635.9 0 2612.7 0 3094.2 0 2029 0 2931.1 0 2952.2 0 2601.9 0 2874 0 2570.9 0 2849.8 0 3171.5 0 2843.6 0 2831.5 0 3284.4 0 3230.1 0 2412.2 0 3052.7 0 3048.9 0 2819.9 0 2962.7 0 2796.6 0 2857.2 0 3213.1 0 3116.2 0 3340.1 0 3602 0 3626.4 0 2741.6 1 3756.2 1 3140 1 3421.6 1 3243.7 1 3085.2 1 3152.8 1 3543.6 1 2959.3 1 3594.1 1 3207.9 1 3366.7 1 2658.4 1 3340.4 1 3368.4 1 3422.1 1 3268 1 3234.4 1 3365.1 1 3923.6 1 3147.3 1 3447.7 1 3719.8 1 4090.4 1 3386.7 1 3436.8 1 3744.9 1 3325.8 1 3322.1 1 3338.6 1 3464.2 1 3404.1 1 3942 1 3859.9 1 3895.4 1 4472.2 1 3025.5 1 4285.9 1
 
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 time9 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
x[t] = + 1727.19307028029 -0.550357948481514y[t] + 12.2663376908394t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1727.1930702802955.61376531.056900
y-0.55035794848151484.8266-0.00650.9948320.497416
t12.26633769083940.78817315.56300


Multiple Linear Regression - Regression Statistics
Multiple R0.879490983971027
R-squared0.773504390886325
Adjusted R-squared0.770600601025894
F-TEST (value)266.377536965200
F-TEST (DF numerator)2
F-TEST (DF denominator)156
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation307.477860150593
Sum Squared Residuals14748650.9793149


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11778.81739.4594079711339.3405920288723
21264.91751.72574566196-486.825745661964
31749.11763.99208335280-14.8920833528025
41795.61776.2584210436419.3415789563570
517591788.52475873448-29.5247587344822
61645.11800.79109642532-155.691096425322
71589.91813.05743411616-223.157434116161
81712.61825.323771807-112.723771807000
91782.51837.59010949784-55.0901094978397
101606.61849.85644718868-243.256447188679
111882.11862.1227848795219.9772151204815
121846.91874.38912257036-27.4891225703577
131873.21886.65546026120-13.4554602611971
141368.31898.92179795204-530.621797952037
151843.51911.18813564288-67.6881356428759
162074.51923.45447333372151.045526666285
171848.51935.72081102455-87.2208110245547
181909.31947.98714871539-38.6871487153941
191932.91960.25348640623-27.3534864062334
202119.11972.51982409707146.580175902927
2122021984.78616178791217.213838212088
222260.81997.05249947875263.747500521248
232097.12009.3188371695987.7811628304088
242026.22021.585174860434.61482513956962
252475.22033.85151255127441.34848744873
261732.32046.11785024211-313.817850242109
272385.22058.38418793295326.815812067051
282362.22070.65052562379291.549474376212
2921192082.9168633146336.0831366853727
302260.32095.18320100547165.116798994533
312006.52107.44953869631-100.949538696306
322073.22119.71587638715-46.5158763871456
332207.82131.9822140779875.8177859220152
342018.92144.24855176882-125.348551768824
352082.82156.51488945966-73.7148894596635
362314.32168.78122715050145.518772849497
372252.72181.0475648413471.6524351586574
381633.12193.31390253218-560.213902532182
392161.12205.58024022302-44.4802402230213
401987.92217.84657791386-229.946577913860
411870.32230.1129156047-359.8129156047
421984.62242.37925329554-257.779253295539
431735.92254.64559098638-518.745590986379
4419102266.91192867722-356.911928677218
452410.12279.17826636806130.921733631942
461994.62291.44460405890-296.844604058897
472152.32303.71094174974-151.410941749736
4825542315.97727944058238.022720559424
492754.52328.24361713141426.256382868585
501812.32340.50995482225-528.209954822254
512549.92352.77629251309197.123707486906
522558.42365.04263020393193.357369796067
532279.22377.30896789477-98.1089678947727
542591.82389.57530558561202.224694414388
552442.42401.8416432764540.5583567235488
562607.72414.10798096729193.592019032709
573106.72426.37431865813680.32568134187
582447.52438.640656348978.85934365103057
593129.52450.90699403981678.593005960191
602606.62463.17333173065143.426668269352
612964.42475.43966942149488.960330578512
622211.62487.70600711233-276.106007112327
633246.12499.97234480317746.127655196834
643141.82512.23868249401629.561317505994
653125.92524.50502018485601.394979815155
662890.52536.77135787568353.728642124316
672554.32549.037695566525.26230443347628
682771.12561.30403325736209.795966742637
6929502573.57037094820376.429629051797
702512.12585.83670863904-73.7367086390421
7128002598.10304632988201.896953670119
722877.22610.36938402072266.830615979279
733048.72622.63572171156426.06427828844
742082.72634.9020594024-552.2020594024
752454.82647.16839709324-192.368397093239
762807.82659.43473478408148.365265215922
772627.62671.70107247492-44.1010724749178
782515.92683.96741016576-168.067410165757
792690.32696.23374785660-5.9337478565963
802770.82708.5000855474462.2999144525643
812907.72720.76642323828186.933576761725
822906.32733.03276092911173.267239070885
833104.62745.29909861995359.300901380046
842862.12757.56543631079104.534563689207
853189.12769.83177400163419.268225998367
862071.82782.09811169247-710.298111692472
872907.72794.36444938331113.335550616688
883194.52806.63078707415387.869212925849
892722.92818.89712476499-95.9971247649902
902854.82831.1634624558323.6365375441705
9128032843.42980014667-40.429800146669
922744.92855.69613783751-110.796137837508
932574.22867.96247552835-293.762475528348
942740.92880.22881321919-139.328813219187
952635.92892.49515091003-256.595150910026
962612.72904.76148860087-292.061488600866
973094.22917.02782629171177.172173708295
9820292929.29416398254-900.294163982545
992931.12941.56050167338-10.4605016733842
1002952.22953.82683936422-1.62683936422369
1012601.92966.09317705506-364.193177055063
10228742978.3595147459-104.359514745902
1032570.92990.62585243674-419.725852436742
1042849.83002.89219012758-153.092190127581
1053171.53015.15852781842156.341472181580
1062843.63027.42486550926-183.824865509260
1072831.53039.6912032001-208.191203200099
1083284.43051.95754089094232.442459109062
1093230.13064.22387858178165.876121418222
1102412.23076.49021627262-664.290216272617
1113052.73088.75655396346-36.0565539634569
1123048.93101.02289165430-52.122891654296
1132819.93113.28922934514-293.389229345135
1142962.73125.55556703597-162.855567035975
1152796.63137.82190472681-341.221904726814
1162857.23150.08824241765-292.888242417654
1173213.13162.3545801084950.745419891507
1183116.23174.62091779933-58.4209177993325
1193340.13186.88725549017153.212744509828
12036023199.15359318101402.846406818989
1213626.43211.41993087185414.980069128149
1222741.63223.13591061421-481.535910614208
1233756.23235.40224830505520.797751694952
12431403247.66858599589-107.668585995887
1253421.63259.93492368673161.665076313274
1263243.73272.20126137757-28.5012613775659
1273085.23284.46759906840-199.267599068405
1283152.83296.73393675924-143.933936759244
1293543.63309.00027445008234.599725549916
1302959.33321.26661214092-361.966612140923
1313594.13333.53294983176260.567050168237
1323207.93345.7992875226-137.899287522602
1333366.73358.065625213448.6343747865584
1342658.43370.33196290428-711.931962904281
1353340.43382.59830059512-42.1983005951201
1363368.43394.86463828596-26.4646382859595
1373422.13407.130975976814.9690240232010
13832683419.39731366764-151.397313667638
1393234.43431.66365135848-197.263651358478
1403365.13443.92998904932-78.8299890493173
1413923.63456.19632674016467.403673259843
1423147.33468.46266443100-321.162664430996
1433447.73480.72900212184-33.0290021218355
1443719.83492.99533981267226.804660187326
1454090.43505.26167750351585.138322496486
1463386.73517.52801519435-130.828015194354
1473436.83529.79435288519-92.9943528851927
1483744.93542.06069057603202.839309423968
1493325.83554.32702826687-228.527028266871
1503322.13566.59336595771-244.493365957711
1513338.63578.85970364855-240.259703648550
1523464.23591.12604133939-126.92604133939
1533404.13603.39237903023-199.292379030229
15439423615.65871672107326.341283278932
1553859.93627.92505441191231.974945588092
1563895.43640.19139210275255.208607897253
1574472.23652.45772979359819.742270206413
1583025.53664.72406748443-639.224067484426
1594285.93676.99040517527608.909594824734


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.4323539713096470.8647079426192940.567646028690353
70.2951861282636760.5903722565273520.704813871736324
80.1747402842365810.3494805684731620.825259715763419
90.0996807374436380.1993614748872760.900319262556362
100.06150785423712360.1230157084742470.938492145762876
110.04050559269071920.08101118538143830.95949440730928
120.02116435381764960.04232870763529910.97883564618235
130.01049751001815200.02099502003630390.989502489981848
140.04406253521173990.08812507042347980.95593746478826
150.0275387677740960.0550775355481920.972461232225904
160.03013596089804560.06027192179609120.969864039101954
170.01745636841298870.03491273682597740.982543631587011
180.009891602552890670.01978320510578130.99010839744711
190.00544135446619510.01088270893239020.994558645533805
200.004193585753804740.008387171507609480.995806414246195
210.003599595200018720.007199190400037430.996400404799981
220.00306513253640880.00613026507281760.996934867463591
230.001634523668877370.003269047337754740.998365476331123
240.0009365301343770470.001873060268754090.999063469865623
250.001594055704099150.003188111408198290.9984059442959
260.00549521487853850.0109904297570770.994504785121461
270.004672595178587420.009345190357174850.995327404821413
280.003275722823885840.006551445647771680.996724277176114
290.002228782064474070.004457564128948130.997771217935526
300.001300676857922110.002601353715844220.998699323142078
310.001387550859233270.002775101718466530.998612449140767
320.001101721316214320.002203442632428630.998898278683786
330.000655544678537380.001311089357074760.999344455321463
340.0006622506177444430.001324501235488890.999337749382256
350.0005105378656725920.001021075731345180.999489462134327
360.0002938510430449200.0005877020860898410.999706148956955
370.0001668013955240820.0003336027910481640.999833198604476
380.002694247984600780.005388495969201550.9973057520154
390.001804816462528190.003609632925056380.998195183537472
400.00185226461991650.0037045292398330.998147735380084
410.002931417202341910.005862834404683820.997068582797658
420.002834653140583790.005669306281167580.997165346859416
430.007384442195684980.01476888439137000.992615557804315
440.008446283495404730.01689256699080950.991553716504595
450.007149625911273770.01429925182254750.992850374088726
460.007010378487728590.01402075697545720.992989621512271
470.005333841668262690.01066768333652540.994666158331737
480.005848379905540440.01169675981108090.99415162009446
490.01079569351470670.02159138702941340.989204306485293
500.02448199494578080.04896398989156170.97551800505422
510.02238468692294610.04476937384589210.977615313077054
520.01967904198412380.03935808396824760.980320958015876
530.01564462310582510.03128924621165020.984355376894175
540.01356169081210170.02712338162420340.986438309187898
550.01012188024860940.02024376049721870.98987811975139
560.008317703409077440.01663540681815490.991682296590923
570.02751372528788430.05502745057576870.972486274712116
580.02111155646622790.04222311293245580.978888443533772
590.04966969526590310.09933939053180620.950330304734097
600.0386131114833440.0772262229666880.961386888516656
610.04564540492254710.09129080984509420.954354595077453
620.05504782636350380.1100956527270080.944952173636496
630.1184194217345410.2368388434690830.881580578265459
640.1662686479126970.3325372958253930.833731352087303
650.2130916706767250.4261833413534510.786908329323275
660.2006380814939840.4012761629879680.799361918506016
670.1794342316624610.3588684633249220.820565768337539
680.156259747934480.312519495868960.84374025206552
690.1526463378008670.3052926756017340.847353662199133
700.1435623908040570.2871247816081140.856437609195943
710.1256051300467810.2512102600935630.874394869953219
720.1142598260893020.2285196521786030.885740173910698
730.1252197241289270.2504394482578550.874780275871073
740.2507414226937580.5014828453875160.749258577306242
750.2531775308955530.5063550617911050.746822469104447
760.2271166316972460.4542332633944920.772883368302754
770.2057454015112940.4114908030225870.794254598488706
780.1990276291308180.3980552582616370.800972370869182
790.1751821115036940.3503642230073880.824817888496306
800.1521544704036330.3043089408072670.847845529596367
810.1370917900496510.2741835800993020.862908209950349
820.1234039208845550.246807841769110.876596079115445
830.1353657504463630.2707315008927260.864634249553637
840.1216624204404620.2433248408809240.878337579559538
850.1550854870507060.3101709741014130.844914512949294
860.3310137057443820.6620274114887650.668986294255618
870.3106537236094050.621307447218810.689346276390595
880.3664759933795870.7329519867591740.633524006620413
890.3437454690109540.6874909380219080.656254530989046
900.3221962082763740.6443924165527480.677803791723626
910.2992577644576080.5985155289152160.700742235542392
920.277624090123270.555248180246540.72237590987673
930.276368295097760.552736590195520.72363170490224
940.2532104643494470.5064209286988940.746789535650553
950.241335715185980.482671430371960.75866428481402
960.2332238845253880.4664477690507760.766776115474612
970.2309291589600710.4618583179201430.769070841039929
980.5079001794199770.9841996411600450.492099820580023
990.4685945140148020.9371890280296040.531405485985198
1000.4303935970968170.8607871941936330.569606402903183
1010.4285737717408550.857147543481710.571426228259145
1020.386154256662540.772308513325080.61384574333746
1030.4016484337633940.8032968675267890.598351566236606
1040.3611828797855430.7223657595710850.638817120214457
1050.3402517845866280.6805035691732560.659748215413372
1060.3046135031072720.6092270062145430.695386496892728
1070.2736010461584360.5472020923168730.726398953841564
1080.2690712374790480.5381424749580960.730928762520952
1090.2530271050242060.5060542100484120.746972894975794
1100.3748173850865250.749634770173050.625182614913475
1110.3286416896392710.6572833792785420.671358310360729
1120.284782800048080.569565600096160.71521719995192
1130.2737339099260850.5474678198521690.726266090073915
1140.2435032441854480.4870064883708960.756496755814552
1150.2602094456085780.5204188912171560.739790554391422
1160.2813033202538310.5626066405076620.718696679746169
1170.2464741519589240.4929483039178470.753525848041076
1180.2362370743426470.4724741486852930.763762925657353
1190.2128234813068660.4256469626137320.787176518693134
1200.1951616498087650.3903232996175310.804838350191235
1210.1775493168206110.3550986336412220.822450683179389
1220.1812236947518970.3624473895037940.818776305248103
1230.3140129997541470.6280259995082940.685987000245853
1240.2676874174634160.5353748349268320.732312582536584
1250.255652837962160.511305675924320.74434716203784
1260.2173249019701650.4346498039403310.782675098029835
1270.1815373031100160.3630746062200330.818462696889984
1280.1469007055699230.2938014111398460.853099294430077
1290.1552824919105520.3105649838211040.844717508089448
1300.1404959354117170.2809918708234340.859504064588283
1310.1567060702230490.3134121404460970.843293929776951
1320.1240544122571200.2481088245142410.87594558774288
1330.1021655214529760.2043310429059520.897834478547024
1340.1838465671749570.3676931343499140.816153432825043
1350.1445922555471120.2891845110942230.855407744452888
1360.1113167909268010.2226335818536010.8886832090732
1370.08492104987405840.1698420997481170.915078950125942
1380.0629631752435680.1259263504871360.937036824756432
1390.04801328672103230.09602657344206460.951986713278968
1400.03355137970962890.06710275941925780.966448620290371
1410.0528226899747640.1056453799495280.947177310025236
1420.04562959325690020.09125918651380040.9543704067431
1430.03031908265237430.06063816530474860.969680917347626
1440.02430485255391400.04860970510782810.975695147446086
1450.087089469409990.174178938819980.91291053059001
1460.05922932223592510.1184586444718500.940770677764075
1470.03881274733775910.07762549467551810.96118725266224
1480.04794339470634470.09588678941268940.952056605293655
1490.02884569935755140.05769139871510270.971154300642449
1500.01601304364992060.03202608729984130.98398695635008
1510.008607019919699220.01721403983939840.9913929800803
1520.004096512257158760.008193024514317530.995903487742841
1530.003258552643578540.006517105287157080.996741447356421


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level240.162162162162162NOK
5% type I error level480.324324324324324NOK
10% type I error level630.425675675675676NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/10k6r41230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/10k6r41230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/1871m1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/1871m1230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/2kq981230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/2kq981230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/3j74q1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/3j74q1230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/4dv1h1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/4dv1h1230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/5q4gl1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/5q4gl1230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/6onfw1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/6onfw1230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/7u4ll1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/7u4ll1230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/81kw81230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/81kw81230123040.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/9qywx1230123040.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/24/t1230123118xp364sn7916tx6i/9qywx1230123040.ps (open in new window)


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