Home » date » 2010 » Dec » 26 »

Multiple Regression

*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: Sun, 26 Dec 2010 20:57:10 +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/26/t1293396912lhfgwsjavsodzfq.htm/, Retrieved Sun, 26 Dec 2010 21:55:23 +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/26/t1293396912lhfgwsjavsodzfq.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:
Micha
 
Dataseries X:
» Textbox « » Textfile « » CSV «
549 3 0 1 564 3,1 -2 1 586 2,9 -4 1 604 2,4 -4 1 601 2,4 -7 1 545 2,7 -9 1 537 2,5 -13 1 552 2,1 -8 1 563 1,9 -13 1 575 0,8 -15 1 580 0,8 -15 1 575 0,3 -15 1 558 0 -10 1 564 -0,9 -12 1 581 -1 -11 1 597 -0,7 -11 1 587 -1,7 -17 1 536 -1 -18 1 524 -0,2 -19 1,09 537 0,7 -22 1,31 536 0,6 -24 1,66 533 1,9 -24 2 528 2,1 -20 2,31 516 2,7 -25 2,75 502 3,2 -22 3,42 506 4,8 -17 3,97 518 5,5 -9 4,25 534 5,4 -11 4,25 528 5,9 -13 4,18 478 5,8 -11 4 469 5,1 -9 4 490 4,1 -7 4 493 4,4 -3 4 508 3,6 -3 4 517 3,5 -6 4 514 3,1 -4 4 510 2,9 -8 4 527 2,2 -1 4 542 1,4 -2 4 565 1,2 -2 4 555 1,3 -1 4 499 1,3 1 3,9 511 1,3 2 3,75 526 1,8 2 3,75 532 1,8 -1 3,65 549 1,8 1 3,5 561 1,7 -1 3,5 557 2,1 -8 3,39 566 2 1 3,25 588 1,7 2 3,17 620 1,9 -2 3 626 2,3 -2 2,93 620 2,4 -2 2,75 573 2,5 -2 2,64 573 2,8 -6 2,5 574 2,6 -4 2,5 580 2,2 -5 2,45 590 2,8 -2 2,25 593 2,8 -1 2,25 597 2,8 -5 2,21 595 2,3 -9 2 612 2,2 -8 2 628 3 -14 2 629 2,9 -10 2 621 2,7 -11 2 569 2,7 -11 2 567 2,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 time8 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Werkl[t] = + 615.257401139034 + 6.80817051072085HICP[t] + 0.0432285362072156cons[t] -33.3276162244645Rente[t] -5.64521901200417M1[t] + 12.9632301608716M2[t] + 27.8067716518888M3[t] + 37.1454696521715M4[t] + 25.3435520808326M5[t] -30.8186628281114M6[t] -33.0060980257521M7[t] -22.0416154598599M8[t] -15.5437481467340M9[t] -5.62544687503914M10[t] + 0.369926092587064M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)615.25740113903413.57541645.321400
HICP6.808170510720852.4825492.74240.0070670.003533
cons0.04322853620721560.3697610.11690.9071340.453567
Rente-33.32761622446453.167876-10.520500
M1-5.6452190120041713.302233-0.42440.6720740.336037
M212.963230160871613.3027950.97450.3318490.165924
M327.806771651888813.3344522.08530.0392320.019616
M437.145469652171513.3504542.78230.0063020.003151
M525.343552080832613.3159911.90320.0594870.029744
M6-30.818662828111413.358727-2.3070.0228290.011414
M7-33.006098025752113.321871-2.47760.0146680.007334
M8-22.041615459859913.343882-1.65180.1012770.050638
M9-15.543748146734013.333038-1.16580.2460840.123042
M10-5.6254468750391413.351494-0.42130.674290.337145
M110.36992609258706413.3518270.02770.9779440.488972


Multiple Linear Regression - Regression Statistics
Multiple R0.816721146478923
R-squared0.667033431105846
Adjusted R-squared0.626847810722069
F-TEST (value)16.5988088459405
F-TEST (DF numerator)14
F-TEST (DF denominator)116
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation30.4129915979267
Sum Squared Residuals107294.206720525


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1549596.70907743473-47.7090774347295
2564615.911886586261-51.9118865862613
3586629.30733690272-43.3073369027198
4604635.241949647642-31.2419496476421
5601623.310346467682-22.3103464676816
6545569.104125639539-24.1041256395393
7537565.382142194926-28.3821421949258
8552573.839499237566-21.8394992375656
9563578.759589767511-15.7595897675112
10575581.102446404999-6.10244640499874
11580587.097819372625-7.09781937262497
12575583.323808024677-8.32380802467739
13558575.852280540493-17.8522805404931
14564588.246919181306-24.2469191813057
15581602.452872157458-21.4528721574579
16597613.834021310957-16.8340213109569
17587594.964562011654-7.96456201165395
18536543.524837924007-7.52483792400724
19524543.741225138534-19.7412251385342
20537553.371299986071-16.3712999860713
21536547.437227497148-11.4372274971481
22533554.874760916462-21.8747609164622
23528552.073121101477-24.0731211014774
24516540.907803495522-24.9078034955224
25502516.466852477109-14.4668524771090
26506527.854328224719-21.8543282247187
27518538.477684820048-20.4776848200482
28534547.049108696844-13.0491086968443
29528540.897752444164-12.8977524441641
30478490.140148476966-12.1401484769659
31469483.273450994235-14.2734509942351
32490487.5162201218212.48377987817916
33493496.229452732992-3.22945273299185
34508500.701217596117.29878240388992
35517505.88608790404311.1139120959575
36514502.87935067958211.1206493204184
37510495.69958342060414.3004165793956
38527509.84491298942617.1550870105739
39542519.19868953565922.8013104643407
40565527.17575343379837.8242465662021
41555516.09788144973838.9021185502617
42499463.35488523565535.6451147643449
43511466.20982100789144.7901789921087
44526480.57838882914445.4216111708560
45532490.27933215609541.7206678439053
46549505.28323293387443.7167670661263
47561510.51133177801350.4886682219867
48557516.22811192095540.7718880790448
49566514.95699895516951.043001044831
50588534.23243480899353.7675651910071
51620555.93039101548464.0696089845157
52626570.32529035576855.6747096442322
53620565.20316075590554.7968392440953
54573513.38780068272459.6121993172762
55573517.73576876489655.2642312351044
56574527.42507430105846.5749256989420
57580532.82282568491247.1771743150884
58590553.62123811655436.3787618834464
59593559.65983962038733.3401603796130
60597560.4501040319536.5498959680504
61595558.22668502689436.7733149731063
62612576.19754568490535.8024543150954
63628596.22825236725531.7717476327448
64629605.05904746129523.9409525387053
65621591.85226725160429.1477327483955
66569535.6900523426633.3099476573396
67567530.77934894073136.2206510592686
68573542.68401977493930.3159802250611
69584552.03484090097531.9651590990252
70589558.50582838110230.4941716188979
71591562.3290645868928.6709354131097
72595561.27832144323133.7216785567688
73594558.31314209930835.6868579006918
74611579.6880880126831.3119119873205
75613588.57719018887724.4228098111233
76611599.27752229130411.7224777086964
77594588.0699646986225.93003530137755
78543531.39984688343511.6001531165649
79537531.6763086728405.32369132716047
80544537.9615289536426.03847104635847
81555539.7369054454715.2630945545300
82561551.1032978917249.89670210827646
83562558.373847889083.62615211092053
84555559.916687341087-4.91668734108702
85547554.952285380155-7.95228538015494
86565570.448409522877-5.44840952287743
87578587.766687529183-9.76668752918301
88580596.16519726115-16.1651972611503
89569582.915188515253-13.9151885152529
90507524.230714643556-17.2307146435561
91501504.670559185904-3.67055918590432
92509519.633486985815-10.6334869858146
93510525.524007836411-15.5240078364109
94517528.312111493177-11.3121114931769
95519531.757130401344-12.7571304013436
96512528.778488273589-16.7784882735894
97509508.6135028144840.386497185515915
98519528.626814625711-9.62681462571126
99523542.789539065656-19.7895390656563
100525552.809054117011-27.8090541170111
101517539.731959515943-22.7319595159426
102456481.570521989989-25.5705219899894
103455483.511217634988-28.5112176349885
104461495.794105766818-34.7941057668176
105470508.505783612007-38.5057836120067
106475518.380856347494-43.3808563474944
107476524.970589293778-48.9705892937783
108471520.213161141308-49.2131611413081
109471508.108156393663-37.1081563936626
110503515.572394921632-12.5723949216321
111513521.516489231871-8.51648923187136
112510519.782300220162-9.78230022016174
113484509.862471784623-25.8624717846234
114431455.061890977824-24.0618909778235
115436450.845834997091-14.8458349970905
116443454.782988702680-11.7829887026795
117448456.68805080313-8.68805080312973
118460468.692031764248-8.69203176424809
119467476.265181515055-9.26518151505454
120460478.024163648098-18.0241636480982
121464477.101435457391-13.1014354573914
122485497.37626544149-12.3762654414904
123501520.754867185788-19.7548671857878
124521535.28075520407-14.2807552040695
125488511.094445104812-23.0944451048115
126439468.535175203644-29.5351752036440
127442474.174322467964-32.1743224679637
128457492.413387340448-35.413387340448
129462504.98198356335-42.9819835633503
130481517.422978154257-36.4229781542568
131493518.075986537309-25.0759865373086


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
180.009947051019505920.01989410203901180.990052948980494
190.001602876551459390.003205753102918780.99839712344854
200.0002586736886116950.0005173473772233890.999741326311388
210.0001116280639488440.0002232561278976870.999888371936051
221.75423850796910e-053.50847701593819e-050.99998245761492
233.34397760895665e-066.6879552179133e-060.99999665602239
241.00969441555952e-062.01938883111904e-060.999998990305584
256.56872933293935e-050.0001313745866587870.99993431270667
265.38985167249932e-050.0001077970334499860.999946101483275
271.54299893932485e-053.0859978786497e-050.999984570010607
284.17410085653644e-068.34820171307288e-060.999995825899143
291.11001765800863e-062.22003531601727e-060.999998889982342
303.15879542261611e-076.31759084523222e-070.999999684120458
319.95566828827405e-081.99113365765481e-070.999999900443317
322.35291501384831e-084.70583002769662e-080.99999997647085
338.237999721536e-091.64759994430720e-080.999999991762
341.86433916495203e-093.72867832990407e-090.99999999813566
356.0393950744425e-101.2078790148885e-090.99999999939606
361.57469082189825e-103.1493816437965e-100.99999999984253
373.14637962169766e-106.29275924339533e-100.999999999685362
383.40514633626478e-106.81029267252956e-100.999999999659485
391.80250517668283e-103.60501035336567e-100.99999999981975
402.0182888379494e-104.0365776758988e-100.999999999798171
411.02675895381747e-102.05351790763494e-100.999999999897324
424.58078035905893e-119.16156071811786e-110.999999999954192
437.73790184908663e-111.54758036981733e-100.999999999922621
441.10076505366340e-102.20153010732680e-100.999999999889923
451.30987970525167e-102.61975941050333e-100.999999999869012
462.16133166667766e-104.32266333335531e-100.999999999783867
471.66979807146322e-093.33959614292645e-090.999999998330202
482.09403358222569e-084.18806716445138e-080.999999979059664
499.34117366891892e-071.86823473378378e-060.999999065882633
504.9721112399898e-059.9442224799796e-050.9999502788876
510.008729785724048980.01745957144809800.99127021427595
520.05844489482721250.1168897896544250.941555105172788
530.1576867695240340.3153735390480690.842313230475966
540.3781633149406990.7563266298813980.621836685059301
550.635356682077930.7292866358441410.364643317922070
560.7393365606512290.5213268786975430.260663439348772
570.8377697357611150.324460528477770.162230264238885
580.8458863871827250.308227225634550.154113612817275
590.83435181680160.33129636639680.1656481831984
600.8491490008935980.3017019982128040.150850999106402
610.9030052716445870.1939894567108270.0969947283554134
620.9416034077250830.1167931845498340.0583965922749172
630.9710171291150220.05796574176995560.0289828708849778
640.9724138375716620.05517232485667650.0275861624283383
650.9738271977485390.05234560450292260.0261728022514613
660.9787493988350060.04250120232998850.0212506011649943
670.9847147975016860.03057040499662860.0152852024983143
680.9850982970938650.02980340581227050.0149017029061352
690.9853007588481470.02939848230370520.0146992411518526
700.9868900258047570.02621994839048500.0131099741952425
710.989139342534710.02172131493057800.0108606574652890
720.9943298528051480.01134029438970390.00567014719485194
730.9970774133257030.005845173348594020.00292258667429701
740.9980316103993320.003936779201335960.00196838960066798
750.9982864152914030.003427169417194670.00171358470859734
760.9979038350613260.004192329877347970.00209616493867399
770.9975163290504760.004967341899047030.00248367094952352
780.9980891574196850.003821685160630370.00191084258031518
790.9979120936493820.004175812701235490.00208790635061774
800.9981453250056120.003709349988775780.00185467499438789
810.9992356146158360.001528770768328770.000764385384164384
820.9996732629763780.000653474047242910.000326737023621455
830.9998266258631050.000346748273789030.000173374136894515
840.999898347023780.0002033059524388360.000101652976219418
850.9998779278225210.0002441443549569620.000122072177478481
860.999798854315350.0004022913693015110.000201145684650756
870.9997559884937450.000488023012510060.00024401150625503
880.999601513114780.000796973770441330.000398486885220665
890.999622139362880.0007557212742409680.000377860637120484
900.9996874357394140.000625128521172310.000312564260586155
910.9998115808219160.0003768383561688290.000188419178084414
920.9999112186415450.0001775627169094298.87813584547144e-05
930.9999526940925149.46118149728983e-054.73059074864492e-05
940.9999886956876832.26086246346682e-051.13043123173341e-05
950.9999986625488072.67490238673583e-061.33745119336792e-06
960.999999962099887.58002404585737e-083.79001202292868e-08
970.9999999994312471.13750560888758e-095.68752804443788e-10
980.9999999991740591.65188264349067e-098.25941321745335e-10
990.999999996951096.09781974361808e-093.04890987180904e-09
1000.9999999945612471.0877506602907e-085.4387533014535e-09
1010.99999999971035.79400290739179e-102.89700145369589e-10
1020.999999999113271.77346043610738e-098.8673021805369e-10
1030.9999999968968436.20631419256396e-093.10315709628198e-09
1040.9999999851123662.97752683400988e-081.48876341700494e-08
1050.9999999872354152.55291691892619e-081.27645845946309e-08
1060.9999999285350571.42929885703324e-077.14649428516622e-08
1070.9999997077046725.84590656394576e-072.92295328197288e-07
1080.9999984517370783.09652584485626e-061.54826292242813e-06
1090.9999979696112054.06077758956211e-062.03038879478105e-06
1100.9999862752023952.74495952100095e-051.37247976050048e-05
1110.9999351994947750.0001296010104500586.4800505225029e-05
1120.9999137980880380.0001724038239230088.62019119615042e-05
1130.9989150798628350.002169840274328960.00108492013716448


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level730.760416666666667NOK
5% type I error level820.854166666666667NOK
10% type I error level850.885416666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/10barh1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/10barh1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/1witq1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/1witq1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/2witq1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/2witq1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/3witq1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/3witq1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/4p9at1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/4p9at1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/5p9at1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/5p9at1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/6p9at1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/6p9at1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/70i9v1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/70i9v1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/8barh1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/8barh1293397020.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/9barh1293397020.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293396912lhfgwsjavsodzfq/9barh1293397020.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by