Home » date » 2010 » Dec » 21 »

*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: Tue, 21 Dec 2010 16:41:23 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq.htm/, Retrieved Tue, 21 Dec 2010 17:39:27 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq.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 «
320 101 196 324 112 178 343 103 201 295 104 181 301 120 193 367 88 181 196 77 115 182 70 104 342 97 200 361 148 244 333 106 172 330 127 182 345 93 192 323 80 183 365 116 214 323 109 120 316 122 181 358 124 199 235 87 99 169 64 74 430 122 202 409 96 185 407 89 148 341 109 193 326 98 184 374 94 183 364 114 213 349 89 189 300 130 204 385 140 206 304 74 97 196 55 86 443 140 220 414 103 205 325 91 174 388 120 216 356 89 182 386 97 213 444 154 227 387 81 209 327 110 219 448 116 221 225 73 114 182 73 97 460 174 205 411 103 215 342 130 224 361 91 189 377 136 182 331 106 201 428 136 198 340 122 173 352 131 238 461 135 258 221 75 122 198 68 101 422 143 259 329 115 243 320 93 188 375 128 173 364 152 224 351 125 215 380 107 196 319 116 159 322 220 187 386 137 208 221 34 131 187 51 93 343 153 210 342 145 228 365 116 176 313 145 195 356 98 188 337 118 188 389 139 190 326 140 188 343 113 176 357 149 225 220 79 93 218 47 79 391 166 235 425 180 2 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Vl[t] = + 95.3492814718785 + 0.191650587366588Br[t] + 1.21026270515463Wa[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)95.349281471878516.2997795.849700
Br0.1916505873665880.1572151.2190.2255630.112781
Wa1.210262705154630.1223269.893700


Multiple Linear Regression - Regression Statistics
Multiple R0.841400321668874
R-squared0.707954501304484
Adjusted R-squared0.70239172990076
F-TEST (value)127.266509788723
F-TEST (DF numerator)2
F-TEST (DF denominator)105
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation41.3646763682078
Sum Squared Residuals179658.82735989


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1320351.917481006211-31.9174810062108
2324332.24090877446-8.24090877445972
3343358.352095706717-15.3520957067169
4295334.338492190991-39.3384921909909
5301351.928054050712-50.9280540507119
6367331.27208279312635.7279172068745
7196249.286587791888-53.2865877918877
8182234.632143923621-52.6321439236207
9342355.991929477363-13.9919294773627
10361419.017668459862-58.0176684598622
11333323.8294290193339.17057098066752
12330339.956718405577-9.95671840557708
13345345.543225486659-0.543225486659366
14323332.159403504502-9.1594035045021
15365376.576968509493-11.5769685094927
16323261.47072011339261.5292798866083
17316337.78820276359-21.7882027635895
18358359.956232631106-1.95623263110596
19235231.838890383083.16110961692039
20169197.174359244782-28.1743592447824
21430363.20371957183766.7962804281633
22409337.64633831267771.3536616873233
23407291.525064110389115.474935889611
24341349.819897589679-8.8198975896794
25326336.819376782255-10.8193767822553
26374334.84251172763439.1574882723657
27364374.983404629605-10.9834046296049
28349341.1458350217297.85416497827086
29300367.157449681079-67.1574496810786
30385371.49448096505413.5055190349463
31304226.92690733700577.0730926629953
32196209.972656420339-13.9726564203387
33443388.43815883721954.5618411627815
34414363.19314652733550.8068534726646
35325323.3751956191431.62480438085708
36388379.7640962692688.23590373073174
37356332.67399608564723.3260039143532
38386371.72534464437314.2746553556271
39444399.59310599643344.4068940035669
40387363.81788442588923.182115574111
41327381.478378511066-54.4783785110663
42448385.04880744557562.951192554425
43225247.309722737267-22.3097227372668
44182226.735256749638-44.7352567496381
45460376.80033823036383.1996617696369
46411375.29577357888235.7042264211184
47342391.362703784171-49.3627037841711
48361341.52913619646219.4708638035377
49377341.68157369187635.3184263081236
50331358.927047468817-27.9270474688166
51428361.0457769743566.9542230256496
52340328.10610112235311.8938988776475
53352408.498032243702-56.4980322437025
54461433.46988869626127.5301113037386
55221257.375125553237-36.375125553237
56198230.618054633424-32.6180546334237
57422436.213356100349-14.2133561003487
58329411.48293637161-82.4829363716102
59320340.702174666041-20.7021746660409
60375329.25600464655245.743995353448
61364395.579016706236-31.5790167062361
62351379.512086500947-28.5120865009466
63380353.0673845304126.9326154695899
64319310.0125197259888.98748027401178
65322363.831536556443-41.8315365564429
66386373.34005461326312.6599453867368
67221260.409815817599-39.4098158175985
68187217.677893006955-30.6778930069547
69343378.826989421438-35.8269894214379
70342399.078513415288-57.0785134152885
71365330.58698571361734.4130142863831
72313359.139844145186-46.1398441451858
73356341.66042760287414.3395723971262
74337345.493439350206-8.49343935020555
75389351.93862709521337.0613729047869
76326349.70975227227-23.7097522722705
77343330.01203395151712.9879660484829
78357396.214327649291-39.2143276492909
79220223.044109453219-3.04410945321914
80218199.96761278532418.0323872146764
81391411.575014686069-20.5750146860692
82425428.781275371057-3.78127537105692
83332354.731880635754-22.7318806357543
84298359.452213094463-61.4522130944626
85360372.562879219296-12.5628792192956
86336308.10658689682427.8934131031764
87325382.982943162548-57.9829431625477
88393340.41095180576752.5890481942334
89301346.653915918906-45.6539159189064
90426497.897540971282-71.8975409712821
91265277.729300906048-12.7293009060478
92210210.10394782675-0.103947826750139
93429442.509185435995-13.5091854359948
94440405.00910857915134.9908914208486
95357378.564406608615-21.5644066086149
96431421.6509905465419.34900945345935
97442397.52416262735344.4758373726468
98422385.95727424595436.0427257540458
99544476.23353064040967.766469359591
100420391.18162624130628.8183737586942
101396371.99850050169724.0014994983029
102482422.09465090222959.9053490977711
103261306.190081023158-45.1900810231578
104211226.86654815605-15.8665481560496
105448525.371428104108-77.3714281041079
106468413.33908306432154.660916935679
107464408.60068360266355.3993163973373
108425367.49096471935857.509035280642


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.1783671042424640.3567342084849290.821632895757536
70.2648899836669710.5297799673339410.73511001633303
80.1612429034820760.3224858069641530.838757096517924
90.09976684223961850.1995336844792370.900233157760381
100.06185543455716660.1237108691143330.938144565442833
110.1149555490525640.2299110981051290.885044450947436
120.1269098624144160.2538197248288320.873090137585584
130.07989236292469930.1597847258493990.9201076370753
140.04906886021302930.09813772042605850.95093113978697
150.0285118865862140.0570237731724280.971488113413786
160.227367775695160.4547355513903210.77263222430484
170.1698296118038140.3396592236076280.830170388196186
180.1269827344020790.2539654688041580.873017265597921
190.08904759383870920.1780951876774180.91095240616129
200.07097635165970570.1419527033194110.929023648340294
210.1971147438500810.3942294877001630.802885256149918
220.3872272290176260.7744544580352520.612772770982374
230.818604376975140.3627912460497190.18139562302486
240.7708237823274670.4583524353450670.229176217672534
250.7185876059036230.5628247881927530.281412394096377
260.7096108178850580.5807783642298850.290389182114942
270.6530640902359060.6938718195281880.346935909764094
280.5921648453689960.8156703092620070.407835154631004
290.6560353050144020.6879293899711960.343964694985598
300.6148724694048620.7702550611902760.385127530595138
310.7172578553023920.5654842893952160.282742144697608
320.6843340891599930.6313318216800130.315665910840007
330.7330761870149330.5338476259701330.266923812985067
340.7536782013026950.492643597394610.246321798697305
350.7037935866815510.5924128266368980.296206413318449
360.6521073776253190.6957852447493630.347892622374681
370.6103541773308510.7792916453382990.389645822669149
380.557736617507880.8845267649842410.44226338249212
390.5655314936558490.8689370126883030.434468506344151
400.5239108518356290.9521782963287420.476089148164371
410.5657961945779090.8684076108441830.434203805422091
420.6331539542774380.7336920914451240.366846045722562
430.5950405486158480.8099189027683040.404959451384152
440.6002258761484470.7995482477031070.399774123851553
450.7146807812047770.5706384375904470.285319218795223
460.7026583706375080.5946832587249850.297341629362492
470.7326346354306620.5347307291386760.267365364569338
480.6971533352422210.6056933295155590.302846664757779
490.674859961530340.6502800769393210.32514003846966
500.6462939089796920.7074121820406170.353706091020308
510.7101697367113890.5796605265772210.289830263288611
520.6645877319399440.6708245361201120.335412268060056
530.713767955379240.5724640892415190.286232044620759
540.6862630134934560.6274739730130890.313736986506544
550.668777299041030.662445401917940.33122270095897
560.6438389295259130.7123221409481750.356161070474087
570.6009828550374550.7980342899250890.399017144962545
580.7440872995581170.5118254008837650.255912700441883
590.7082726534023950.583454693195210.291727346597605
600.7113108267320870.5773783465358270.288689173267913
610.7038302006095580.5923395987808840.296169799390442
620.6819443140365760.6361113719268480.318055685963424
630.6497589390758870.7004821218482260.350241060924113
640.5980593929229570.8038812141540870.401940607077043
650.620470294138320.759059411723360.37952970586168
660.5693334572664230.8613330854671530.430666542733577
670.5658096004519120.8683807990961760.434190399548088
680.5450373838934650.9099252322130690.454962616106535
690.5319440960602610.9361118078794780.468055903939739
700.5923998952334670.8152002095330650.407600104766533
710.5670127602128930.8659744795742140.432987239787107
720.582384229481320.835231541037360.41761577051868
730.5256266728324810.9487466543350370.474373327167519
740.4700176435973260.9400352871946530.529982356402674
750.4526053089059190.9052106178118380.547394691094081
760.4123361055895340.8246722111790680.587663894410466
770.3556154795991260.7112309591982530.644384520400874
780.3536848518834570.7073697037669140.646315148116543
790.2976108074879440.5952216149758880.702389192512056
800.2484797632045460.4969595264090930.751520236795454
810.2120934030310130.4241868060620270.787906596968987
820.168122828987350.3362456579747010.83187717101265
830.1452185401554820.2904370803109650.854781459844518
840.2044847869583190.4089695739166380.795515213041681
850.1767984032095760.3535968064191520.823201596790424
860.1460586720356210.2921173440712420.853941327964379
870.1767695705648570.3535391411297140.823230429435143
880.186130531880910.372261063761820.81386946811909
890.2049953412584250.4099906825168490.795004658741575
900.4424950449865760.8849900899731520.557504955013424
910.3672814772875650.734562954575130.632718522712435
920.2949504418100130.5899008836200260.705049558189987
930.2351186323041880.4702372646083750.764881367695812
940.1862154683227830.3724309366455650.813784531677217
950.1771105204623840.3542210409247680.822889479537616
960.1260039913183280.2520079826366560.873996008681672
970.08956454724595540.1791290944919110.910435452754045
980.06013852264730530.1202770452946110.939861477352695
990.06316149791391510.126322995827830.936838502086085
1000.03759598609109680.07519197218219360.962404013908903
1010.01989144721793270.03978289443586540.980108552782067
1020.01779680761669180.03559361523338360.982203192383308


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0206185567010309OK
10% type I error level50.0515463917525773OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/10nc4z1292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/10nc4z1292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/1yt651292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/1yt651292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/292o81292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/292o81292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/392o81292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/392o81292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/492o81292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/492o81292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/592o81292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/592o81292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/62u5t1292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/62u5t1292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/7dlmw1292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/7dlmw1292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/8dlmw1292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/8dlmw1292949673.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/9dlmw1292949673.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292949564ofl41eif4goe3sq/9dlmw1292949673.ps (open in new window)


 
Parameters (Session):
par2 = blue ; par3 = FALSE ; par4 = Unknown ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = Unknown ;
 
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