Home » date » 2008 » Nov » 27 »

Gilliam Schoorel

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 27 Nov 2008 02:17:07 -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/Nov/27/t1227777511adl6bw44529gdyx.htm/, Retrieved Thu, 27 Nov 2008 09:18:41 +0000
 
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/Nov/27/t1227777511adl6bw44529gdyx.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},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
-3.3 0 -3.5 0 -3.5 0 -8.4 0 -15.7 0 -18.7 0 -22.8 0 -20.7 0 -14 0 -6.3 0 0.7 0 0.2 0 0.8 0 1.2 0 4.5 0 0.4 0 5.9 0 6.5 0 12.8 0 4.2 0 -3.3 0 -12.5 0 -16.3 0 -10.5 0 -11.8 0 -11.4 0 -17.7 0 -17.3 0 -18.6 0 -17.9 0 -21.4 0 -19.4 0 -15.5 0 -7.7 0 -0.7 0 -1.6 0 1.4 0 0.7 0 9.5 0 1.4 0 4.1 0 6.6 0 18.4 0 16.9 0 9.2 0 -4.3 0 -5.9 0 -7.7 0 -5.4 0 -2.3 0 -4.8 0 2.3 0 -5.2 0 -10 0 -17.1 0 -14.4 0 -3.9 0 3.7 0 6.5 0 0.9 0 -4.1 0 -7 0 -12.2 0 -2.5 0 4.4 0 13.7 0 12.3 0 13.4 0 2.2 0 1.7 0 -7.2 0 -4.8 0 -2.9 0 -2.4 0 -2.5 0 -5.3 0 -7.1 0 -8 0 -8.9 1 -7.7 1 -1.1 1 4 1 9.6 1 10.9 1 13 1 14.9 1 20.1 1 10.8 1 11 1 3.8 1 10.8 1 7.6 1 10.2 1 2.2 1 -0.1 1 -1.7 1 -4.8 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 time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Registraties[t] = -8.47257091447925 + 4.60894520382243Dummies[t] + 0.527825756913914M1[t] + 2.16321715298218M2[t] + 2.46075725273174M3[t] + 0.858297352481301M4[t] + 0.430837452230866M5[t] -0.0216224480195812M6[t] + 0.312299501252179M7[t] -0.315160398998258M8[t] + 0.0698797007513081M9[t] -0.407580199499129M10[t] + 0.214959900250429M11[t] + 0.102459900250438t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-8.472570914479253.991445-2.12270.036760.01838
Dummies4.608945203822433.4091891.35190.1800740.090037
M10.5278257569139144.6653850.11310.9101950.455098
M22.163217152982184.8104460.44970.6541050.327053
M32.460757252731744.8088030.51170.6102060.305103
M40.8582973524813014.8076410.17850.8587440.429372
M50.4308374522308664.8069580.08960.9287990.464399
M6-0.02162244801958124.806755-0.00450.9964220.498211
M70.3122995012521794.8027370.0650.948310.474155
M8-0.3151603989982584.800573-0.06570.9478140.473907
M90.06987970075130814.798890.01460.9884170.494208
M10-0.4075801994991294.797687-0.0850.9325030.466251
M110.2149599002504294.7969650.04480.9643650.482183
t0.1024599002504380.0480482.13250.0359240.017962


Multiple Linear Regression - Regression Statistics
Multiple R0.439101265216227
R-squared0.192809921114492
Adjusted R-squared0.0663825593613397
F-TEST (value)1.52506481540721
F-TEST (DF numerator)13
F-TEST (DF denominator)83
p-value0.125646640794542
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation9.5934489512914
Sum Squared Residuals7638.84381082584


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1-3.3-7.842285257314894.54228525731489
2-3.5-6.104433960996182.60443396099618
3-3.5-5.704433960996212.20443396099621
4-8.4-7.2044339609962-1.19556603900380
5-15.7-7.52943396099619-8.17056603900381
6-18.7-7.8794339609962-10.8205660390038
7-22.8-7.44305211147397-15.3569478885260
8-20.7-7.96805211147401-12.731947888526
9-14-7.48055211147401-6.51944788852599
10-6.3-7.8555521114741.55555211147400
110.7-7.130552111473997.83055211147399
120.2-7.243052111473997.44305211147399
130.8-6.612766454309647.41276645430964
141.2-4.874915157990946.07491515799094
154.5-4.474915157990948.97491515799094
160.4-5.974915157990946.37491515799094
175.9-6.2999151579909512.1999151579910
186.5-6.6499151579909413.1499151579909
1912.8-6.2135333084687519.0135333084687
204.2-6.7385333084687510.9385333084687
21-3.3-6.251033308468752.95103330846875
22-12.5-6.62603330846875-5.87396669153125
23-16.3-5.90103330846874-10.3989666915313
24-10.5-6.01353330846874-4.48646669153126
25-11.8-5.38324765130438-6.41675234869562
26-11.4-3.64539635498569-7.75460364501431
27-17.7-3.24539635498568-14.4546036450143
28-17.3-4.74539635498569-12.5546036450143
29-18.6-5.0703963549857-13.5296036450143
30-17.9-5.42039635498569-12.4796036450143
31-21.4-4.98401450546349-16.4159854945365
32-19.4-5.5090145054635-13.8909854945365
33-15.5-5.02151450546349-10.4784854945365
34-7.7-5.39651450546349-2.30348549453651
35-0.7-4.671514505463493.97151450546349
36-1.6-4.784014505463483.18401450546348
371.4-4.153728848299135.55372884829913
380.7-2.415877551980433.11587755198043
399.5-2.0158775519804311.5158775519804
401.4-3.515877551980434.91587755198043
414.1-3.840877551980447.94087755198044
426.6-4.1908775519804310.7908775519804
4318.4-3.7544957024582322.1544957024582
4416.9-4.2794957024582321.1794957024582
459.2-3.7919957024582412.9919957024582
46-4.3-4.16699570245823-0.133004297541769
47-5.9-3.44199570245823-2.45800429754177
48-7.7-3.55449570245823-4.14550429754177
49-5.4-2.92421004529387-2.47578995470613
50-2.3-1.18635874897518-1.11364125102482
51-4.8-0.786358748975176-4.01364125102482
522.3-2.286358748975184.58635874897518
53-5.2-2.61135874897518-2.58864125102482
54-10-2.96135874897518-7.03864125102482
55-17.1-2.52497689945298-14.5750231005470
56-14.4-3.04997689945298-11.3500231005470
57-3.9-2.56247689945298-1.33752310054702
583.7-2.937476899452986.63747689945298
596.5-2.212476899452988.71247689945298
600.9-2.324976899452973.22497689945297
61-4.1-1.69469124228862-2.40530875771138
62-70.0431600540300785-7.04316005403008
63-12.20.443160054030082-12.6431600540301
64-2.5-1.05683994596992-1.44316005403008
654.4-1.381839945969935.78183994596993
6613.7-1.7318399459699215.4318399459699
6712.3-1.2954580964477213.5954580964477
6813.4-1.8204580964477215.2204580964477
692.2-1.332958096447733.53295809644773
701.7-1.707958096447723.40795809644772
71-7.2-0.982958096447725-6.21704190355227
72-4.8-1.09545809644772-3.70454190355228
73-2.9-0.46517243928336-2.43482756071664
74-2.41.27267885703533-3.67267885703533
75-2.51.67267885703533-4.17267885703533
76-5.30.172678857035332-5.47267885703533
77-7.1-0.152321142964672-6.94767885703533
78-8-0.502321142964665-7.49767885703533
79-8.94.54300591037996-13.4430059103800
80-7.74.01800591037996-11.7180059103800
81-1.14.50550591037996-5.60550591037996
8244.13050591037996-0.13050591037996
839.64.855505910379964.74449408962004
8410.94.743005910379976.15699408962003
85135.373291567544327.62670843245568
8614.97.111142863863017.78885713613699
8720.17.5111428638630212.588857136137
8810.86.011142863863024.78885713613699
89115.686142863863015.31385713613699
903.85.33614286386302-1.53614286386302
9110.85.772524713385215.02747528661479
927.65.247524713385212.35247528661479
9310.25.735024713385214.46497528661479
942.25.36002471338522-3.16002471338521
95-0.16.08502471338521-6.18502471338521
96-1.75.97252471338522-7.67252471338522
97-4.86.60281037054957-11.4028103705496


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.2104308009998110.4208616019996230.789569199000189
180.2926392377053330.5852784754106660.707360762294667
190.5639715761658690.8720568476682620.436028423834131
200.4995513671129330.9991027342258660.500448632887067
210.3996856426499980.7993712852999970.600314357350002
220.5409001432427730.9181997135144550.459099856757227
230.7851484875552840.4297030248894320.214851512444716
240.8210124566021120.3579750867957760.178987543397888
250.8782574525667720.2434850948664550.121742547433228
260.8904428456462230.2191143087075540.109557154353777
270.9310747158437530.1378505683124930.0689252841562465
280.9344222938621730.1311554122756540.0655777061378271
290.9385150132060290.1229699735879420.0614849867939712
300.9375682457674230.1248635084651540.062431754232577
310.954863577138450.09027284572310230.0451364228615512
320.96202628575240.07594742849520090.0379737142476005
330.9632319907790370.0735360184419260.036768009220963
340.9539471456094150.09210570878116920.0460528543905846
350.9432032069376950.1135935861246100.0567967930623049
360.9239779455440720.1520441089118570.0760220544559283
370.9064979982951640.1870040034096720.0935020017048362
380.8818162203863160.2363675592273680.118183779613684
390.8914859014883820.2170281970232350.108514098511618
400.869409153492620.2611816930147600.130590846507380
410.8547653605864810.2904692788270380.145234639413519
420.8518653034684360.2962693930631270.148134696531564
430.9434223350408070.1131553299183860.056577664959193
440.9806823199557640.03863536008847160.0193176800442358
450.9835164032797870.0329671934404260.016483596720213
460.975147340682410.04970531863517860.0248526593175893
470.9652730229773020.06945395404539640.0347269770226982
480.954990576262170.09001884747566030.0450094237378302
490.9407934450627210.1184131098745570.0592065549372786
500.9194473228249020.1611053543501960.0805526771750982
510.8978528246861550.204294350627690.102147175313845
520.869151505080740.2616969898385190.130848494919260
530.8335756841195220.3328486317609570.166424315880478
540.8188570978321470.3622858043357060.181142902167853
550.8730798733581840.2538402532836320.126920126641816
560.8969596827664560.2060806344670880.103040317233544
570.8672677225980670.2654645548038660.132732277401933
580.8332552937437370.3334894125125270.166744706256263
590.8104171078698480.3791657842603040.189582892130152
600.7589389544754790.4821220910490420.241061045524521
610.7027680424663110.5944639150673780.297231957533689
620.6856456146391150.6287087707217710.314354385360885
630.7768536353724870.4462927292550260.223146364627513
640.7272121668917460.5455756662165090.272787833108254
650.6645428965902640.6709142068194720.335457103409736
660.7173862416361480.5652275167277030.282613758363852
670.7935768132771750.4128463734456490.206423186722825
680.916338878406320.1673222431873620.0836611215936808
690.899915722336940.2001685553261210.100084277663060
700.8962406848148070.2075186303703850.103759315185193
710.8527406147243480.2945187705513030.147259385275652
720.8030824998459880.3938350003080250.196917500154012
730.7726053297975790.4547893404048430.227394670202421
740.6861791403054260.6276417193891480.313820859694574
750.6037647746441790.7924704507116430.396235225355821
760.4936613551176390.9873227102352780.506338644882361
770.3890326103959240.7780652207918480.610967389604076
780.2785521139400370.5571042278800740.721447886059963
790.3581608424492090.7163216848984170.641839157550791
800.4646509441623130.9293018883246260.535349055837687


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level30.046875OK
10% type I error level90.140625NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/10k3u61227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/10k3u61227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/14odg1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/14odg1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/2dh4s1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/2dh4s1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/351cn1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/351cn1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/4nblx1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/4nblx1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/51rnc1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/51rnc1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/6ysin1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/6ysin1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/7t4i61227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/7t4i61227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/8hu2y1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/8hu2y1227777421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/99lif1227777421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777511adl6bw44529gdyx/99lif1227777421.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