Home » date » 2009 » Nov » 17 »

*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: Tue, 17 Nov 2009 02:50: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/2009/Nov/17/t1258451631r7nelll34v3xky4.htm/, Retrieved Tue, 17 Nov 2009 10:54:03 +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/17/t1258451631r7nelll34v3xky4.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 «
108.8235294 111.7647059 105.8823529 100 111.7647059 108.8235294 111.7647059 105.8823529 117.6470588 111.7647059 108.8235294 111.7647059 111.7647059 117.6470588 111.7647059 108.8235294 120.5882353 111.7647059 117.6470588 111.7647059 102.9411765 120.5882353 111.7647059 117.6470588 114.7058824 102.9411765 120.5882353 111.7647059 114.7058824 114.7058824 102.9411765 120.5882353 117.6470588 114.7058824 114.7058824 102.9411765 111.7647059 117.6470588 114.7058824 114.7058824 97.05882353 111.7647059 117.6470588 114.7058824 94.11764706 97.05882353 111.7647059 117.6470588 82.35294118 94.11764706 97.05882353 111.7647059 82.35294118 82.35294118 94.11764706 97.05882353 85.29411765 82.35294118 82.35294118 94.11764706 85.29411765 85.29411765 82.35294118 82.35294118 73.52941176 85.29411765 85.29411765 82.35294118 61.76470588 73.52941176 85.29411765 85.29411765 32.35294118 61.76470588 73.52941176 85.29411765 20.58823529 32.35294118 61.76470588 73.52941176 50 20.58823529 32.35294118 61.76470588 70.58823529 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
x[t] = + 7.53923727288653 + 0.826888794540061y0[t] + 0.069050797530038y1[t] -0.0217694593981442y2[t] + 2.53073445567753M1[t] + 1.28398056947326M2[t] + 6.14157249017446M3[t] -0.388146101513589M4[t] + 4.19313623427351M5[t] + 1.84968635378636M6[t] -2.19663690001674M7[t] -0.985667763809098M8[t] + 3.69010557347512M9[t] + 9.24640884194022M10[t] + 4.94710351660652M11[t] -0.0551774169632081t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.539237272886536.6627941.13150.2608660.130433
y00.8268887945400610.1064347.76900
y10.0690507975300380.1376210.50170.6170850.308543
y2-0.02176945939814420.107522-0.20250.8400150.420007
M12.530734455677535.310120.47660.6348240.317412
M21.283980569473265.357860.23960.8111570.405579
M36.141572490174465.3354421.15110.2527780.126389
M4-0.3881461015135895.338231-0.07270.94220.4711
M54.193136234273515.3074460.790.43160.2158
M61.849686353786365.3742240.34420.7315250.365762
M7-2.196636900016745.299369-0.41450.6794990.339749
M8-0.9856677638090985.381707-0.18320.8550960.427548
M93.690105573475125.4390810.67840.4992510.249626
M109.246408841940225.4881481.68480.0955320.047766
M114.947103516606525.4508760.90760.3665510.183276
t-0.05517741696320810.041184-1.33980.1837250.091863


Multiple Linear Regression - Regression Statistics
Multiple R0.903067366036784
R-squared0.815530667600615
Adjusted R-squared0.78444033067937
F-TEST (value)26.2310012807659
F-TEST (DF numerator)15
F-TEST (DF denominator)89
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation10.8315560323775
Sum Squared Residuals10441.7119413455


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1108.8235294107.5660922176641.25743718233622
2111.7647059104.1102605472637.65444535273689
3117.6470588111.0135547138156.63350408618513
4111.7647059109.5598288091052.20487709089501
5120.5882353109.56403536608711.0241999339127
6102.9411765113.927248856071-10.9860723560715
7114.705882495.970920391717418.7349620082826
8114.7058824105.444188641519.26169375848992
9117.6470588111.2613138169766.38574498302432
10111.7647059118.938354188982-7.17364828898211
1197.05882353109.922910324241-12.8640867942415
1294.1176470692.29029106577381.82735599422621
1382.3529411891.4464249752709-9.09348379527088
1482.3529411880.53343873710931.81950244289065
1585.2941176584.58751873887350.706598911126541
1685.2941176580.69075988301594.60335776698413
1773.5294117685.4199553827698-11.8905436227698
1861.7647058873.2291967920726-11.4644909120726
1932.3529411858.5872303336638-26.2342891536638
2020.5882352934.8665123583125-14.2782770683125
215027.984210284817922.0157897151821
2270.5882352957.633510695721312.9547245942787
2376.4705882472.59022611127443.88036212872557
2479.4117647173.23335276641786.17841194358217
2573.5294117678.0989220812656-4.56951032126561
2676.4705882472.0079739754334.46261426456703
2773.5294117678.7722053689506-5.24279360895062
2870.5882352970.08642971155380.501805578446237
2964.7058823571.913390360985-7.20750801098503
3064.7058823564.5116485729530.194233777047068
3164.7058823560.06799456207294.63788778792709
3261.7647058861.35184192481020.412863955189781
335063.5404119793233-13.5404119793233
3447.0588235359.1103437866636-12.0515202566636
3535.2941176551.5755006765849-16.2813830265849
3620.5882352936.8981369858392-16.3099016958392
3741.1764705926.465230185271314.7112404047287
3847.0588235341.42813833267295.63068519732714
3944.1176470652.8363777441776-8.71873068417762
4035.2941176543.7774422791358-8.48332462913585
4141.1764705940.67632337611310.500147213886919
4258.8235294142.596503889234716.2270255207653
4329.4117647153.6854230404153-24.2736583304153
4455.8823529431.611443943668324.2709089963316
4555.8823529455.70519991648090.177153023519054
4664.7058823563.6744192138181.031463136182
4770.5882352966.03976367322684.5484716167732
4864.7058823566.5108062140631-1.80492386406311
4961.7647058864.3364092177825-2.57170333778247
5055.8823529460.068215243454-4.18586230345405
5173.5294117659.93154307813913.5978686818609
5261.7647058867.5966489242215-5.83194304422145
5367.6470588263.74124950888713.90580931111286
5467.6470588265.01014468885362.63691413114641
5555.8823529461.5709364669332-5.68858352693322
5652.9411764752.87056907945320.0706073905468203
5755.8823529454.2467768102461.63557612975403
5855.8823529462.2329492336114-6.35059629361144
5964.7058823558.1455848939916.56029745600893
6067.6470588260.37535373609867.27170508390143
6158.8235294165.892208383411-7.06867897341103
6241.1764705957.3052065985106-16.1287360085106
6341.1764705946.8421663428646-5.66569575286456
6441.1764705939.23081031387211.94566027612786
6544.1176470644.1410821631747-0.0234351031746805
6632.3529411844.1744807315322-11.8215395515322
675030.547967178464419.4520328215356
6847.0588235345.41952394708951.63929958291055
6958.8235294149.08274877416889.74078063583118
7070.5882352963.72472057749366.86351471250644
7167.6470588269.974731443895-2.32767262389501
7258.8235294163.096675681252-4.27314627125194
7361.7647058857.81695325462673.94775262537328
7455.8823529458.4018038962233-2.51945095622334
7567.6470588258.7353407145158.91171810548505
7667.6470588261.40833918548876.23871963451133
7767.6470588266.87486207152580.772196748474231
7867.6470588264.22012348708963.42693533291036
7979.4117647160.118622816323319.2931418936767
8076.4705882471.00251800706825.46807023293176
815074.0034503859922-24.0034503859922
8270.5882352957.157141568820613.4310937211794
8376.4705882468.06305247986428.40753576013584
8470.5882352969.92270774862530.665527541374659
8579.4117647167.492199457780611.9195652522194
8679.4117647172.95210895404446.4596557559556
8776.4705882478.4918508449737-2.02126260497373
8870.5882352969.28284550505761.30538978494244
8967.6470588268.7418081030667-1.09474928306669
9067.6470588263.56900159900424.07805722099579
9170.5882352959.392465991018411.1957692989816
925063.0443113978172-13.0443113978172
9361.7647058850.84381683841310.920889041587
9455.8823529464.5873842648895-8.70503132488945
9564.7058823556.62940686692228.07647548307782
9664.7058823558.26091108193026.4449712680698
9752.9411764761.4737955069276-8.53261903692764
9847.0588235350.2516772752893-3.19285374528927
9941.1764705949.3776777236911-8.20120713369113
10035.2941176537.7786601085497-2.48454245854970
10141.1764705937.16258777739054.01388281260949
10247.0588235339.34988669318877.70893683681133
10323.5294117640.6466745593912-17.1172627993912
1048.82352941222.6243848622709-13.8008554502709
105013.3320711635821-13.3320711635821


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
190.2819121215958110.5638242431916220.71808787840419
200.184506245011640.369012490023280.81549375498836
210.91322191865730.1735561626853990.0867780813426997
220.9362205655017960.1275588689964090.0637794344982045
230.9066538147724520.1866923704550960.0933461852275478
240.8605466987208980.2789066025582040.139453301279102
250.8412620369712090.3174759260575820.158737963028791
260.80939091141260.38121817717480.1906090885874
270.741095454065890.517809091868220.25890454593411
280.6834099325012120.6331801349975760.316590067498788
290.6104871655344140.7790256689311730.389512834465586
300.6475126953277530.7049746093444930.352487304672246
310.5965626301949580.8068747396100850.403437369805042
320.5186776746447130.9626446507105740.481322325355287
330.616626446311830.7667471073763410.383373553688171
340.5737431661033690.8525136677932620.426256833896631
350.5911864595334120.8176270809331750.408813540466588
360.6727025235556520.6545949528886960.327297476444348
370.8087907145698780.3824185708602450.191209285430122
380.7850940862631030.4298118274737940.214905913736897
390.7488161008353490.5023677983293020.251183899164651
400.710220311646880.579559376706240.28977968835312
410.675791304119680.648417391760640.32420869588032
420.789067031454890.4218659370902220.210932968545111
430.9065499199566680.1869001600866640.0934500800433318
440.9777633063525320.04447338729493710.0222366936474685
450.9685379575176030.06292408496479390.0314620424823969
460.9570717012942150.08585659741157030.0429282987057852
470.9599749559529850.08005008809402930.0400250440470147
480.9470488589068280.1059022821863440.052951141093172
490.928943379179810.1421132416403800.0710566208201902
500.9047724174372760.1904551651254480.095227582562724
510.926324736000990.1473505279980200.0736752639990101
520.9066549967777040.1866900064445920.0933450032222958
530.8801916529257280.2396166941485440.119808347074272
540.850514063951760.2989718720964790.149485936048240
550.8603822250494780.2792355499010430.139617774950522
560.8205273522073340.3589452955853310.179472647792666
570.7727245990087060.4545508019825890.227275400991294
580.745291649205710.5094167015885790.254708350794290
590.715642895482340.568714209035320.28435710451766
600.6759332666277410.6481334667445180.324066733372259
610.6490976897723670.7018046204552650.350902310227632
620.7377642409892780.5244715180214440.262235759010722
630.730923203372950.5381535932540990.269076796627049
640.6922255511251050.6155488977497910.307774448874896
650.6380982445144660.7238035109710680.361901755485534
660.7545587851990030.4908824296019930.245441214800997
670.7771254244709760.4457491510580490.222874575529024
680.7186500189573750.562699962085250.281349981042625
690.7669577588499590.4660844823000820.233042241150041
700.7543121185048780.4913757629902440.245687881495122
710.7047673008632450.5904653982735110.295232699136755
720.7335312375449960.5329375249100070.266468762455004
730.7181682030069910.5636635939860180.281831796993009
740.7248586874577710.5502826250844580.275141312542229
750.6589601431749350.682079713650130.341039856825065
760.5836447241110870.8327105517778260.416355275888913
770.4972357464483330.9944714928966660.502764253551667
780.5116433814207810.9767132371584390.488356618579219
790.4661901669546490.9323803339092970.533809833045351
800.525718234045740.948563531908520.47428176595426
810.7452407093023630.5095185813952740.254759290697637
820.6551944233678660.6896111532642680.344805576632134
830.5563576030765890.8872847938468230.443642396923411
840.6096911080358810.7806177839282390.390308891964119
850.4665561751272390.9331123502544790.533443824872761
860.3112220162112260.6224440324224520.688777983788774


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.0147058823529412OK
10% type I error level40.0588235294117647OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/1022yj1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/1022yj1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/1mysq1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/1mysq1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/2qrrv1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/2qrrv1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/3ii921258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/3ii921258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/4qlpp1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/4qlpp1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/5fk7u1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/5fk7u1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/62ehv1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/62ehv1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/7dnez1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/7dnez1258451409.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/8xa0a1258451409.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258451631r7nelll34v3xky4/8xa0a1258451409.ps (open in new window)


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