Home » date » 2010 » Nov » 27 »

*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: Sat, 27 Nov 2010 14:01:36 +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/Nov/27/t12908664437s6gvcih4ehtm18.htm/, Retrieved Sat, 27 Nov 2010 15:00:46 +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/Nov/27/t12908664437s6gvcih4ehtm18.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 «
1579 0 2146 0 2462 0 3695 0 4831 0 5134 0 6250 0 5760 0 6249 0 2917 0 1741 0 2359 0 1511 1 2059 0 2635 0 2867 0 4403 0 5720 0 4502 0 5749 0 5627 0 2846 0 1762 0 2429 0 1169 0 2154 1 2249 0 2687 0 4359 0 5382 0 4459 0 6398 0 4596 0 3024 0 1887 0 2070 0 1351 0 2218 0 2461 1 3028 0 4784 0 4975 0 4607 0 6249 0 4809 0 3157 0 1910 0 2228 0 1594 0 2467 0 2222 0 3607 1 4685 0 4962 0 5770 0 5480 0 5000 0 3228 0 1993 0 2288 0 1580 0 2111 0 2192 0 3601 0 4665 1 4876 0 5813 0 5589 0 5331 0 3075 0 2002 0 2306 0 1507 0 1992 0 2487 0 3490 0 4647 0 5594 1 5611 0 5788 0 6204 0 3013 0 1931 0 2549 0 1504 0 2090 0 2702 0 2939 0 4500 0 6208 0 6415 1 5657 0 5964 0 3163 0 1997 0 2422 0 1376 0 2202 0 2683 0 3303 0 5202 0 5231 0 4880 0 7998 1 4977 0 3531 0 2025 0 2205 0 1442 0 2238 0 2179 0 3218 0 5139 0 4990 0 4914 0 6084 0 5672 1 3548 0 1793 0 2086 0
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 2294.2 + 482.518518518518X[t] -881.151851851853M1[t] -174.751851851852M2[t] + 84.7481481481482M3[t] + 901.048148148148M4[t] + 2379.04814814815M5[t] + 2964.74814814815M6[t] + 2979.64814814815M7[t] + 3732.74814814815M8[t] + 3100.44814814815M9[t] + 856M10[t] -390.1M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2294.2122.10416318.788900
X482.518518518518135.6712923.55650.0005610.000281
M1-881.151851851853173.213511-5.08712e-061e-06
M2-174.751851851852173.213511-1.00890.3153080.157654
M384.7481481481482173.2135110.48930.6256520.312826
M4901.048148148148173.2135115.2021e-060
M52379.04814814815173.21351113.734800
M62964.74814814815173.21351117.116100
M72979.64814814815173.21351117.202200
M83732.74814814815173.21351121.5500
M93100.44814814815173.21351117.899600
M10856172.6813644.95713e-061e-06
M11-390.1172.681364-2.25910.0259060.012953


Multiple Linear Regression - Regression Statistics
Multiple R0.974222552850857
R-squared0.94910958248324
Adjusted R-squared0.943402245939304
F-TEST (value)166.296410799834
F-TEST (DF numerator)12
F-TEST (DF denominator)107
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation386.127267313284
Sum Squared Residuals15953086.5222222


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115791413.04814814815165.951851851848
221462119.4481481481526.5518518518523
324622378.9481481481583.051851851852
436953195.24814814815499.751851851852
548314673.24814814815157.751851851851
651345258.94814814815-124.948148148148
762505273.84814814815976.151851851852
857606026.94814814815-266.948148148147
962495394.64814814815854.351851851852
1029173150.2-233.200000000001
1117411904.1-163.099999999998
1223592294.264.8000000000003
1315111895.56666666667-384.566666666666
1420592119.44814814815-60.4481481481483
1526352378.94814814815256.051851851852
1628673195.24814814815-328.248148148148
1744034673.24814814815-270.248148148148
1857205258.94814814815461.051851851852
1945025273.84814814815-771.848148148148
2057496026.94814814815-277.948148148148
2156275394.64814814815232.351851851852
2228463150.2-304.2
2317621904.1-142.1
2424292294.2134.8
2511691413.04814814815-244.048148148148
2621542601.96666666667-447.966666666666
2722492378.94814814815-129.948148148148
2826873195.24814814815-508.248148148148
2943594673.24814814815-314.248148148148
3053825258.94814814815123.051851851852
3144595273.84814814815-814.848148148148
3263986026.94814814815371.051851851852
3345965394.64814814815-798.648148148148
3430243150.2-126.2
3518871904.1-17.1000000000003
3620702294.2-224.2
3713511413.04814814815-62.0481481481477
3822182119.4481481481598.5518518518517
3924612861.46666666667-400.466666666667
4030283195.24814814815-167.248148148148
4147844673.24814814815110.751851851852
4249755258.94814814815-283.948148148148
4346075273.84814814815-666.848148148148
4462496026.94814814815222.051851851852
4548095394.64814814815-585.648148148148
4631573150.26.80000000000004
4719101904.15.89999999999978
4822282294.2-66.2000000000002
4915941413.04814814815180.951851851852
5024672119.44814814815347.551851851852
5122222378.94814814815-156.948148148148
5236073677.76666666667-70.7666666666671
5346854673.2481481481511.7518518518519
5449625258.94814814815-296.948148148148
5557705273.84814814815496.151851851852
5654806026.94814814815-546.948148148148
5750005394.64814814815-394.648148148148
5832283150.277.7999999999999
5919931904.188.8999999999997
6022882294.2-6.20000000000025
6115801413.04814814815166.951851851852
6221112119.44814814815-8.44814814814824
6321922378.94814814815-186.948148148148
6436013195.24814814815405.751851851852
6546655155.76666666667-490.766666666667
6648765258.94814814815-382.948148148148
6758135273.84814814815539.151851851852
6855896026.94814814815-437.948148148148
6953315394.64814814815-63.6481481481484
7030753150.2-75.1999999999999
7120021904.197.8999999999997
7223062294.211.8
7315071413.0481481481593.9518518518523
7419922119.44814814815-127.448148148148
7524872378.94814814815108.051851851852
7634903195.24814814815294.751851851852
7746474673.24814814815-26.2481481481481
7855945741.46666666667-147.466666666667
7956115273.84814814815337.151851851852
8057886026.94814814815-238.948148148148
8162045394.64814814815809.351851851852
8230133150.2-137.2
8319311904.126.8999999999998
8425492294.2254.8
8515041413.0481481481590.9518518518523
8620902119.44814814815-29.4481481481483
8727022378.94814814815323.051851851852
8829393195.24814814815-256.248148148148
8945004673.24814814815-173.248148148148
9062085258.94814814815949.051851851852
9164155756.36666666667658.633333333334
9256576026.94814814815-369.948148148148
9359645394.64814814815569.351851851852
9431633150.212.8
9519971904.192.8999999999997
9624222294.2127.8
9713761413.04814814815-37.0481481481477
9822022119.4481481481582.5518518518517
9926832378.94814814815304.051851851852
10033033195.24814814815107.751851851852
10152024673.24814814815528.751851851852
10252315258.94814814815-27.9481481481483
10348805273.84814814815-393.848148148148
10479986509.466666666671488.53333333333
10549775394.64814814815-417.648148148148
10635313150.2380.8
10720251904.1120.9
10822052294.2-89.2000000000002
10914421413.0481481481528.9518518518523
11022382119.44814814815118.551851851852
11121792378.94814814815-199.948148148148
11232183195.2481481481522.7518518518518
11351394673.24814814815465.751851851852
11449905258.94814814815-268.948148148148
11549145273.84814814815-359.848148148148
11660846026.9481481481557.0518518518522
11756725877.16666666667-205.166666666666
11835483150.2397.8
11917931904.1-111.1
12020862294.2-208.2


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.5205002324925030.9589995350149940.479499767507497
170.4574568144450050.914913628890010.542543185554995
180.4912861681665360.9825723363330730.508713831833464
190.9745914316242980.05081713675140470.0254085683757023
200.9560078243827290.0879843512345420.043992175617271
210.9528221490406140.09435570191877210.0471778509593861
220.9277334391769230.1445331216461550.0722665608230773
230.8912904136854820.2174191726290370.108709586314518
240.8451397492043560.3097205015912870.154860250795644
250.8160663682580280.3678672634839430.183933631741972
260.7783919782236020.4432160435527960.221608021776398
270.7332358766925630.5335282466148740.266764123307437
280.761499401054560.477001197890880.23850059894544
290.7204121032700930.5591757934598140.279587896729907
300.6564238830998520.6871522338002950.343576116900148
310.8155361004078020.3689277991843950.184463899592198
320.8360082915414660.3279834169170680.163991708458534
330.9642961677729830.07140766445403450.0357038322270172
340.950974629429250.0980507411415010.0490253705707505
350.9324962057399570.1350075885200850.0675037942600426
360.9172716739485640.1654566521028710.0827283260514357
370.8903708703235780.2192582593528430.109629129676422
380.8583561444550530.2832877110898940.141643855544947
390.8448067059517460.3103865880965090.155193294048254
400.8074396632884620.3851206734230760.192560336711538
410.7710881985287910.4578236029424180.228911801471209
420.754726682526740.490546634946520.24527331747326
430.8033405471750740.3933189056498520.196659452824926
440.7752965435726730.4494069128546540.224703456427327
450.8242465981323190.3515068037353630.175753401867681
460.7895434083033360.4209131833933270.210456591696664
470.74498919712620.5100216057476010.255010802873801
480.6952485395507050.6095029208985910.304751460449295
490.649142585294890.701714829410220.35085741470511
500.6259526487830990.7480947024338020.374047351216901
510.5838123408842550.832375318231490.416187659115745
520.5804191180375790.8391617639248420.419580881962421
530.5229820256015290.9540359487969420.477017974398471
540.4945997140067040.9891994280134090.505400285993296
550.5686049207490110.8627901585019780.431395079250989
560.6107125309891070.7785749380217860.389287469010893
570.6043569238623770.7912861522752450.395643076137623
580.5558872989278320.8882254021443360.444112701072168
590.5019623817486490.9960752365027020.498037618251351
600.4435765056744940.8871530113489870.556423494325506
610.3928105577631780.7856211155263550.607189442236822
620.3382603573570190.6765207147140390.66173964264298
630.3039968588865850.607993717773170.696003141113415
640.298193262578580.596386525157160.70180673742142
650.392641157185130.785282314370260.60735884281487
660.3818301481600440.7636602963200880.618169851839956
670.4525794682132940.9051589364265880.547420531786706
680.4682252950288810.9364505900577610.531774704971119
690.4143671064808360.8287342129616720.585632893519164
700.3673783605051860.7347567210103710.632621639494814
710.3156100357875610.6312200715751220.684389964212439
720.2641487579822490.5282975159644970.735851242017751
730.2180565894216460.4361131788432930.781943410578354
740.1829453977791090.3658907955582170.817054602220891
750.1469017742229120.2938035484458230.853098225777088
760.1294991300228470.2589982600456930.870500869977153
770.1070923826137710.2141847652275430.892907617386229
780.1573934850731940.3147869701463890.842606514926806
790.1753336695091550.350667339018310.824666330490845
800.1572773194548650.314554638909730.842722680545135
810.4094996275102220.8189992550204450.590500372489778
820.3855466806086420.7710933612172840.614453319391358
830.3238182722081590.6476365444163190.67618172779184
840.2939061230960320.5878122461920640.706093876903968
850.2400060822740630.4800121645481270.759993917725936
860.192682355023260.385364710046520.80731764497674
870.1666115736266020.3332231472532050.833388426373398
880.1455365153452090.2910730306904190.85446348465479
890.168380447629380.336760895258760.83161955237062
900.4762934922653040.9525869845306070.523706507734696
910.4960896770716550.992179354143310.503910322928345
920.6648116904067290.6703766191865420.335188309593271
930.9800077479344550.0399845041310910.0199922520655455
940.981108022017770.03778395596445980.0188919779822299
950.9674848283472470.06503034330550520.0325151716527526
960.9589422072935310.08211558541293750.0410577927064688
970.9303631798984950.139273640203010.069636820101505
980.8858167222911570.2283665554176870.114183277708843
990.9064917264195310.1870165471609380.0935082735804692
1000.8463547778400990.3072904443198020.153645222159901
1010.7706210859658860.4587578280682290.229378914034114
1020.6850258078699030.6299483842601940.314974192130097
1030.5495832979544950.900833404091010.450416702045505
1040.9755529120212720.04889417595745570.0244470879787279


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level30.0337078651685393OK
10% type I error level100.112359550561798NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/10fd8f1290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/10fd8f1290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/19uc31290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/19uc31290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/29uc31290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/29uc31290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/3klt61290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/3klt61290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/4klt61290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/4klt61290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/5klt61290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/5klt61290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/6cusr1290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/6cusr1290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/754sc1290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/754sc1290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/854sc1290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/854sc1290866485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/954sc1290866485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t12908664437s6gvcih4ehtm18/954sc1290866485.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