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:44:38 +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/t1290869466cro4oybhb4zmzj3.htm/, Retrieved Sat, 27 Nov 2010 15:51:16 +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/t1290869466cro4oybhb4zmzj3.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 «
4831 0 3695 2462 2146 1579 5134 0 4831 3695 2462 2146 6250 0 5134 4831 3695 2462 5760 0 6250 5134 4831 3695 6249 0 5760 6250 5134 4831 2917 0 6249 5760 6250 5134 1741 0 2917 6249 5760 6250 2359 0 1741 2917 6249 5760 1511 1 2359 1741 2917 6249 2059 0 1511 2359 1741 2917 2635 0 2059 1511 2359 1741 2867 0 2635 2059 1511 2359 4403 0 2867 2635 2059 1511 5720 0 4403 2867 2635 2059 4502 0 5720 4403 2867 2635 5749 0 4502 5720 4403 2867 5627 0 5749 4502 5720 4403 2846 0 5627 5749 4502 5720 1762 0 2846 5627 5749 4502 2429 0 1762 2846 5627 5749 1169 0 2429 1762 2846 5627 2154 1 1169 2429 1762 2846 2249 0 2154 1169 2429 1762 2687 0 2249 2154 1169 2429 4359 0 2687 2249 2154 1169 5382 0 4359 2687 2249 2154 4459 0 5382 4359 2687 2249 6398 0 4459 5382 4359 2687 4596 0 6398 4459 5382 4359 3024 0 4596 6398 4459 5382 1887 0 3024 4596 6398 4459 2070 0 1887 3024 4596 6398 1351 0 2070 1887 3024 4596 2218 0 1351 2070 1887 3024 2461 1 2218 1351 2070 1887 3028 0 2461 2218 1351 2070 4784 0 3028 2461 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
Y[t] = + 2965.25393399467 + 528.345055465305X[t] -0.298382874958045Y1[t] + 0.104830390324839Y2[t] + 0.343772803301765Y3[t] + 0.0254522282235195Y4[t] + 1535.27129445461M1[t] + 2367.41761862446M2[t] + 2113.11253810597M3[t] + 2278.58440522865M4[t] + 1628.66643041343M5[t] -900.645928591427M6[t] -3025.6406474945M7[t] -2570.61346255146M8[t] -2393.54530684769M9[t] -1507.04339002879M10[t] -1056.65250730958M11[t] + 1.80202092207090t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2965.25393399467397.591717.45800
X528.345055465305123.2561574.28664.2e-052.1e-05
Y1-0.2983828749580450.092271-3.23380.0016650.000833
Y20.1048303903248390.0913431.14770.2539050.126953
Y30.3437728033017650.091243.76780.0002810.000141
Y40.02545222822351950.0927130.27450.7842590.392129
M11535.27129445461211.5251327.258100
M22367.41761862446320.2630457.392100
M32113.11253810597470.4693394.49151.9e-051e-05
M42278.58440522865580.703043.92380.0001628.1e-05
M51628.66643041343674.1857322.41580.0175550.008778
M6-900.645928591427712.944589-1.26330.2094870.104744
M7-3025.6406474945686.72077-4.40592.7e-051.3e-05
M8-2570.61346255146616.133527-4.17226.5e-053.3e-05
M9-2393.54530684769399.431255-5.992400
M10-1507.04339002879219.894571-6.853500
M11-1056.65250730958188.321523-5.610900
t1.802020922070901.0443261.72550.0875830.043792


Multiple Linear Regression - Regression Statistics
Multiple R0.980496299065626
R-squared0.961372992481389
Adjusted R-squared0.954672389136324
F-TEST (value)143.475586148434
F-TEST (DF numerator)17
F-TEST (DF denominator)98
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation347.035679883005
Sum Squared Residuals11802508.7849622


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
148314435.82045163164395.179548368358
251345183.12534128784-49.1253412878383
362505391.21436457787858.785635422132
457605679.1650743882780.8349256117315
562495427.32433548944821.675664510558
629173093.9003539295-176.900353929499
717411876.13746925713-135.137469257125
823592490.20338449557-131.203384495573
915111756.73261984046-245.732619840460
1020591945.42172017765113.578279822347
1126352327.72440939609307.275590603906
1228672995.96759539216-128.967595392162
1344034691.0023952815-288.002395281504
1457205302.91625076154417.083749238463
1545024912.87819820708-410.878198207081
1657496115.58399482791-366.583994827911
1756275459.54458494618167.455415053817
1828462713.96576449217132.034235507825
1917621805.47040589092-43.470405890918
2024292284.01197930909144.988020690912
2111691191.08729740031-22.0872974003102
2221542610.18821793167-456.188217931672
2322492309.74888687266-60.7488868726552
2426873026.93788051812-339.937880518121
2543594749.82478743464-390.82478743464
2653825188.52153767282193.478462327175
2744594959.03965914486-500.039659144862
2863986094.89863316065303.101366839349
2945965165.69553782146-569.695537821463
3030243087.87259927807-63.872599278065
3118871887.91647631756-0.916476317562584
3220701949.08691639495120.913083605051
3313511367.88511105497-16.8851110549693
3422182059.02971719874158.970282801261
3524612739.46791258723-278.467912587227
3630283045.44340734133-17.4434073413343
3747844718.5582858356665.4417141643435
3849755193.58900688756-218.589006887556
3946075269.28105451498-662.281054514983
4062496184.4789010969764.5210989030287
4148095118.19540107432-309.195401074316
4231573070.8408878201486.15911217986
4319101844.7294602373065.2705397626976
4422282047.22202834694180.777971653060
4515941395.91907430466198.080925695335
4624672036.00205214978430.997947850222
4722222238.82506134197-16.8250613419717
4836073780.387231439-173.387231438997
4946854634.1487084926250.8512915073828
5049625229.62586340987-267.62586340987
5157705477.36744487843292.63255512157
5254805838.42440612594-358.424406125936
5350005484.20500989264-484.20500989264
5432283354.33633088125-126.336330881250
5519931630.43078741707362.569212582929
5622882097.61130043009190.388699569913
5715801437.61051989411142.389480105888
5821112098.4337377614512.5662622385519
5921922387.94489356800-195.944893567997
6036013242.01260877882358.987391221176
6146655060.02395139222-395.023951392222
6248765237.21461228531-361.214612285307
6358135519.72981171666293.27018828334
6455895831.17461056428-242.174610564277
6553315447.73972872261-116.739728722610
6630753301.21570179515-226.215701795149
6720021770.97215892153231.027841078471
6823062217.0741466698688.9258533301374
6915071410.6348013594696.3651986405435
7019922142.9266500356-150.926650035601
7124872443.8410687725943.1589312274148
7234903138.50182074939351.498179250611
7346474574.5816350047172.4183649952922
7455945879.30279905408-285.302799054077
7556115294.57783769523316.422162304771
7657885979.32731483165-191.327314831647
7762045635.18078148784568.819218512163
7830133032.0455442938-19.0455442937992
7919311965.88251674326-34.8825167432633
8025492558.56274835552-9.56274835551595
8115041353.21493753086150.785062469139
8220902164.93392738998-74.9339273899778
8327022517.63898991903184.361010080968
8429393111.40070499850-172.400704998505
8545004816.76676213019-316.766762130185
8662085435.08820327925772.91179672075
8764155461.98340607218953.016593927818
8856575760.85881425316-103.858814253161
8959645987.51184667179-23.5118466717879
9031633403.56990619989-240.569906199886
9119971893.01939714562103.980602854376
9224222490.37857353216-68.3785735321568
9313761465.11000519844-89.110005198444
9422022237.94456612965-35.9445661296484
9526832450.44677007043232.553229929570
9633033103.19988259693199.800117403072
9752024763.03253805132438.967461948678
9852315281.72490450009-50.7249045000937
9948805445.02331257937-565.023312579367
10079986917.019661487751080.98033851225
10149774831.70857369831145.291426301688
10235313412.54791855619118.452081443810
10320252467.07411718163-442.074117181627
10422052262.50559715014-57.5055971501397
10514421655.80563341672-213.805633416722
10622382236.119411225481.88058877451727
10721792394.36200747201-215.362007472007
10832183296.14886818574-78.1488681857402
10951394771.2404847455367.759515254496
11049905140.89148086165-150.891480861647
11149145489.90491061334-575.904910613338
11260846351.06858926342-267.068589263424
11356725871.89420019541-199.894200195409
11435483031.70499275385516.295007246151
11517931899.36721088798-106.367210887977
11620862545.34332531569-459.34332531569


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.9779966899390660.04400662012186760.0220033100609338
220.9671632691904470.06567346161910540.0328367308095527
230.9362983600445440.1274032799109120.063701639955456
240.8948144479278180.2103711041443640.105185552072182
250.8416371084562650.3167257830874710.158362891543735
260.8184236800701230.3631526398597540.181576319929877
270.7959675181746970.4080649636506050.204032481825303
280.8527378836692820.2945242326614360.147262116330718
290.8476619209471590.3046761581056820.152338079052841
300.7904786882721350.419042623455730.209521311727865
310.7927626939175510.4144746121648970.207237306082449
320.810562220245910.3788755595081790.189437779754090
330.7625771500682610.4748456998634780.237422849931739
340.7404200316706860.5191599366586280.259579968329314
350.7288409739753260.5423180520493480.271159026024674
360.7021266669331580.5957466661336830.297873333066842
370.6556958125799260.6886083748401490.344304187420074
380.6062134954044960.7875730091910080.393786504595504
390.68969804841590.62060390316820.3103019515841
400.6406469552698020.7187060894603950.359353044730198
410.6011888973813490.7976222052373010.398811102618651
420.5513795702359050.897240859528190.448620429764095
430.5310982308465400.9378035383069210.468901769153460
440.4971596097657460.9943192195314920.502840390234254
450.4478229997353520.8956459994707040.552177000264648
460.4623786070573660.9247572141147310.537621392942634
470.4003077034453260.8006154068906520.599692296554674
480.3887964401337220.7775928802674440.611203559866278
490.3343150367937490.6686300735874970.665684963206251
500.3154349954504320.6308699909008640.684565004549568
510.2989644468704710.5979288937409420.701035553129529
520.2790354821665610.5580709643331210.72096451783344
530.3450931245020530.6901862490041050.654906875497947
540.3055453162704710.6110906325409430.694454683729529
550.3287635726541280.6575271453082570.671236427345872
560.2897582396999390.5795164793998790.71024176030006
570.2407056514921220.4814113029842450.759294348507878
580.1963658079429240.3927316158858480.803634192057076
590.1718574433734670.3437148867469350.828142556626533
600.1688028883413750.337605776682750.831197111658625
610.23031414103590.46062828207180.7696858589641
620.2252590149265220.4505180298530440.774740985073478
630.209398106128250.41879621225650.79060189387175
640.1953049665207250.390609933041450.804695033479275
650.1677828680983020.3355657361966040.832217131901698
660.1758081557289390.3516163114578780.824191844271061
670.1439560923806090.2879121847612190.85604390761939
680.1116969294953470.2233938589906950.888303070504653
690.08400441956166970.1680088391233390.91599558043833
700.07108333598314260.1421666719662850.928916664016857
710.05375431344730730.1075086268946150.946245686552693
720.04727812390704890.09455624781409780.95272187609295
730.03798867616936220.07597735233872440.962011323830638
740.1334468676631410.2668937353262830.866553132336859
750.1349131619002160.2698263238004330.865086838099784
760.1304880139770860.2609760279541720.869511986022914
770.1928272345951070.3856544691902140.807172765404893
780.1810487968367820.3620975936735640.818951203163218
790.1506537573028720.3013075146057450.849346242697128
800.1187041204957350.237408240991470.881295879504265
810.08651974597805160.1730394919561030.913480254021948
820.07117435421105730.1423487084221150.928825645788943
830.048986346170790.097972692341580.95101365382921
840.0476065573949010.0952131147898020.9523934426051
850.2145049768010040.4290099536020080.785495023198996
860.3042926005618650.608585201123730.695707399438135
870.4787109156092780.9574218312185560.521289084390722
880.7528292178735520.4943415642528960.247170782126448
890.9514175904030740.09716481919385160.0485824095969258
900.9850298747516470.02994025049670600.0149701252483530
910.9784609490267270.04307810194654650.0215390509732733
920.9521428147771960.09571437044560760.0478571852228038
930.9141263785840640.1717472428318720.0858736214159358
940.84987890231840.3002421953632010.150121097681600
950.9503144649019820.09937107019603570.0496855350980178


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


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/1nmiv1290869068.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/1nmiv1290869068.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/285ka1290869069.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/285ka1290869069.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/385ka1290869069.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/385ka1290869069.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/485ka1290869069.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/485ka1290869069.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/585ka1290869069.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/585ka1290869069.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/7bo0g1290869069.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/7bo0g1290869069.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/8bo0g1290869069.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290869466cro4oybhb4zmzj3/8bo0g1290869069.ps (open in new window)


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