Home » date » 2008 » Nov » 27 »

hl

*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 04:33:13 -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/t12277857789bvsn4qu5teruiu.htm/, Retrieved Thu, 27 Nov 2008 11:36:28 +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/t12277857789bvsn4qu5teruiu.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 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
 
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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
W[t] = + 7.36408459106366 -0.149919465489469D[t] + 0.093604024295134M1[t] -0.0278936635137787M2[t] -0.216058017989355M3[t] -0.415333483576042M4[t] -0.659053393607172M5[t] -0.780551081416083M6[t] -0.246493213669435M7[t] -0.112435345922788M8[t] + 0.0749197969072098M9[t] + 0.058273153395596M10[t] -0.0521134233022018M11[t] + 0.0103865766977978t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.364084591063660.31885723.095300
D-0.1499194654894690.306007-0.48990.6253820.312691
M10.0936040242951340.3783830.24740.8051780.402589
M2-0.02789366351377870.378274-0.07370.9413810.470691
M3-0.2160580179893550.378233-0.57120.5692680.284634
M4-0.4153334835760420.37826-1.0980.2751290.137565
M5-0.6590533936071720.378355-1.74190.0849440.042472
M6-0.7805510814160830.378518-2.06210.0420790.02104
M7-0.2464932136694350.378749-0.65080.5168280.258414
M8-0.1124353459227880.379048-0.29660.7674360.383718
M90.07491979690720980.3899820.19210.8480880.424044
M100.0582731533955960.3892320.14970.8813260.440663
M11-0.05211342330220180.389132-0.13390.8937630.446882
t0.01038657669779780.0050742.04710.0435630.021781


Multiple Linear Regression - Regression Statistics
Multiple R0.454015651118839
R-squared0.206130211460864
Adjusted R-squared0.0914601308940997
F-TEST (value)1.79759367432247
F-TEST (DF numerator)13
F-TEST (DF denominator)90
p-value0.0553032149377491
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.778198484628689
Sum Squared Residuals54.5033593330549


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
17.57.468075192056540.0319248079434558
27.27.35696408094547-0.156964080945470
36.97.17918630316769-0.279186303167692
46.76.9902974142788-0.290297414278804
56.46.75696408094547-0.356964080945468
66.36.64585296983436-0.345852969834360
76.87.1902974142788-0.390297414278804
87.37.33474185872325-0.0347418587232457
97.17.53248357825104-0.432483578251044
107.17.52622351143723-0.426223511437227
116.87.42622351143723-0.626223511437226
126.57.48872351143723-0.988723511437227
136.37.59271411243016-1.29271411243016
146.17.48160300131904-1.38160300131904
156.17.30382522354127-1.20382522354127
166.37.11493633465238-0.814936334652376
176.36.88160300131904-0.581603001319044
1866.77049189020793-0.770491890207932
196.27.31493633465238-1.11493633465238
206.47.45938077909682-1.05938077909682
216.87.65712249862462-0.857122498624617
227.57.6508624318108-0.150862431810801
237.57.5508624318108-0.0508624318108007
247.67.6133624318108-0.0133624318108011
257.67.71735303280373-0.117353032803733
267.47.60624192169262-0.206241921692616
277.37.42846414391484-0.128464143914839
287.17.23957525502595-0.139575255025950
296.97.00624192169262-0.106241921692617
306.86.8951308105815-0.0951308105815057
317.57.439575255025950.06042474497405
327.67.58401969947040.0159803005296048
337.87.781761418998190.0182385810018092
3487.775501352184370.224498647815626
358.17.675501352184370.424498647815625
368.27.738001352184370.461998647815625
378.37.84199195317730.458008046822695
388.27.730880842066190.469119157933809
3987.553103064288410.446896935711587
407.97.364214175399520.535785824600477
417.67.130880842066190.469119157933809
427.67.019769730955080.58023026904492
438.27.564214175399520.635785824600475
448.37.708658619843970.591341380156032
458.47.906400339371760.493599660628236
468.47.900140272557950.499859727442052
478.47.800140272557950.599859727442052
488.67.862640272557950.737359727442051
498.97.966630873550880.933369126449121
508.87.855519762439760.944480237560237
518.37.677741984661990.622258015338014
527.57.48885309577310.0111469042269028
537.27.25551976243976-0.0555197624397643
547.57.144408651328650.355591348671347
558.87.68885309577311.11114690422690
569.37.833297540217541.46670245978246
579.38.031039259745341.26896074025466
588.77.874859727442050.825140272557948
598.27.774859727442050.425140272557947
608.37.837359727442050.462640272557949
618.57.941350328434980.558649671565017
628.67.830239217323870.769760782676132
638.67.652461439546090.94753856045391
648.27.46357255065720.736427449342798
658.17.230239217323870.86976078267613
6687.119128106212760.880871893787243
678.67.66357255065720.936427449342799
688.77.808016995101650.891983004898353
698.88.005758714629440.794241285370559
708.57.999498647815630.500501352184375
718.47.899498647815630.500501352184375
728.57.961998647815630.538001352184375
738.78.065989248808560.634010751191442
748.77.954878137697440.745121862302558
758.67.777100359919660.822899640080336
768.57.588211471030770.911788528969225
778.37.354878137697440.945121862302559
788.17.243767026586330.856232973413669
798.27.788211471030770.411788528969224
808.17.932655915475220.167344084524780
818.18.13039763500302-0.030397635003016
827.98.1241375681892-0.224137568189199
837.98.0241375681892-0.124137568189199
847.98.0866375681892-0.186637568189199
8588.19062816918213-0.190628169182131
8688.07951705807102-0.0795170580710153
877.97.90173928029324-0.00173928029323717
8887.712850391404350.287149608595652
897.77.479517058071020.220482941928985
907.27.3684059469599-0.168405946959904
917.57.91285039140435-0.412850391404349
927.38.0572948358488-0.757294835848794
9378.25503655537659-1.25503655537659
9478.24877648856277-1.24877648856277
9578.14877648856277-1.14877648856277
967.28.21127648856277-1.01127648856277
977.38.3152670895557-1.01526708955570
987.18.20415597844459-1.10415597844459
996.88.02637820066681-1.22637820066681
1006.67.83748931177792-1.23748931177792
1016.27.60415597844459-1.40415597844459
1026.27.49304486733348-1.29304486733348
1036.88.03748931177792-1.23748931177792
1046.98.18193375622237-1.28193375622237


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.1537711399115280.3075422798230560.846228860088472
180.0894954905624530.1789909811249060.910504509437547
190.04541558396589620.09083116793179250.954584416034104
200.02734100262994010.05468200525988030.97265899737006
210.02025812666279410.04051625332558820.979741873337206
220.05731933649675510.1146386729935100.942680663503245
230.1410330124398230.2820660248796470.858966987560177
240.3254274762991060.6508549525982120.674572523700894
250.4318807944994150.863761588998830.568119205500585
260.5114965472152550.977006905569490.488503452784745
270.569873345488430.860253309023140.43012665451157
280.5846131624075040.8307736751849920.415386837592496
290.5952828742223130.8094342515553740.404717125777687
300.6324625166560050.7350749666879910.367537483343996
310.7157474147162420.5685051705675160.284252585283758
320.7710628185034230.4578743629931530.228937181496577
330.8255826172298240.3488347655403520.174417382770176
340.811752934718590.3764941305628210.188247065281411
350.8025768074838890.3948463850322230.197423192516111
360.8136349937317260.3727300125365490.186365006268274
370.8152852025478430.3694295949043150.184714797452157
380.833088232778840.3338235344423210.166911767221161
390.845260621591980.3094787568160400.154739378408020
400.8417326118389270.3165347763221470.158267388161073
410.8389328797642750.3221342404714510.161067120235725
420.8390755951541540.3218488096916910.160924404845846
430.8494810703146490.3010378593707020.150518929685351
440.853087277034190.293825445931620.14691272296581
450.8503924198300170.2992151603399650.149607580169983
460.8128979599626530.3742040800746940.187102040037347
470.7658352304625720.4683295390748550.234164769537428
480.717827149679990.564345700640020.28217285032001
490.6735856734769230.6528286530461540.326414326523077
500.6305157874466230.7389684251067550.369484212553377
510.5751238525953220.8497522948093570.424876147404679
520.7088877130665410.5822245738669170.291112286933459
530.8969428077615540.2061143844768920.103057192238446
540.9592696568423510.08146068631529730.0407303431576487
550.960693579831310.07861284033737850.0393064201686893
560.9587052595833620.08258948083327520.0412947404166376
570.950723731901640.09855253619671850.0492762680983592
580.9341738406848790.1316523186302430.0658261593151215
590.95005881648740.09988236702519970.0499411835125999
600.966090899140260.06781820171947970.0339091008597399
610.9784665595929060.04306688081418720.0215334404070936
620.9835267633898520.03294647322029690.0164732366101484
630.9848403897136260.03031922057274750.0151596102863738
640.996337707088450.007324585823100050.00366229291155003
650.9990786153352640.001842769329472720.000921384664736361
660.999795365705680.0004092685886397460.000204634294319873
670.9998762140372820.0002475719254366140.000123785962718307
680.999869321297580.0002613574048377810.000130678702418891
690.9997185175839640.0005629648320720630.000281482416036032
700.9995677282767490.000864543446502190.000432271723251095
710.9994804273760190.001039145247962810.000519572623981407
720.9993955849419860.001208830116028920.000604415058014458
730.9991019504168260.001796099166347930.000898049583173964
740.9983206838786940.003358632242612270.00167931612130614
750.9965680921826520.006863815634695480.00343190781734774
760.9934247652682780.01315046946344370.00657523473172186
770.9873228498186140.0253543003627730.0126771501813865
780.9775420465768860.04491590684622810.0224579534231140
790.972707363484790.05458527303041790.0272926365152090
800.978402470550980.043195058898040.02159752944902
810.9704634090574420.05907318188511620.0295365909425581
820.9590258899141450.081948220171710.040974110085855
830.93542669481720.1291466103656010.0645733051828005
840.9098276546820480.1803446906359030.0901723453179517
850.8752995639259020.2494008721481950.124700436074097
860.7904841455042510.4190317089914980.209515854495749
870.6528729970203160.6942540059593680.347127002979684


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level120.169014084507042NOK
5% type I error level200.281690140845070NOK
10% type I error level310.436619718309859NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277857789bvsn4qu5teruiu/10etwd1227785587.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277857789bvsn4qu5teruiu/10etwd1227785587.ps (open in new window)


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


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


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277857789bvsn4qu5teruiu/5if2a1227785587.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277857789bvsn4qu5teruiu/5if2a1227785587.ps (open in new window)


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277857789bvsn4qu5teruiu/82ehf1227785587.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277857789bvsn4qu5teruiu/82ehf1227785587.ps (open in new window)


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