Home » date » 2008 » Dec » 04 »

*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: Thu, 04 Dec 2008 03:30: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/Dec/04/t1228386660f3pqdgz1squzvd3.htm/, Retrieved Thu, 04 Dec 2008 10:31:31 +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/Dec/04/t1228386660f3pqdgz1squzvd3.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:
2008-11-27 13:41:43 [a2386b643d711541400692649981f2dc] [reply
test

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
31.75 0 27.85 0 27.33 0 29.11 0 28.17 0 28.93 0 32.33 0 34.74 0 33.70 0 34.35 0 35.35 0 34.44 0 33.70 0 32.39 0 28.30 0 29.11 0 28.67 0 28.18 0 29.28 0 29.73 0 26.26 0 26.82 0 27.72 0 27.10 0 27.03 0 25.98 0 25.72 0 25.93 0 24.94 0 21.70 0 17.90 0 17.06 0 16.41 0 16.68 0 18.24 0 16.41 0 15.71 0 13.95 0 12.22 0 14.91 0 14.61 0 15.01 0 15.57 0 16.07 0 15.39 0 15.16 0 15.44 0 15.70 0 17.57 0 18.42 0 17.93 0 18.42 0 17.61 0 17.98 0 17.78 0 17.74 0 19.04 0 19.85 0 20.23 0 20.23 0 21.07 0 21.28 0 21.83 0 21.83 0 22.22 0 22.68 0 23.58 0 23.73 0 23.68 0 23.92 0 24.85 0 26.28 0 27.75 0 29.59 0 29.26 0 29.25 0 28.68 0 26.05 0 27.11 0 29.53 0 31.01 0 32.95 0 32.09 0 31.74 0 32.50 0 33.60 0 32.47 0 34.38 0 32.31 0 30.71 0 30.26 0 27.20 0 24.85 0 22.27 1 18.11 1 18.30 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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
x[t] = + 24.5380573593074 -4.85069264069265y[t] + 1.47173881673881M1[t] + 0.972141053391049M2[t] -0.0249567099567129M3[t] + 0.962945526695523M4[t] + 0.249597763347756M5[t] -0.493750000000006M6[t] -0.169597763347771M7[t] + 0.0820544733044677M8[t] -0.597543290043295M9[t] + 0.219195526695523M10[t] + 0.225847763347759M11[t] -0.00290223665223661t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)24.53805735930742.7314798.983400
y-4.850692640692654.327308-1.12090.2655820.132791
M11.471738816738813.3984930.43310.6661110.333055
M20.9721410533910493.3975960.28610.7755030.387752
M3-0.02495670995671293.396898-0.00730.9941560.497078
M40.9629455266955233.39640.28350.7774930.388747
M50.2495977633477563.3961010.07350.9415910.470795
M6-0.4937500000000063.396001-0.14540.8847580.442379
M7-0.1695977633477713.396101-0.04990.9602920.480146
M80.08205447330446773.39640.02420.9807840.490392
M9-0.5975432900432953.396898-0.17590.86080.4304
M100.2191955266955233.3566840.06530.9480930.474047
M110.2258477633477593.3563810.06730.9465150.473258
t-0.002902236652236610.026025-0.11150.9114780.455739


Multiple Linear Regression - Regression Statistics
Multiple R0.16959143867086
R-squared0.0287612560704521
Adjusted R-squared-0.125215617967159
F-TEST (value)0.186789452963090
F-TEST (DF numerator)13
F-TEST (DF denominator)82
p-value0.99912968162542
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.71256042907549
Sum Squared Residuals3694.79433614719


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
131.7526.00689393939405.74310606060604
227.8525.50439393939392.34560606060607
327.3324.50439393939392.82560606060606
429.1125.48939393939393.62060606060605
528.1724.77314393939393.39685606060606
628.9324.02689393939394.90310606060607
732.3324.34814393939397.98185606060607
834.7424.596893939393910.1431060606061
933.723.91439393939399.78560606060607
1034.3524.72823051948059.62176948051948
1135.3524.731980519480510.6180194805195
1234.4424.50323051948059.93676948051948
1333.725.97206709956717.7279329004329
1432.3925.46956709956716.92043290043289
1528.324.46956709956713.8304329004329
1629.1125.45456709956713.6554329004329
1728.6724.73831709956713.9316829004329
1828.1823.99206709956714.1879329004329
1929.2824.31331709956714.9666829004329
2029.7324.56206709956715.1679329004329
2126.2623.87956709956712.38043290043290
2226.8224.69340367965372.12659632034632
2327.7224.69715367965373.02284632034632
2427.124.46840367965372.63159632034632
2527.0325.93724025974031.09275974025974
2625.9825.43474025974030.545259740259741
2725.7224.43474025974031.28525974025974
2825.9325.41974025974030.510259740259738
2924.9424.70349025974030.236509740259741
3021.723.9572402597403-2.25724025974026
3117.924.2784902597403-6.37849025974026
3217.0624.5272402597403-7.46724025974026
3316.4123.8447402597403-7.43474025974026
3416.6824.6585768398268-7.97857683982684
3518.2424.6623268398268-6.42232683982684
3616.4124.4335768398268-8.02357683982684
3715.7125.9024134199134-10.1924134199134
3813.9525.3999134199134-11.4499134199134
3912.2224.3999134199134-12.1799134199134
4014.9125.3849134199134-10.4749134199134
4114.6124.6686634199134-10.0586634199134
4215.0123.9224134199134-8.91241341991342
4315.5724.2436634199134-8.67366341991342
4416.0724.4924134199134-8.42241341991342
4515.3923.8099134199134-8.41991341991342
4615.1624.62375-9.46375
4715.4424.6275-9.1875
4815.724.39875-8.69875
4917.5725.8675865800866-8.29758658008658
5018.4225.3650865800866-6.94508658008658
5117.9324.3650865800866-6.43508658008658
5218.4225.3500865800866-6.93008658008658
5317.6124.6338365800866-7.02383658008658
5417.9823.8875865800866-5.90758658008658
5517.7824.2088365800866-6.42883658008658
5617.7424.4575865800866-6.71758658008658
5719.0423.7750865800866-4.73508658008658
5819.8524.5889231601732-4.73892316017316
5920.2324.5926731601732-4.36267316017316
6020.2324.3639231601732-4.13392316017317
6121.0725.8327597402597-4.76275974025974
6221.2825.3302597402597-4.05025974025974
6321.8324.3302597402597-2.50025974025974
6421.8325.3152597402597-3.48525974025974
6522.2224.5990097402597-2.37900974025974
6622.6823.8527597402597-1.17275974025974
6723.5824.1740097402597-0.594009740259739
6823.7324.4227597402597-0.692759740259737
6923.6823.7402597402597-0.060259740259739
7023.9224.5540963203463-0.63409632034632
7124.8524.55784632034630.292153679653682
7226.2824.32909632034631.95090367965368
7327.7525.79793290043291.9520670995671
7429.5925.29543290043294.2945670995671
7529.2624.29543290043294.9645670995671
7629.2525.28043290043293.9695670995671
7728.6824.56418290043294.1158170995671
7826.0523.81793290043292.23206709956710
7927.1124.13918290043292.9708170995671
8029.5324.38793290043295.1420670995671
8131.0123.70543290043297.3045670995671
8232.9524.51926948051958.43073051948052
8332.0924.52301948051957.56698051948052
8431.7424.29426948051957.44573051948051
8532.525.76310606060616.73689393939394
8633.625.26060606060618.33939393939394
8732.4724.26060606060618.20939393939394
8834.3825.24560606060619.13439393939394
8932.3124.52935606060617.78064393939394
9030.7123.78310606060616.92689393939394
9130.2624.10435606060616.15564393939394
9227.224.35310606060612.84689393939394
9324.8523.67060606060611.17939393939394
9422.2719.633752.63625
9518.1119.6375-1.52750000000000
9618.319.40875-1.10875000000000


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.02330399927791850.04660799855583690.976696000722082
180.009691529383055130.01938305876611030.990308470616945
190.01171646071183780.02343292142367560.988283539288162
200.02320546126252770.04641092252505540.976794538737472
210.05853833805848710.1170766761169740.941461661941513
220.08816298393954710.1763259678790940.911837016060453
230.1242976375633890.2485952751267770.875702362436611
240.1621496783727640.3242993567455270.837850321627236
250.1659604923103020.3319209846206050.834039507689698
260.1656773175464550.3313546350929090.834322682453545
270.2091146599872710.4182293199745420.79088534001273
280.2743574812832220.5487149625664440.725642518716778
290.4160777923446050.832155584689210.583922207655395
300.6111377320514830.7777245358970330.388862267948517
310.90201105050610.1959778989877990.0979889494938996
320.9907167895059730.01856642098805410.00928321049402705
330.9984215188407660.003156962318468030.00157848115923401
340.9994468063928370.001106387214325410.000553193607162703
350.9999070515066210.0001858969867575689.29484933787838e-05
360.9999743105785985.13788428036134e-052.56894214018067e-05
370.9999746542828745.06914342517159e-052.53457171258580e-05
380.9999621197553617.57604892775795e-053.78802446387897e-05
390.99995138245329.7235093601152e-054.8617546800576e-05
400.9999055669185840.0001888661628326519.44330814163256e-05
410.9998188846110170.0003622307779655980.000181115388982799
420.9997076094814140.000584781037171730.000292390518585865
430.9995723264386750.0008553471226509010.000427673561325450
440.9995001866812810.0009996266374381520.000499813318719076
450.9993536797220320.001292640555936810.000646320277968407
460.9989793208324770.002041358335045270.00102067916752263
470.9982038613656780.003592277268643150.00179613863432158
480.9970078312025320.005984337594935380.00299216879746769
490.9964230464822460.007153907035507540.00357695351775377
500.997139356473670.005721287052660010.00286064352633000
510.997842513720010.004314972559981740.00215748627999087
520.9977857807109860.004428438578027200.00221421928901360
530.9974771946160230.005045610767953840.00252280538397692
540.9972328214546960.005534357090608370.00276717854530418
550.9964662094382010.00706758112359760.0035337905617988
560.9950013799783130.009997240043373450.00499862002168672
570.9950768061858150.009846387628369890.00492319381418494
580.9955007831968980.008998433606203250.00449921680310163
590.9943466235022320.01130675299553630.00565337649776813
600.9933616543789220.01327669124215610.00663834562107803
610.9933671594970390.01326568100592240.00663284050296119
620.995510633073410.008978733853181190.00448936692659059
630.9965632071446420.006873585710715490.00343679285535775
640.997697722911760.004604554176480790.00230227708824040
650.9978240453001660.00435190939966860.0021759546998343
660.997049002862190.005901994275618270.00295099713780914
670.9958302696650040.008339460669991140.00416973033499557
680.9936352707306080.0127294585387850.0063647292693925
690.9905258976155460.01894820476890780.00947410238445388
700.9957616185832380.008476762833524470.00423838141676224
710.995234628318410.009530743363179270.00476537168158964
720.993492349804650.01301530039069840.0065076501953492
730.990451993301450.01909601339709870.00954800669854937
740.9856864526189240.02862709476215190.0143135473810759
750.9760018427226120.04799631455477560.0239981572773878
760.9693453665991150.06130926680177060.0306546334008853
770.9516151599982750.09676968000345050.0483848400017253
780.9532509204273680.09349815914526330.0467490795726317
790.9803396959848780.03932060803024420.0196603040151221


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level340.53968253968254NOK
5% type I error level490.777777777777778NOK
10% type I error level520.825396825396825NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/10i16c1228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/10i16c1228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/1e3kz1228386604.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/1e3kz1228386604.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/2kox01228386604.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/2kox01228386604.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/3bbu01228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/3bbu01228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/4853z1228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/4853z1228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/5arzq1228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/5arzq1228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/6qwdq1228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/6qwdq1228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/7rgtl1228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/7rgtl1228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/81s601228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/81s601228386605.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/96a381228386605.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/04/t1228386660f3pqdgz1squzvd3/96a381228386605.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