Home » date » 2010 » Dec » 20 »

*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: Mon, 20 Dec 2010 17:00:25 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6.htm/, Retrieved Mon, 20 Dec 2010 18:50:56 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9,4 0,5 5,1 -1,0 2504,7 9,4 0,8 5,0 3,0 2661,4 9,5 1,0 5,0 2,0 2880,4 9,5 1,3 5,1 3,0 3064,4 9,4 1,3 5,0 5,0 3141,1 9,4 1,2 4,9 5,0 3327,7 9,3 1,2 4,8 3,0 3565,0 9,4 1,0 4,5 2,0 3403,1 9,4 0,8 4,3 1,0 3149,9 9,2 0,7 4,3 -4,0 3006,8 9,1 0,6 4,2 1,0 3230,7 9,1 0,7 4,0 1,0 3361,1 9,1 1,0 3,8 6,0 3484,7 9,0 1,0 4,1 3,0 3411,1 9,0 1,3 4,2 2,0 3288,2 8,9 1,1 4,0 2,0 3280,4 8,8 0,8 4,3 2,0 3174,0 8,7 0,7 4,7 -8,0 3165,3 8,5 0,7 5,0 0,0 3092,7 8,3 0,9 5,1 -2,0 3053,1 8,1 1,3 5,4 3,0 3182,0 7,9 1,4 5,4 5,0 2999,9 7,8 1,6 5,4 8,0 3249,6 7,6 2,1 5,5 8,0 3210,5 7,4 0,3 5,8 9,0 3030,3 7,2 2,1 5,7 11,0 2803,5 7,0 2,5 5,5 13,0 2767,6 7,0 2,3 5,6 12,0 2882,6 6,8 2,4 5,6 13,0 2863,4 6,8 3,0 5,5 15,0 2897,1 6,7 1,7 5,5 13,0 3012,6 6,8 3,5 5,7 16,0 3143,0 6,7 4,0 5,6 10,0 3032,9 6,7 3,7 5,6 14,0 3045,8 6,7 3,7 5,4 14,0 3110,5 6,5 3,0 5,2 15,0 3013,2 6,3 2,7 5,1 13,0 2987,1 6,3 2,5 5,1 8,0 2995,6 6,3 2,2 5,0 7,0 2833,2 6,5 2,9 5,3 3,0 2849,0 6,6 3,1 5,4 3,0 2794,8 6,5 3,0 5,3 4,0 2845,3 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
werkloosheid[t] = + 12.8816810957190 -0.149333856903572hicp[t] -0.948425862863806rente[t] -0.0146403830228089consumer[t] + 0.000113042993792547bel20[t] -0.0119659263556134t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.88168109571900.47097827.350900
hicp-0.1493338569035720.036618-4.07827.4e-053.7e-05
rente-0.9484258628638060.0816-11.622900
consumer-0.01464038302280890.007864-1.86180.0646140.032307
bel200.0001130429937925477.1e-051.60020.1116930.055847
t-0.01196592635561340.001441-8.304300


Multiple Linear Regression - Regression Statistics
Multiple R0.786066260077825
R-squared0.617900165232739
Adjusted R-squared0.604991387031142
F-TEST (value)47.866665270948
F-TEST (DF numerator)5
F-TEST (DF denominator)148
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.504543978966511
Sum Squared Residuals37.6755647532812


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
19.48.255855509881271.14414449011873
29.48.2530843177771.14691568222300
39.58.250648418704041.24935158129596
49.58.1051992768261.394800723174
59.48.167465568335041.23253443166496
69.48.286369436597851.11363056340215
79.38.425351965001210.874648034998794
89.48.724119291213250.675880708786756
99.48.917723205805640.482276794194357
109.28.977716127842720.222283872157282
119.19.027634584659950.0723654153400512
129.19.20516125157729-0.105161251577288
139.19.27885053964208-0.178850539642079
1499.01795803915262-0.0179580391526186
1598.867096768525260.132903231474743
168.99.07380105077154-0.173801050771537
178.88.81007974808833-0.0100797480883266
188.78.579097218459640.120902781540358
198.58.157273547713080.342726452286924
208.38.04540252718180.254597472818199
218.17.630544625991430.469455374008568
227.97.553779418730220.34622058126978
237.87.496252407475470.303747592524535
247.67.31035698532440.289643014675603
257.47.247653512031850.152346487968155
267.27.006810312498420.193189687501585
2777.09145700643136-0.0914570064313644
2877.04215559247904-0.0421555924790369
296.86.99844547192944-0.198445471929441
306.86.96625060056326-0.166250600563256
316.77.19075592001094-0.490755920010942
326.86.691123535978260.10887646402174
336.76.77472953197754-0.074729531977535
346.76.75046048522168-0.0504604852216817
356.76.93549361313721-0.235493613137206
366.57.19210709286803-0.692107092868031
376.37.3461142537775-1.04611425377750
386.37.43817787936389-1.13817787936389
396.37.56213689719662-1.26213689719662
406.57.22145712354252-0.721457123542525
416.67.07865490925626-0.47865490925626
426.57.1675332430411-0.6675332430411
436.37.3829983573063-1.08299835730630
446.37.56670454333842-1.26670454333842
456.57.67032147240518-1.17032147240518
4678.18834622509164-1.18834622509164
477.18.0622361221325-0.9622361221325
487.37.58706401954116-0.28706401954116
497.37.39226201477597-0.0922620147759719
507.47.368842608706190.0311573912938133
517.47.056555501931940.343444498068062
527.37.31170466664977-0.0117046666497718
537.47.313574699828420.0864253001715847
547.57.56794084842575-0.0679408484257549
557.77.687205659248360.0127943407516353
567.77.85416503068909-0.154165030689087
577.78.12479423420912-0.424794234209124
587.77.89404546246819-0.194045462468187
597.78.03290314067242-0.332903140672421
607.88.32889193037574-0.528891930375738
6188.53069105580773-0.530691055807734
628.18.59194622749124-0.491946227491236
638.18.43380024299724-0.333800242997243
648.28.37161222393298-0.171612223932986
658.28.80804050134144-0.608040501341446
668.28.63184507717409-0.43184507717409
678.18.39532505235666-0.295325052356665
688.18.33458893540488-0.234588935404875
698.28.31831859160917-0.118318591609173
708.38.21612627172350.083873728276508
718.37.923891177881450.376108822118551
728.48.119042059951770.280957940048230
738.58.125329849744720.374670150255284
748.58.313797666438910.186202333561089
758.48.35739581460640.0426041853935949
7687.978266172783440.0217338272165596
777.97.788834323159290.111165676840711
788.17.75407266213650.345927337863499
798.57.87984268900850.620157310991504
808.88.048832791661870.751167208338128
818.88.083441391169510.716558608830489
828.68.197892079174410.402107920825588
838.38.36559914181523-0.0655991418152265
848.38.50171936133706-0.201719361337056
858.38.6713443229883-0.371344322988296
868.48.392129261407750.0078707385922525
878.48.293749924218630.106250075781372
888.58.57660472548431-0.0766047254843145
898.68.8505431618887-0.250543161888706
908.68.87775582683457-0.277755826834576
918.68.77822728299282-0.178227282992822
928.68.92223498071363-0.322234980713634
938.68.86129286574961-0.261292865749611
948.58.69333524099364-0.193335240993644
958.48.59399977935765-0.193999779357649
968.48.65320876282357-0.253208762823565
978.48.4125299611313-0.0125299611313071
988.58.43171999919160.068280000808406
998.58.280605987236250.219394012763753
1008.68.00203749516330.597962504836698
1018.67.978814304858580.621185695141424
1028.47.832131485630340.56786851436966
1038.27.944806684935180.255193315064816
10488.15562532594515-0.155625325945151
10588.31042156336818-0.310421563368183
10688.19395473017033-0.193954730170333
10788.25360115157232-0.253601151572321
1087.98.08423574460699-0.184235744606989
1097.97.857131085330640.0428689146693596
1107.87.99727180354744-0.197271803547436
1117.87.90328499705487-0.103284997054866
11287.779041308790040.220958691209962
1137.87.569163196470940.230836803529059
1147.47.46844901652104-0.068449016521039
1157.27.57398212306118-0.373982123061181
11677.55086057475528-0.550860574755279
11777.51965391843545-0.51965391843545
1187.27.48410217305958-0.284102173059577
1197.27.52762362636597-0.327623626365966
1207.27.23884421839426-0.0388442183942559
12177.54502555755802-0.545025557558023
1226.97.46024428671025-0.560244286710246
1236.87.13385829874828-0.333858298748282
1246.87.15112095173139-0.351120951731389
1256.86.72818724650940.0718127534905994
1266.96.322900771249510.577099228750486
1277.26.556476299636980.643523700363021
1287.26.78120952737090.418790472629092
1297.26.715454707705090.484545292294909
1307.16.838724176610050.261275823389953
1317.26.169747692788211.03025230721179
1327.37.207647084658290.0923529153417114
1337.57.311737775152720.188262224847284
1347.67.56721406622780.0327859337722017
1357.78.0179821548806-0.3179821548806
1367.77.9837663304829-0.283766330482903
1377.77.79895883304842-0.0989588330484179
1387.88.07897261870466-0.278972618704662
13988.35124255307575-0.351242553075754
1408.18.22210642838432-0.122106428384317
1418.18.27188580386928-0.171885803869278
14288.26752858011221-0.267528580112215
1438.18.086647525885170.0133524741148251
1448.28.10713029675030.0928697032496925
1458.37.929860055025610.370139944974391
1468.48.006259351412060.393740648587936
1478.48.006663562898280.393336437101725
1488.47.895031544161060.504968455838942
1498.58.252210523804670.247789476195335
1508.57.869628525089470.630371474910534
1518.67.967448056777350.632551943222654
1528.68.390555631422630.209444368577366
1538.57.93300804740540.566991952594606
1548.57.68009981201740.819900187982593


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.002591794995395430.005183589990790850.997408205004605
100.001254277462300300.002508554924600600.9987457225377
110.0001801105440675470.0003602210881350940.999819889455932
128.31308663298562e-050.0001662617326597120.99991686913367
134.15361081653174e-058.30722163306349e-050.999958463891835
147.07031090149108e-061.41406218029822e-050.999992929689099
151.17189380928912e-062.34378761857823e-060.99999882810619
161.85219213973971e-073.70438427947942e-070.999999814780786
171.04347295726033e-072.08694591452066e-070.999999895652704
181.92031223119275e-083.84062446238551e-080.999999980796878
193.7125008034218e-097.4250016068436e-090.9999999962875
204.90645696640869e-099.81291393281737e-090.999999995093543
217.84580934563705e-091.56916186912741e-080.99999999215419
228.0569879272158e-091.61139758544316e-080.999999991943012
236.2279099989468e-091.24558199978936e-080.99999999377209
241.28803882005952e-082.57607764011905e-080.999999987119612
254.38280521773852e-098.76561043547704e-090.999999995617195
262.00302508341381e-094.00605016682761e-090.999999997996975
271.33321340297769e-092.66642680595537e-090.999999998666787
284.37214752488268e-108.74429504976536e-100.999999999562785
292.48037724981095e-104.96075449962191e-100.999999999751962
306.03997072977186e-111.20799414595437e-100.9999999999396
314.99261524333757e-119.98523048667513e-110.999999999950074
322.56860893033364e-115.13721786066727e-110.999999999974314
338.22904525693566e-121.64580905138713e-110.999999999991771
344.63633693678049e-129.27267387356099e-120.999999999995364
351.95960901718554e-123.91921803437108e-120.99999999999804
365.9409644705727e-131.18819289411454e-120.999999999999406
379.99020094216675e-131.99804018843335e-120.999999999999
383.7210637987867e-127.4421275975734e-120.99999999999628
393.98282207141061e-127.96564414282121e-120.999999999996017
403.45162259591303e-126.90324519182606e-120.999999999996548
413.34716916541256e-116.69433833082512e-110.999999999966528
427.66185483482766e-111.53237096696553e-100.999999999923382
431.13121301235413e-102.26242602470825e-100.999999999886879
443.02700665323924e-106.05401330647848e-100.9999999996973
452.17731656021549e-094.35463312043099e-090.999999997822683
465.33584091738647e-091.06716818347729e-080.99999999466416
475.35694425197961e-091.07138885039592e-080.999999994643056
480.0002624192903708880.0005248385807417760.99973758070963
490.08719256684260050.1743851336852010.9128074331574
500.630143555694030.7397128886119390.369856444305969
510.9475155724120180.1049688551759650.0524844275879824
520.980686349639180.03862730072163950.0193136503608198
530.9925326168444380.01493476631112390.00746738315556194
540.9951932337764720.009613532447055360.00480676622352768
550.9973449261820.005310147636001630.00265507381800081
560.9978078298786280.004384340242743870.00219217012137193
570.998013101405410.003973797189179290.00198689859458964
580.9979822857577830.004035428484433430.00201771424221671
590.9979311651872560.004137669625487190.00206883481274359
600.9980854247571150.003829150485769180.00191457524288459
610.9981945927749770.003610814450045230.00180540722502261
620.998185973776450.00362805244709920.0018140262235496
630.997690304752650.004619390494700790.00230969524735039
640.9976843598714840.004631280257031310.00231564012851566
650.9982122910476930.003575417904613660.00178770895230683
660.9986412793006940.002717441398610960.00135872069930548
670.9986644287033120.002671142593375930.00133557129668797
680.9989597155503640.002080568899271690.00104028444963585
690.9994889754249210.001022049150157410.000511024575078705
700.9996473304333340.0007053391333313640.000352669566665682
710.999888792525240.0002224149495188070.000111207474759403
720.9999498325847130.0001003348305743755.01674152871874e-05
730.9999769829828484.60340343031472e-052.30170171515736e-05
740.9999805568657293.88862685411357e-051.94431342705678e-05
750.9999771022514284.57954971432442e-052.28977485716221e-05
760.9999802967272733.94065454542001e-051.97032727271000e-05
770.9999882146304742.35707390524654e-051.17853695262327e-05
780.9999926449448311.47101103372869e-057.35505516864346e-06
790.9999965806032266.8387935468657e-063.41939677343285e-06
800.9999986113401682.77731966346435e-061.38865983173217e-06
810.9999993350389131.32992217474706e-066.64961087373528e-07
820.999999522720829.54558357970348e-074.77279178985174e-07
830.9999991477091511.70458169722680e-068.52290848613398e-07
840.9999985671900492.86561990252088e-061.43280995126044e-06
850.9999982200829333.55983413465125e-061.77991706732563e-06
860.9999969902102876.01957942632581e-063.00978971316291e-06
870.9999954258099549.14838009153298e-064.57419004576649e-06
880.9999923860692011.52278615969034e-057.61393079845172e-06
890.9999868241525732.63516948536068e-051.31758474268034e-05
900.9999782111310974.35777378057213e-052.17888689028606e-05
910.9999630758884377.38482231264949e-053.69241115632474e-05
920.9999426310236130.0001147379527747095.73689763873543e-05
930.9999047371657650.00019052566846969.52628342348e-05
940.9998492414687820.0003015170624362050.000150758531218103
950.999760082037260.0004798359254816620.000239917962740831
960.9996935942453540.0006128115092922560.000306405754646128
970.9995584538253880.000883092349224430.000441546174612215
980.9993079723135910.001384055372817520.00069202768640876
990.9991409428854460.001718114229107190.000859057114553594
1000.9995769235755040.0008461528489929090.000423076424496454
1010.9998999479664790.0002001040670429290.000100052033521465
1020.9999510626603749.787467925159e-054.8937339625795e-05
1030.999960495859467.90082810817747e-053.95041405408874e-05
1040.9999470858157270.0001058283685456645.29141842728322e-05
1050.999935521183850.0001289576322995536.44788161497765e-05
1060.999925652750270.0001486944994595457.43472497297726e-05
1070.999914141633940.000171716732118568.585836605928e-05
1080.9999424074414480.0001151851171047795.75925585523896e-05
1090.999975677626224.86447475598347e-052.43223737799173e-05
1100.9999841518802463.16962395080822e-051.58481197540411e-05
1110.999995614775798.77044842192828e-064.38522421096414e-06
1120.9999999753715034.92569948629919e-082.46284974314959e-08
1130.9999999999728715.42577139579907e-112.71288569789953e-11
1140.999999999998922.16152244610829e-121.08076122305415e-12
1150.9999999999994181.1644085087537e-125.8220425437685e-13
1160.9999999999987562.48850019908797e-121.24425009954399e-12
1170.9999999999965456.91103139035736e-123.45551569517868e-12
1180.99999999999833.40153275783666e-121.70076637891833e-12
1190.9999999999993761.24709834114218e-126.23549170571092e-13
1200.9999999999999968.17259066743203e-154.08629533371602e-15
1210.9999999999999951.07871844894429e-145.39359224472144e-15
1220.999999999999984.13752972085881e-142.06876486042940e-14
1230.9999999999998952.09135049988995e-131.04567524994497e-13
1240.9999999999998233.52928343045464e-131.76464171522732e-13
1250.9999999999999637.41089789122334e-143.70544894561167e-14
1260.9999999999999872.68938125772153e-141.34469062886076e-14
1270.9999999999999676.5061801250305e-143.25309006251525e-14
1280.999999999999833.40553117939959e-131.70276558969979e-13
1290.9999999999994131.17436212431948e-125.8718106215974e-13
1300.9999999999973135.37456057696809e-122.68728028848404e-12
1310.9999999999909961.80079081017913e-119.00395405089566e-12
1320.9999999999795254.09496960923173e-112.04748480461586e-11
1330.9999999998796362.40727846275965e-101.20363923137983e-10
1340.9999999992707941.45841208157028e-097.2920604078514e-10
1350.999999995389339.22133885116278e-094.61066942558139e-09
1360.9999999747187365.05625275504592e-082.52812637752296e-08
1370.99999992333711.53325800586287e-077.66629002931435e-08
1380.9999999647287477.0542505930822e-083.5271252965411e-08
1390.999999860482152.79035701362843e-071.39517850681421e-07
1400.9999988957683232.20846335458023e-061.10423167729011e-06
1410.999995521810798.95637841953813e-064.47818920976906e-06
1420.99997654530254.69093950011839e-052.34546975005920e-05
1430.9998851674105370.0002296651789259590.000114832589462979
1440.9998727557370440.0002544885259124640.000127244262956232
1450.9992957465171230.001408506965754070.000704253482877036


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1320.963503649635037NOK
5% type I error level1340.978102189781022NOK
10% type I error level1340.978102189781022NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/10z92e1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/10z92e1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/1s8n21292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/1s8n21292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/2s8n21292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/2s8n21292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/33hnn1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/33hnn1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/43hnn1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/43hnn1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/53hnn1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/53hnn1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/6w84q1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/6w84q1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/770lt1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/770lt1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/870lt1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/870lt1292864413.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/970lt1292864413.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292867445hx46p4l8vbmknp6/970lt1292864413.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