Home » date » 2008 » Dec » 18 »

seasonal dummies en trend

*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: Thu, 18 Dec 2008 07:02:11 -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/18/t12296089830dg2pei2tgt16os.htm/, Retrieved Thu, 18 Dec 2008 15:03:03 +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/18/t12296089830dg2pei2tgt16os.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 «
19 0 23 0 22 0 23 0 25 0 25 0 23 0 22 0 21 0 16 0 21 0 21 0 26 0 23 0 22 0 22 0 22 0 12 0 20 0 18 0 23 0 25 0 28 0 28 0 29 0 31 0 33 0 32 0 33 0 35 0 33 0 36 0 30 0 34 0 34 0 35 0 33 0 28 0 27 0 23 0 23 0 24 0 24 0 20 0 16 1 6 1 2 1 12 1 19 1 21 1 22 1 20 1 21 1 20 1 19 1 17 1 17 1 17 1 16 1 12 1 11 1 7 1 2 1 9 1 11 1 10 1 7 1 9 1 15 1 5 1 14 1 14 1 17 1 19 1 17 1 16 1 14 1 20 1 16 1 18 1 18 1 14 1 13 1 14 1 14 1 17 1 18 1 15 1 9 1 9 1 9 1 10 1 6 1 12 1 11 1 15 1 19 1 18 1 15 1 16 1 14 1 18 1 18 1 18 1 18 1 22 1 21 1 12 1 19 1 21 1 19 1 22 1 22 1 21 1 19 1 18 1 18 1 19 1 12 1 16 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Vertrouwen[t] = + 23.0000724637681 -15.9155797101449Aanslag[t] + 2.11524758454106M1[t] + 2.22371980676329M2[t] + 1.03219202898551M3[t] + 1.04066425120773M4[t] + 0.549136473429953M5[t] + 0.457608695652175M6[t] -0.233919082125603M7[t] -0.525446859903381M8[t] + 0.574583333333334M9[t] -0.716944444444444M10[t] -0.608472222222221M11[t] + 0.0915277777777778t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)23.00007246376811.82991212.568900
Aanslag-15.91557971014491.747644-9.106900
M12.115247584541062.2656080.93360.3526150.176307
M22.223719806763292.2644330.9820.3283260.164163
M31.032192028985512.2635190.4560.6493140.324657
M41.040664251207732.2628660.45990.6465390.323269
M50.5491364734299532.2624740.24270.8086950.404348
M60.4576086956521752.2623430.20230.8400920.420046
M7-0.2339190821256032.262474-0.10340.9178480.458924
M8-0.5254468599033812.262866-0.23220.8168270.408414
M90.5745833333333342.2614740.25410.799930.399965
M10-0.7169444444444442.26082-0.31710.7517790.375889
M11-0.6084722222222212.260428-0.26920.7883110.394155
t0.09152777777777780.0243173.7640.0002750.000137


Multiple Linear Regression - Regression Statistics
Multiple R0.752083013113572
R-squared0.56562885861399
Adjusted R-squared0.512356926179857
F-TEST (value)10.6177649799610
F-TEST (DF numerator)13
F-TEST (DF denominator)106
p-value4.42978986825437e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.05417759584665
Sum Squared Residuals2707.73938405797


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11925.206847826087-6.20684782608699
22325.4068478260870-2.40684782608696
32224.3068478260870-2.30684782608696
42324.4068478260870-1.40684782608696
52524.00684782608700.993152173913045
62524.00684782608700.993152173913044
72323.4068478260870-0.406847826086955
82223.2068478260870-1.20684782608695
92124.3984057971014-3.39840579710145
101623.1984057971014-7.19840579710145
112123.3984057971014-2.39840579710145
122124.0984057971014-3.09840579710144
132626.3051811594203-0.305181159420285
142326.5051811594203-3.50518115942029
152225.4051811594203-3.40518115942029
162225.5051811594203-3.50518115942029
172225.1051811594203-3.10518115942029
181225.1051811594203-13.1051811594203
192024.5051811594203-4.50518115942029
201824.3051811594203-6.30518115942029
212325.4967391304348-2.49673913043478
222524.29673913043480.703260869565216
232824.49673913043483.50326086956522
242825.19673913043482.80326086956522
252927.40351449275361.59648550724638
263127.60351449275363.39648550724638
273326.50351449275366.49648550724638
283226.60351449275365.39648550724638
293326.20351449275366.79648550724638
303526.20351449275368.79648550724638
313325.60351449275367.39648550724638
323625.403514492753610.5964855072464
333026.59507246376813.40492753623188
343425.39507246376818.60492753623188
353425.59507246376818.40492753623188
363526.29507246376818.70492753623188
373328.50184782608704.49815217391305
382828.7018478260870-0.701847826086957
392727.6018478260870-0.601847826086956
402327.7018478260870-4.70184782608696
412327.3018478260870-4.30184782608696
422427.3018478260870-3.30184782608696
432426.7018478260870-2.70184782608696
442026.5018478260870-6.50184782608696
451611.77782608695654.22217391304348
46610.5778260869565-4.57782608695652
47210.7778260869565-8.77782608695652
481211.47782608695650.52217391304348
491913.68460144927545.31539855072464
502113.88460144927547.11539855072464
512212.78460144927549.21539855072464
522012.88460144927547.11539855072464
532112.48460144927548.51539855072464
542012.48460144927547.51539855072464
551911.88460144927547.11539855072464
561711.68460144927545.31539855072464
571712.87615942028994.12384057971015
581711.67615942028995.32384057971015
591611.87615942028994.12384057971015
601212.5761594202899-0.576159420289854
611114.7829347826087-3.78293478260869
62714.9829347826087-7.9829347826087
63213.8829347826087-11.8829347826087
64913.9829347826087-4.98293478260869
651113.5829347826087-2.58293478260870
661013.5829347826087-3.58293478260869
67712.9829347826087-5.9829347826087
68912.7829347826087-3.78293478260869
691513.97449275362321.02550724637681
70512.7744927536232-7.77449275362319
711412.97449275362321.02550724637681
721413.67449275362320.325507246376813
731715.88126811594201.11873188405798
741916.08126811594202.91873188405797
751714.98126811594202.01873188405797
761615.08126811594200.918731884057971
771414.6812681159420-0.681268115942029
782014.68126811594205.31873188405797
791614.08126811594201.91873188405797
801813.88126811594204.11873188405797
811815.07282608695652.92717391304348
821413.87282608695650.127173913043478
831314.0728260869565-1.07282608695652
841414.7728260869565-0.772826086956521
851416.9796014492754-2.97960144927536
861717.1796014492754-0.179601449275363
871816.07960144927541.92039855072464
881516.1796014492754-1.17960144927536
89915.7796014492754-6.77960144927536
90915.7796014492754-6.77960144927536
91915.1796014492754-6.17960144927536
921014.9796014492754-4.97960144927536
93616.1711594202899-10.1711594202899
941214.9711594202899-2.97115942028986
951115.1711594202899-4.17115942028986
961515.8711594202899-0.871159420289855
971918.07793478260870.922065217391308
981818.2779347826087-0.277934782608697
991517.1779347826087-2.17793478260870
1001617.2779347826087-1.27793478260870
1011416.8779347826087-2.8779347826087
1021816.87793478260871.12206521739130
1031816.27793478260871.72206521739130
1041816.07793478260871.92206521739130
1051817.26949275362320.730507246376809
1062216.06949275362325.93050724637681
1072116.26949275362324.73050724637681
1081216.9694927536232-4.96949275362319
1091919.1762681159420-0.176268115942026
1102119.37626811594201.62373188405797
1111918.27626811594200.72373188405797
1122218.37626811594203.62373188405797
1132217.97626811594204.02373188405797
1142117.97626811594203.02373188405797
1151917.37626811594201.62373188405797
1161817.17626811594200.823731884057968
1171818.3678260869565-0.367826086956524
1181917.16782608695651.83217391304348
1191217.3678260869565-5.36782608695652
1201618.0678260869565-2.06782608695652


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.2100495318205820.4200990636411640.789950468179418
180.6192178555652130.7615642888695740.380782144434787
190.4911151577747510.9822303155495020.508884842225249
200.3923647668204060.7847295336408110.607635233179594
210.323840967763760.647681935527520.67615903223624
220.4547941816020900.9095883632041790.54520581839791
230.4570528048023830.9141056096047670.542947195197617
240.4403573674368460.8807147348736920.559642632563154
250.4048466458748020.8096932917496040.595153354125198
260.3806362505238460.7612725010476920.619363749476154
270.4132123865888370.8264247731776730.586787613411163
280.3815251929803820.7630503859607640.618474807019618
290.3480844252355810.6961688504711610.651915574764419
300.4855689216759090.9711378433518190.514431078324091
310.4619090670242290.9238181340484580.538090932975771
320.5531143260549480.8937713478901040.446885673945052
330.4810464944338610.9620929888677220.518953505566139
340.4940962973516240.9881925947032490.505903702648376
350.4847135818631460.9694271637262920.515286418136854
360.5055325008319240.9889349983361530.494467499168076
370.4858571529081490.9717143058162970.514142847091851
380.5346292339441650.930741532111670.465370766055835
390.5862727434135490.8274545131729010.413727256586451
400.6995486371719620.6009027256560750.300451362828038
410.7824941168897050.4350117662205890.217505883110295
420.7788547106458050.442290578708390.221145289354195
430.788918921970340.4221621560593200.211081078029660
440.8366053234803680.3267893530392640.163394676519632
450.8016431932583520.3967136134832970.198356806741648
460.8154930480675410.3690139038649170.184506951932459
470.8804784840687010.2390430318625980.119521515931299
480.848575683354240.3028486332915180.151424316645759
490.8550514361886560.2898971276226880.144948563811344
500.8769337057877930.2461325884244140.123066294212207
510.917791832835570.1644163343288610.0822081671644307
520.9252939947033660.1494120105932690.0747060052966343
530.9471428136328870.1057143727342270.0528571863671133
540.9559183251214730.08816334975705340.0440816748785267
550.9653946805199920.06921063896001670.0346053194800083
560.9651016164132150.06979676717356980.0348983835867849
570.9645692035438350.07086159291232970.0354307964561649
580.9682654588213560.06346908235728820.0317345411786441
590.970756313840250.05848737231949840.0292436861597492
600.9706583084461810.05868338310763730.0293416915538187
610.9729267085375660.05414658292486790.0270732914624339
620.9877494103095760.02450117938084810.0122505896904241
630.998685112196880.002629775606239720.00131488780311986
640.9987458036281860.002508392743627420.00125419637181371
650.9982883820966140.003423235806772820.00171161790338641
660.9978627577962620.004274484407476710.00213724220373835
670.9981698210796020.00366035784079640.0018301789203982
680.9977682799084670.004463440183065180.00223172009153259
690.9968705602452560.00625887950948810.00312943975474405
700.9987199532607120.002560093478575170.00128004673928759
710.9980627789317040.003874442136591450.00193722106829572
720.9971938649587040.005612270082591710.00280613504129585
730.9957260657574230.008547868485154680.00427393424257734
740.9940559942420730.01188801151585350.00594400575792674
750.991383632682870.01723273463425900.00861636731712948
760.9869036959287910.02619260814241720.0130963040712086
770.9814789352427270.03704212951454500.0185210647572725
780.985976824048360.02804635190328130.0140231759516407
790.9832178439363450.03356431212730910.0167821560636545
800.9864438258233230.02711234835335390.0135561741766769
810.9935585031265770.01288299374684690.00644149687342345
820.9899737701495270.02005245970094650.0100262298504733
830.9880195234594330.02396095308113430.0119804765405672
840.9896806797030930.02063864059381430.0103193202969071
850.9839718716987180.03205625660256350.0160281283012818
860.9767665924444180.0464668151111650.0232334075555825
870.9796509559332130.04069808813357350.0203490440667868
880.9691001769455060.06179964610898770.0308998230544939
890.9633419244046230.07331615119075390.0366580755953769
900.9639157242844730.07216855143105390.0360842757155269
910.9607550361562560.07848992768748880.0392449638437444
920.9498623750937350.1002752498125310.0501376249062655
930.9785114081531440.04297718369371150.0214885918468558
940.9811963842612460.03760723147750890.0188036157387545
950.9746723535084080.0506552929831850.0253276464915925
960.9607384979218750.07852300415624920.0392615020781246
970.9324939129725520.1350121740548950.0675060870274477
980.8881507817423270.2236984365153450.111849218257673
990.8319461138744960.3361077722510080.168053886125504
1000.7970338859291160.4059322281417680.202966114070884
1010.8494022081649580.3011955836700840.150597791835042
1020.7825592386550.4348815226899990.217440761344999
1030.6480469164681740.7039061670636520.351953083531826


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level110.126436781609195NOK
5% type I error level280.32183908045977NOK
10% type I error level420.482758620689655NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/1058it1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/1058it1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/1ew3u1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/1ew3u1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/24gid1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/24gid1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/3bklt1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/3bklt1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/4m03h1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/4m03h1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/5c2p21229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/5c2p21229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/6l4cz1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/6l4cz1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/7a7ni1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/7a7ni1229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/8mv281229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/8mv281229608918.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/9h8ee1229608918.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t12296089830dg2pei2tgt16os/9h8ee1229608918.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by