Home » date » 2008 » Nov » 23 »

Multiple Linear Regression

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 23 Nov 2008 06:07:15 -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/23/t1227446460wtmx32nlsfmwux2.htm/, Retrieved Sun, 23 Nov 2008 13:21:01 +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/23/t1227446460wtmx32nlsfmwux2.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 «
96,5 0 97,3 0 122 0 91 0 107,9 0 114,6 0 98 0 95,5 0 98,7 0 115,9 0 110,4 0 109,5 0 92,3 0 102,1 0 112,8 0 110,2 0 98,9 0 119 0 104,3 0 98,8 0 109,4 1 170,3 1 118 1 116,9 1 111,7 1 116,8 1 116,1 1 114,8 1 110,8 1 122,8 1 104,7 1 86 1 127,2 1 126,1 1 114,6 1 127,8 1 105,2 1 113,1 1 161 1 126,9 1 117,7 1 144,9 1 119,4 1 107,1 1 142,8 1 126,2 1 126,9 1 179,2 1 105,3 1 114,8 1 125,4 1 113,2 1 134,4 1 150 1 100,9 1 101,8 1 137,7 1 138,7 1 135,4 1 153,8 1 119,5 1 123,3 1 166,4 1 137,5 1 142,2 1 167 1 112,3 1 120,6 1 154,9 1 153,4 1 156,2 1 175,8 1 131,7 1 130,1 1 161,1 1 128,2 1 140,3 1 174,9 1 111,8 1 136,6 1 166,1 1 159,4 1 168,2 1 154,6 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 time7 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
Productie_Medische_apparatuur[t] = + 116.875474525474 -0.381993006993004Dummy[t] -29.9349275724276M1[t] -25.4925574425575M2[t] -2.19304445554446M3[t] -23.2221028971029M4[t] -19.4797327672328M5[t] + 0.062637362637359M6[t] -35.0807067932068M7[t] -36.3954795204795M8[t] -9.7413961038961M9[t] -2.74188311688312M10[t] -11.9566558441558M11[t] + 0.600487012987013t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)116.8754745254745.37249621.754400
Dummy-0.3819930069930044.617514-0.08270.9343050.467152
M1-29.93492757242766.46882-4.62761.7e-058e-06
M2-25.49255744255756.464264-3.94360.0001889.4e-05
M3-2.193044455544466.460719-0.33940.7352920.367646
M4-23.22210289710296.458185-3.59580.0005980.000299
M5-19.47973276723286.456664-3.0170.0035570.001779
M60.0626373626373596.4561570.00970.9922870.496143
M7-35.08070679320686.456664-5.43331e-060
M8-36.39547952047956.458185-5.635600
M9-9.74139610389616.445266-1.51140.1351870.067594
M10-2.741883116883126.442726-0.42560.6717210.33586
M11-11.95665584415586.441201-1.85630.0676230.033811
t0.6004870129870130.0809147.421300


Multiple Linear Regression - Regression Statistics
Multiple R0.876612420107282
R-squared0.768449335086346
Adjusted R-squared0.725447068745238
F-TEST (value)17.8699729216774
F-TEST (DF numerator)13
F-TEST (DF denominator)70
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation12.0494329899339
Sum Squared Residuals10163.2184765235


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
196.587.5410339660348.95896603396595
297.392.58389110889114.71610889110891
3122116.4838911088915.51610889110888
49196.0553196803197-5.05531968031967
5107.9100.3981768231777.50182317682318
6114.6120.541033966034-5.94103396603398
79885.998176823176812.0018231768232
895.585.283891108891110.2161088911089
998.7112.538461538462-13.8384615384616
10115.9120.138461538462-4.23846153846153
11110.4111.524175824176-1.12417582417582
12109.5124.081318681319-14.5813186813187
1392.394.7468781218781-2.44687812187811
14102.199.78973526473522.31026473526475
15112.8123.689735264735-10.8897352647353
16110.2103.2611638361646.93883616383617
1798.9107.604020979021-8.70402097902097
18119127.746878121878-8.74687812187812
19104.393.20402097902111.0959790209790
2098.892.48973526473526.31026473526475
21109.4119.362312687313-9.96231268731268
22170.3126.96231268731343.3376873126873
23118118.348026973027-0.348026973026965
24116.9130.905169830170-14.0051698301698
25111.7101.57072927072910.1292707292707
26116.8106.61358641358610.1864135864136
27116.1130.513586413586-14.4135864135864
28114.8110.0850149850154.71498501498501
29110.8114.427872127872-3.62787212787213
30122.8134.570729270729-11.7707292707293
31104.7100.0278721278724.67212787212788
328699.3135864135864-13.3135864135864
33127.2126.5681568431570.631843156843158
34126.1134.168156843157-8.06815684315685
35114.6125.553871128871-10.9538711288711
36127.8138.111013986014-10.311013986014
37105.2108.776573426573-3.57657342657341
38113.1113.819430569431-0.719430569430576
39161137.71943056943123.2805694305694
40126.9117.2908591408599.60914085914086
41117.7121.633716283716-3.93371628371628
42144.9141.7765734265733.12342657342658
43119.4107.23371628371612.1662837162837
44107.1106.5194305694310.580569430569429
45142.8133.7740009990019.025999000999
46126.2141.374000999001-15.174000999001
47126.9132.759715284715-5.85971528471529
48179.2145.31685814185833.8831418581419
49105.3115.982417582418-10.6824175824176
50114.8121.025274725275-6.22527472527473
51125.4144.925274725275-19.5252747252747
52113.2124.496703296703-11.2967032967033
53134.4128.8395604395605.56043956043956
54150148.9824175824181.01758241758241
55100.9114.439560439560-13.5395604395604
56101.8113.725274725275-11.9252747252747
57137.7140.979845154845-3.27984515484517
58138.7148.579845154845-9.87984515484518
59135.4139.965559440559-4.56555944055944
60153.8152.5227022977021.27729770229771
61119.5123.188261738262-3.68826173826172
62123.3128.231118881119-4.93111888111889
63166.4152.13111888111914.2688811188811
64137.5131.7025474525475.79745254745255
65142.2136.0454045954056.15459540459539
66167156.18826173826210.8117382617383
67112.3121.645404595405-9.3454045954046
68120.6120.931118881119-0.331118881118888
69154.9148.1856893106896.7143106893107
70153.4155.785689310689-2.38568931068930
71156.2147.1714035964049.0285964035964
72175.8159.72854645354616.0714535464536
73131.7130.3941058941061.30589410589411
74130.1135.436963036963-5.33696303696304
75161.1159.3369630369631.76303696303697
76128.2138.908391608392-10.7083916083916
77140.3143.251248751249-2.95124875124874
78174.9163.39410589410611.5058941058941
79111.8128.851248751249-17.0512487512488
80136.6128.1369630369638.46303696303696
81166.1155.39153346653310.7084665334665
82159.4162.991533466533-3.59153346653345
83168.2154.37724775224813.8227522477522
84154.6166.934390609391-12.3343906093906


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.3675186109598300.7350372219196610.63248138904017
180.2295308441133270.4590616882266540.770469155886673
190.1330536187616010.2661072375232010.8669463812384
200.0676386287312710.1352772574625420.93236137126873
210.03371576280250350.0674315256050070.966284237197496
220.3824141526824530.7648283053649050.617585847317547
230.4377184276798270.8754368553596540.562281572320173
240.4434010023792710.8868020047585410.556598997620729
250.3771577847132340.7543155694264680.622842215286766
260.3204254067133660.6408508134267330.679574593286634
270.4181755261827590.8363510523655180.581824473817241
280.3412242759913160.6824485519826310.658775724008684
290.2841738205885440.5683476411770870.715826179411456
300.2667703242657500.5335406485315010.73322967573425
310.2488576788182360.4977153576364720.751142321181764
320.3588907434655550.717781486931110.641109256534445
330.3785747203559990.7571494407119980.621425279644001
340.4494161712881290.8988323425762570.550583828711871
350.406341013071510.812682026143020.59365898692849
360.436546237002050.87309247400410.56345376299795
370.3614553244749920.7229106489499840.638544675525008
380.2937669561576500.5875339123152990.70623304384235
390.6569050248168850.6861899503662310.343094975183115
400.6605901084170460.6788197831659080.339409891582954
410.5950764543311360.8098470913377280.404923545668864
420.564187740774670.871624518450660.43581225922533
430.6726658962660370.6546682074679250.327334103733963
440.6067577051759550.786484589648090.393242294824045
450.6163243977865850.767351204426830.383675602213415
460.6544342518060640.6911314963878730.345565748193936
470.6038561911166110.7922876177667780.396143808883389
480.9791892365460120.04162152690797670.0208107634539883
490.9725800821788970.05483983564220550.0274199178211028
500.9602019222643740.07959615547125140.0397980777356257
510.9860513426310950.02789731473781110.0139486573689055
520.9802028898172150.03959422036557050.0197971101827853
530.972651160231130.05469767953774030.0273488397688702
540.9622272397698530.0755455204602930.0377727602301465
550.950668327448990.09866334510201940.0493316725510097
560.9518664961741320.09626700765173660.0481335038258683
570.944797657198260.1104046856034790.0552023428017394
580.9250788004110060.1498423991779890.0749211995889943
590.9586009018930570.08279819621388680.0413990981069434
600.9380623949708740.1238752100582530.0619376050291265
610.9155390738277710.1689218523444570.0844609261722286
620.8665762150745040.2668475698509910.133423784925496
630.8269900373913490.3460199252173030.173009962608651
640.7935647602598060.4128704794803880.206435239740194
650.6985193237327660.6029613525344690.301480676267234
660.5735561861292290.8528876277415420.426443813870771
670.4208648877959480.8417297755918960.579135112204052


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level30.0588235294117647NOK
10% type I error level110.215686274509804NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/10j84z1227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/10j84z1227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/110ys1227445621.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/110ys1227445621.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/20l0u1227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/20l0u1227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/319eb1227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/319eb1227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/4epfy1227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/4epfy1227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/5wskl1227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/5wskl1227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/6wq3p1227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/6wq3p1227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/7znk01227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/7znk01227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/8r6p31227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/8r6p31227445622.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/9hgi01227445622.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/23/t1227446460wtmx32nlsfmwux2/9hgi01227445622.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