Home » date » 2008 » Nov » 27 »

ds

*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 05:42:10 -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/t1227789867li91lqdxcdw2sky.htm/, Retrieved Thu, 27 Nov 2008 12:44:37 +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/t1227789867li91lqdxcdw2sky.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 «
7.5 0 7.2 0 6.9 0 6.7 0 6.4 0 6.3 0 6.8 0 7.3 0 7.1 0 7.1 0 6.8 0 6.5 0 6.3 0 6.1 0 6.1 0 6.3 0 6.3 0 6 0 6.2 0 6.4 0 6.8 0 7.5 0 7.5 0 7.6 0 7.6 0 7.4 0 7.3 0 7.1 0 6.9 0 6.8 0 7.5 0 7.6 0 7.8 0 8.0 0 8.1 0 8.2 0 8.3 0 8.2 0 8.0 0 7.9 0 7.6 0 7.6 0 8.2 0 8.3 0 8.4 0 8.4 0 8.4 0 8.6 0 8.9 0 8.8 0 8.3 0 7.5 0 7.2 0 7.5 0 8.8 0 9.3 0 9.3 0 8.7 1 8.2 1 8.3 1 8.5 1 8.6 1 8.6 1 8.2 1 8.1 1 8.0 1 8.6 1 8.7 1 8.8 1 8.5 1 8.4 1 8.5 1 8.7 1 8.7 1 8.6 1 8.5 1 8.3 1 8.1 1 8.2 1 8.1 1 8.1 1 7.9 1 7.9 1 7.9 1 8.0 1 8.0 1 7.9 1 8.0 1 7.7 1 7.2 1 7.5 1 7.3 1 7.0 1 7.0 1 7.0 1 7.2 1 7.3 1 7.1 1 6.8 1 6.6 1 6.2 1 6.2 1 6.8 1 6.9 1 6.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
w[t] = + 7.46491228070175 + 0.372587719298245d[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.464912280701750.1058270.543700
d0.3725877192982450.1565092.38060.0191220.009561


Multiple Linear Regression - Regression Statistics
Multiple R0.228369753763038
R-squared0.0521527444337905
Adjusted R-squared0.0429503438943127
F-TEST (value)5.6672978110503
F-TEST (DF numerator)1
F-TEST (DF denominator)103
p-value0.0191224707430224
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.798921144883387
Sum Squared Residuals65.7423245614035


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
17.57.464912280701740.0350877192982603
27.27.46491228070176-0.264912280701755
36.97.46491228070176-0.564912280701754
46.77.46491228070176-0.764912280701755
56.47.46491228070176-1.06491228070175
66.37.46491228070176-1.16491228070175
76.87.46491228070176-0.664912280701755
87.37.46491228070175-0.164912280701755
97.17.46491228070175-0.364912280701755
107.17.46491228070175-0.364912280701755
116.87.46491228070176-0.664912280701755
126.57.46491228070176-0.964912280701755
136.37.46491228070176-1.16491228070175
146.17.46491228070176-1.36491228070176
156.17.46491228070176-1.36491228070176
166.37.46491228070176-1.16491228070175
176.37.46491228070176-1.16491228070175
1867.46491228070176-1.46491228070175
196.27.46491228070176-1.26491228070175
206.47.46491228070176-1.06491228070175
216.87.46491228070176-0.664912280701755
227.57.464912280701750.0350877192982453
237.57.464912280701750.0350877192982453
247.67.464912280701750.135087719298245
257.67.464912280701750.135087719298245
267.47.46491228070175-0.0649122807017544
277.37.46491228070175-0.164912280701755
287.17.46491228070175-0.364912280701755
296.97.46491228070176-0.564912280701754
306.87.46491228070176-0.664912280701755
317.57.464912280701750.0350877192982453
327.67.464912280701750.135087719298245
337.87.464912280701750.335087719298245
3487.464912280701760.535087719298245
358.17.464912280701760.635087719298245
368.27.464912280701760.735087719298245
378.37.464912280701760.835087719298246
388.27.464912280701760.735087719298245
3987.464912280701760.535087719298245
407.97.464912280701750.435087719298246
417.67.464912280701750.135087719298245
427.67.464912280701750.135087719298245
438.27.464912280701760.735087719298245
448.37.464912280701760.835087719298246
458.47.464912280701760.935087719298246
468.47.464912280701760.935087719298246
478.47.464912280701760.935087719298246
488.67.464912280701761.13508771929824
498.97.464912280701761.43508771929825
508.87.464912280701761.33508771929825
518.37.464912280701760.835087719298246
527.57.464912280701750.0350877192982453
537.27.46491228070175-0.264912280701754
547.57.464912280701750.0350877192982453
558.87.464912280701761.33508771929825
569.37.464912280701761.83508771929825
579.37.464912280701761.83508771929825
588.77.83750.8625
598.27.83750.362499999999999
608.37.83750.462500000000001
618.57.83750.6625
628.67.83750.7625
638.67.83750.7625
648.27.83750.362499999999999
658.17.83750.262500000000000
6687.83750.1625
678.67.83750.7625
688.77.83750.8625
698.87.83750.9625
708.57.83750.6625
718.47.83750.5625
728.57.83750.6625
738.77.83750.8625
748.77.83750.8625
758.67.83750.7625
768.57.83750.6625
778.37.83750.462500000000001
788.17.83750.262500000000000
798.27.83750.362499999999999
808.17.83750.262500000000000
818.17.83750.262500000000000
827.97.83750.0625000000000003
837.97.83750.0625000000000003
847.97.83750.0625000000000003
8587.83750.1625
8687.83750.1625
877.97.83750.0625000000000003
8887.83750.1625
897.77.8375-0.137500000000000
907.27.8375-0.6375
917.57.8375-0.3375
927.37.8375-0.5375
9377.8375-0.8375
9477.8375-0.8375
9577.8375-0.8375
967.27.8375-0.6375
977.37.8375-0.5375
987.17.8375-0.7375
996.87.8375-1.0375
1006.67.8375-1.2375
1016.27.8375-1.6375
1026.27.8375-1.6375
1036.87.8375-1.0375
1046.97.8375-0.9375
1056.87.8375-1.0375


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.2299063739282570.4598127478565140.770093626071743
60.2060313779635580.4120627559271170.793968622036441
70.1098382014900880.2196764029801760.890161798509912
80.0788841557854350.157768311570870.921115844214565
90.04258097122402770.08516194244805540.957419028775972
100.02184584352898460.04369168705796930.978154156471015
110.01063099173337900.02126198346675790.989369008266621
120.007831244697973720.01566248939594740.992168755302026
130.008883286258185280.01776657251637060.991116713741815
140.01515316536492760.03030633072985520.984846834635072
150.02132011067751310.04264022135502630.978679889322487
160.01912302152838450.03824604305676910.980876978471615
170.01725164378291910.03450328756583830.98274835621708
180.0276398043024030.0552796086048060.972360195697597
190.03001993050435690.06003986100871390.969980069495643
200.02642481574716360.05284963149432720.973575184252836
210.02049681180123010.04099362360246030.97950318819877
220.03462512402982290.06925024805964590.965374875970177
230.04875357216320750.0975071443264150.951246427836792
240.06955750282771950.1391150056554390.93044249717228
250.08825957578742360.1765191515748470.911740424212576
260.08818503266751480.1763700653350300.911814967332485
270.08199040751598790.1639808150319760.918009592484012
280.0719718086279480.1439436172558960.928028191372052
290.0654039106124140.1308078212248280.934596089387586
300.06418681658830240.1283736331766050.935813183411698
310.07017481460628480.1403496292125700.929825185393715
320.08054171632420380.1610834326484080.919458283675796
330.1045770430316710.2091540860633430.895422956968329
340.1500230586247650.3000461172495310.849976941375235
350.2091054079050260.4182108158100520.790894592094974
360.281678555618110.563357111236220.71832144438189
370.3658782034073300.7317564068146590.63412179659267
380.4178145169929070.8356290339858140.582185483007093
390.4304397740162920.8608795480325840.569560225983708
400.4281947521567250.856389504313450.571805247843275
410.4109615198457280.8219230396914560.589038480154272
420.3967257937120110.7934515874240230.603274206287989
430.4216956668499940.8433913336999880.578304333150006
440.4528333919617700.9056667839235410.54716660803823
450.4899397354243340.9798794708486680.510060264575666
460.5179712556318020.9640574887363950.482028744368198
470.5381625725218410.9236748549563190.461837427478159
480.5789493915903870.8421012168192270.421050608409613
490.6606206252859450.678758749428110.339379374714055
500.7099059408254010.5801881183491980.290094059174599
510.6949639274033540.6100721451932920.305036072596646
520.6756670667255260.6486658665489480.324332933274474
530.7100009728373970.5799980543252060.289999027162603
540.7536160155860920.4927679688278160.246383984413908
550.7822863031218620.4354273937562750.217713696878138
560.8374838307089170.3250323385821660.162516169291083
570.873704523951190.2525909520976190.126295476048810
580.866174094608140.2676518107837180.133825905391859
590.8404571406807210.3190857186385580.159542859319279
600.8129261244922150.3741477510155710.187073875507785
610.7934164208692430.4131671582615140.206583579130757
620.7815867844759650.4368264310480710.218413215524035
630.7713418914356980.4573162171286040.228658108564302
640.7374793444267110.5250413111465790.262520655573289
650.6979209939166290.6041580121667420.302079006083371
660.6533500029464940.6932999941070120.346649997053506
670.647559026599750.70488194680050.35244097340025
680.6591653232522980.6816693534954040.340834676747702
690.692330213785170.6153395724296610.307669786214830
700.6886893707476260.6226212585047470.311310629252374
710.6775278024585130.6449443950829730.322472197541487
720.682737321534190.6345253569316210.317262678465811
730.7268327276141160.5463345447717670.273167272385884
740.7794579736406780.4410840527186450.220542026359322
750.8222766520420370.3554466959159260.177723347957963
760.8561816311377080.2876367377245830.143818368862292
770.8708877918941010.2582244162117980.129112208105899
780.8708149204345660.2583701591308690.129185079565434
790.8840174426380380.2319651147239240.115982557361962
800.8918642229360250.216271554127950.108135777063975
810.9039869462343320.1920261075313350.0960130537656675
820.9027761764708540.1944476470582920.0972238235291458
830.904441995308520.1911160093829590.0955580046914793
840.9097410407693740.1805179184612510.0902589592306256
850.9294401533195570.1411196933608860.070559846680443
860.9526166871368850.09476662572622940.0473833128631147
870.968888307116520.06222338576695920.0311116928834796
880.9894286182322370.02114276353552590.0105713817677629
890.9944477890962230.01110442180755430.00555221090377716
900.9919867087244530.01602658255109370.00801329127554683
910.994238868086210.01152226382757830.00576113191378916
920.9937431204089260.01251375918214870.00625687959107435
930.989021158818210.02195768236358200.0109788411817910
940.9808924331294780.03821513374104320.0191075668705216
950.9672420910868730.06551581782625410.0327579089131270
960.9593286317566230.08134273648675490.0406713682433774
970.9682256664265340.06354866714693160.0317743335734658
980.9650794743500510.06984105129989760.0349205256499488
990.9281691967798150.143661606440370.071830803220185
1000.8379172841268270.3241654317463460.162082715873173


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level160.166666666666667NOK
10% type I error level280.291666666666667NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/10bdyn1227789725.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/10bdyn1227789725.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/1r0yi1227789725.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/1r0yi1227789725.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/3xrly1227789725.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/3xrly1227789725.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/58fzo1227789725.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/58fzo1227789725.ps (open in new window)


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/86fs61227789725.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/86fs61227789725.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/95w3r1227789725.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227789867li91lqdxcdw2sky/95w3r1227789725.ps (open in new window)


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