Home » date » 2009 » Nov » 19 »

*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, 19 Nov 2009 11:16: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/2009/Nov/19/t125865463536q62p1wlj07k3u.htm/, Retrieved Thu, 19 Nov 2009 19:17:29 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u.htm/},
    year = {2009},
}
@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 = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
102,1880309 0 114,0150276 108,1560276 100 0 0 0 110,3672031 0 102,1880309 114,0150276 108,1560276 0 0 0 96,8602511 0 110,3672031 102,1880309 114,0150276 0 0 0 94,1944583 0 96,8602511 110,3672031 102,1880309 0 0 0 99,51621961 0 94,1944583 96,8602511 110,3672031 0 0 0 94,06333487 0 99,51621961 94,1944583 96,8602511 0 0 0 97,5541476 0 94,06333487 99,51621961 94,1944583 0 0 0 78,15062422 0 97,5541476 94,06333487 99,51621961 0 0 0 81,2434643 0 78,15062422 97,5541476 94,06333487 0 0 0 92,36262465 0 81,2434643 78,15062422 97,5541476 0 0 0 96,06324371 0 92,36262465 81,2434643 78,15062422 0 0 0 114,0523777 0 96,06324371 92,36262465 81,2434643 0 0 0 110,6616666 0 114,0523777 96,06324371 92,36262465 0 0 0 104,9171949 0 110,6616666 114,0523777 96,06324371 0 0 0 90,00187193 0 104,9171949 110,6616666 114,0523777 0 0 0 95,7008067 0 90,00187193 104,9171949 110,6616666 0 0 0 86,02741157 0 95,7008067 90,00187193 104,9171949 0 0 0 84,85287668 0 86,02741157 95,7008067 90,00187193 0 0 0 100,04328 0 84,85287668 8 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 42.6772231284869 -7.03032756296926X[t] + 0.238951819573219Y1[t] + 0.0273389519798325Y2[t] + 0.402193805311858Y3[t] + 35.1639106297578O1[t] + 46.4502697020821O2[t] + 48.3685051126588O3[t] -11.0549275547205M1[t] -13.5843855756605M2[t] -8.58775754021385M3[t] -20.1079767133796M4[t] -20.0203484270343M5[t] -19.5705285141657M6[t] -11.6321889599801M7[t] -26.7128084146589M8[t] -13.1819891149909M9[t] -20.6649646317261M10[t] -9.85178558791026M11[t] + 0.183754648718384t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)42.67722312848698.7975854.8516e-063e-06
X-7.030327562969263.552399-1.9790.0510490.025525
Y10.2389518195732190.0827882.88630.004940.00247
Y20.02733895197983250.0831310.32890.7430660.371533
Y30.4021938053118580.0807344.98173e-062e-06
O135.163910629757810.1778733.45490.0008610.000431
O246.450269702082110.6064834.37943.4e-051.7e-05
O348.368505112658810.1296724.77497e-064e-06
M1-11.05492755472054.699848-2.35220.0209750.010487
M2-13.58438557566054.758527-2.85470.005410.002705
M3-8.587757540213854.701252-1.82670.0712560.035628
M4-20.10797671337964.662171-4.3134.3e-052.2e-05
M5-20.02034842703434.654534-4.30134.5e-052.3e-05
M6-19.57052851416574.751112-4.11918.8e-054.4e-05
M7-11.63218895998014.72272-2.4630.0157940.007897
M8-26.71280841465894.617594-5.78500
M9-13.18198911499094.73033-2.78670.0065660.003283
M10-20.66496463172615.198466-3.97520.0001477.4e-05
M11-9.851785587910264.740023-2.07840.0406860.020343
t0.1837546487183840.0616732.97950.0037630.001882


Multiple Linear Regression - Regression Statistics
Multiple R0.8889895636866
R-squared0.79030244434369
Adjusted R-squared0.743428873079338
F-TEST (value)16.8602993760949
F-TEST (DF numerator)19
F-TEST (DF denominator)85
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation9.36884861575549
Sum Squared Residuals7460.9025727202


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1102.1880309102.226401502267-0.0383706022670232
2110.3672031100.4950984448179.87210465518332
396.8602511109.663025019250-12.8027739192496
494.194458390.56591492534093.62854337465911
599.5162196193.12064829953646.39557131046357
694.0633348789.52057500509034.54275986490975
797.554147695.41301850394552.14112909605448
878.1506242283.3415930297799-5.19096880977987
981.243464390.3219784584722-9.0785141584722
1092.3626246584.63530861680487.72731603319523
1196.0632437190.56976400886655.49347970113348
12114.0523777103.03748121529011.0148964847095
13110.6616666101.0380730685619.62359353143855
14104.917194999.862323241415.05487165858988
1590.00187193110.812473726136-20.8106017961359
1695.700806794.39119480250691.30961189749312
1786.0274115793.3061883395213-7.27877676952126
1884.8528766885.7852399345976-0.932363254597588
19100.0432895.65429266481334.38898733518674
2080.9171382380.46451222164170.452626008358317
2174.0653970989.5517588427103-15.4863617527103
2277.3028136986.201899406129-8.89908571612898
2397.2304324990.09268452453477.13774796546531
2490.75515676102.222745268043-11.4675885080425
25100.561445591.6511625592988.91028294070206
2692.0129326799.4864273084972-7.47349463849718
2799.24012138100.287905167960-1.04778378795975
28105.867275594.38871173873511.478563761265
2990.992046393.0030900696017-2.01104376960173
3093.3062442393.17011152451150.136132705488542
3191.17419413104.103914690765-12.9297205607647
3277.3329503982.7781353432341-5.44518495323413
3391.127772194.0577869712-2.93001487120001
3485.0124994388.8189614106923-3.8064619806923
3583.9039024293.1649130498042-9.26101062980418
36104.8626302108.316558704995-3.45392850499472
37110.903910899.96367927187510.9402315281250
3895.4371437399.1886696939024-3.75152596390237
39111.6238727109.2678730043292.35599969567055
40108.8925403103.8061772514635.08636304853713
4196.1751168297.6467936419532-1.47167682195316
42101.9740205101.6770470773820.29697342261759
4399.11953031109.738593864798-10.6190635547978
4486.7815814789.2033104400426-2.42172897004263
45118.4195003102.22395343077416.1955468692255
46118.7441447100.99930597208817.7448387279119
47106.5296192107.976514984649-1.44689578464920
48134.7772694127.8268225318776.95044686812313
49104.6778714123.502114680341-18.8242432803408
50105.2954304109.823760049398-4.52832964939781
51139.4139849125.68985350881913.7241313911809
52103.6060491110.417171659984-6.81112255998436
5399.78182974103.313327107788-3.53149736778837
54103.4610301115.776417323618-12.3153872236181
55120.0594945110.2713830379119.78811146208948
5696.7137716897.903259647672-1.18948796767198
57107.1308929107.972866863431-0.841973963430958
58105.3608372109.200388029907-3.83955082990689
59111.6942359110.6696517702501.02458412974980
60132.0519998126.3598793064095.69212049359073
61126.8037879119.8144741720866.9893137279144
62154.4824253154.4824253-1.10458517332823e-15
63141.5570984139.1570440419122.40005435808808
64109.9506882123.377955759733-13.4272675597327
65127.904198126.8757410776391.02845692236082
66133.0888617125.7367669321387.35209476786163
67120.0796299122.876673711739-2.79704381173873
68117.5557142112.2337629930105.32195120698979
69143.0362309127.07482355172315.9614073482774
70159.982927159.9829275.22368606703516e-15
71128.5991124128.2605422221150.338570177885233
72149.7373327141.5082737387058.2290589612951
73126.8169313141.645972627557-14.8290413275566
74140.9639674121.77891860600119.1850487939986
75137.6691981138.214802814574-0.545604714573759
76117.9402337117.2593688530710.680864846928982
77122.3095247118.4162545897253.89327011027469
78127.7804207118.2293741732729.55104652672794
79136.1677176119.84333350000916.3243840999913
80116.2405856108.8574988864407.38308671356037
81123.1576893120.2401087724452.91758052755468
82116.3400234117.422274371368-1.08225097136772
83108.6119282118.964651709717-10.3527235097168
84125.8982264129.749177954655-3.85095155465549
85112.8003105120.055296441994-7.25498594199434
86107.5182447111.944219492949-4.42597479294927
87135.0955413122.45680170208612.6387395979136
88115.5096488112.2976755983833.21197320161680
89115.8640759106.5184941260789.34558177392226
90104.5883906117.792719773344-13.2043291733439
91163.7213386163.72133863.38704758684472e-16
92113.4482275114.420177167808-0.971949667807623
9398.0428844113.203521790734-15.1606373907343
94116.7868521124.631657363011-7.84480526301127
95126.5330444119.4667964500647.06624794993638
96113.0336597126.147713940026-13.1140542400258
97124.3392163119.8559968760214.48321942397876
98109.8298759123.762575963025-13.9327000630252
99124.4434777120.3556385249344.08783917506596
100111.5039454116.661475410783-5.15753001078309
101102.0350019108.404887288157-6.36988538815682
102116.8726598112.2995874360464.57307236395417
103112.2073122118.504096266021-6.29678406602085
104101.151390299.08973376037222.06165643962777
105124.4255108116.0025434085108.42296739149013


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
230.3529103287541000.7058206575082010.6470896712459
240.6861453726939660.6277092546120670.313854627306034
250.5623896080122110.8752207839755770.437610391987789
260.5064512366851970.9870975266296060.493548763314803
270.4700616483766340.9401232967532680.529938351623366
280.6399835643040860.7200328713918290.360016435695914
290.5416397179346720.9167205641306550.458360282065328
300.4889622267130760.9779244534261530.511037773286924
310.4282229337657790.8564458675315570.571777066234221
320.346830844745970.693661689491940.65316915525403
330.4389103150738980.8778206301477970.561089684926102
340.3618226677808590.7236453355617170.638177332219141
350.3550664874136160.7101329748272310.644933512586384
360.3027948005065550.6055896010131110.697205199493445
370.2898499652932290.5796999305864580.710150034706771
380.2328506375778680.4657012751557370.767149362422131
390.3344641605756030.6689283211512050.665535839424397
400.2987171577643620.5974343155287240.701282842235638
410.2467773563270450.493554712654090.753222643672955
420.2010296499684240.4020592999368480.798970350031576
430.2067374337548520.4134748675097040.793262566245148
440.1855944439115170.3711888878230340.814405556088483
450.4374209188611370.8748418377222750.562579081138863
460.5775691678981360.8448616642037290.422430832101864
470.5176143787227560.9647712425544880.482385621277244
480.4712206868986090.9424413737972180.528779313101391
490.690959765131520.618080469736960.30904023486848
500.6460100698280440.7079798603439120.353989930171956
510.7271310351667960.5457379296664080.272868964833204
520.6952490794258260.6095018411483470.304750920574174
530.6500157915070660.6999684169858690.349984208492934
540.7404781344285460.5190437311429090.259521865571454
550.7255357596034120.5489284807931770.274464240396589
560.717695138021780.564609723956440.28230486197822
570.733625945803630.5327481083927410.266374054196371
580.7084182769937470.5831634460125070.291581723006253
590.6932709506737510.6134580986524980.306729049326249
600.6472254620962050.705549075807590.352774537903795
610.586997323510.826005352980.41300267649
620.5136097099258970.9727805801482050.486390290074103
630.4567976773837850.9135953547675690.543202322616215
640.4574237155850320.9148474311700640.542576284414968
650.3972197219772360.7944394439544730.602780278022764
660.3491942159076920.6983884318153830.650805784092308
670.3180887802655850.636177560531170.681911219734415
680.3303690490992560.6607380981985120.669630950900744
690.3073948395088770.6147896790177550.692605160491123
700.2390862308891190.4781724617782380.760913769110881
710.1915034229069620.3830068458139240.808496577093038
720.2345824233466920.4691648466933850.765417576653308
730.2271934077061590.4543868154123190.77280659229384
740.5564211214786390.8871577570427230.443578878521362
750.4620077171635150.9240154343270290.537992282836485
760.3759528528982510.7519057057965020.624047147101749
770.2815644306191340.5631288612382680.718435569380866
780.2353725523650920.4707451047301850.764627447634908
790.3498619498997680.6997238997995360.650138050100232
800.2853118471110560.5706236942221130.714688152888943
810.2007499294847370.4014998589694740.799250070515263
820.119775330853520.239550661707040.88022466914648


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/106vqr1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/106vqr1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/1xaj41258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/1xaj41258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/21dhn1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/21dhn1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/3344r1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/3344r1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/4wvdr1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/4wvdr1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/50nd91258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/50nd91258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/6nq2f1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/6nq2f1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/73paw1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/73paw1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/8gpqj1258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/8gpqj1258654568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/9flh41258654568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t125865463536q62p1wlj07k3u/9flh41258654568.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