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:44:54 -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/t12584514961c3v9f336kbkdk6.htm/, Retrieved Tue, 17 Nov 2009 10:51:51 +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/t12584514961c3v9f336kbkdk6.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] = + 4.62068255335274 + 0.864369165995954Y0[t] + 0.0466691402331548Y1[t] + 0.000721395614455389Y2[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)4.620682553352743.4050341.3570.1778010.088901
Y00.8643691659959540.0997958.661400
Y10.04666914023315480.1317850.35410.7239790.361989
Y20.0007213956144553890.1014520.00710.9943410.49717


Multiple Linear Regression - Regression Statistics
Multiple R0.89062266616919
R-squared0.793208733494317
Adjusted R-squared0.787066418647613
F-TEST (value)129.138403564582
F-TEST (DF numerator)3
F-TEST (DF denominator)101
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation10.7653753234986
Sum Squared Residuals11705.223891435


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1108.8235294106.2402261170712.58330328292928
2111.7647059103.9767316993627.78797420063825
3117.6470588106.38597530284111.2610834971586
4111.7647059111.6056401998090.159065700191195
5120.5882353106.79776183376113.7904734662386
6102.9411765114.154267733574-11.2130912335739
7114.705882499.308237263671515.3976451363285
8114.7058824108.6600784842156.04580391578452
9117.6470588109.1963966828388.45066211716196
10111.7647059111.7471458819950.0175600180053583
1197.05882353106.799883585590-9.7410600555898
1294.1176470693.81616970556360.301477354436409
1382.3529411890.5833530629802-8.23041188298021
1482.3529411880.26643311711962.08650806288038
1585.2941176579.71526265679735.57885499320272
1685.2941176582.2490379019913.04507974800909
1773.5294117682.3863000791198-8.8568883191198
1861.7647058872.2193728125996-10.4546669325996
1932.3529411861.5012750939341-29.1483339139341
2020.5882352935.5211168539759-14.9328815639759
215023.970959057132826.0290409428672
2270.5882352948.823315362934621.7649199270654
2376.4705882467.98328589440158.4873023455985
2479.4117647174.04986316586425.36190154413578
2573.5294117676.8815020356571-3.35209027565709
2676.4705882471.93848320292144.53210503707855
2773.5294117674.2083428610683-0.678931101068292
2870.5882352971.7990992739786-1.21086398397855
2964.7058823569.1216965957762-4.41581424577616
3064.7058823563.89778816199160.80809418800839
3164.7058823563.6211420559271.08474029407296
3261.7647058863.6168985523134-1.85219267231344
335061.0746362998926-11.0746362998926
3447.0588235350.7683251130804-3.70950158308044
3535.2941176547.6748924003373-12.3807747503373
3620.5882352937.3600942062979-16.7718589162979
3741.1764705924.097612475227717.0788581147723
3847.0588235341.19865035747895.86017317252109
3944.1176470647.2334013436482-3.11575428364823
4035.2941176544.98051570814-9.68639805813999
4141.1764705937.22071027736223.95576031263779
4258.8235294141.891326499010416.9322029109896
4329.4117647157.4130591123727-28.0012944023727
4455.8823529432.818253154551423.0640997854486
4555.8823529454.33872216589081.54363077410924
4664.7058823555.55286424198279.15301810801725
4770.5882352963.19874676550647.3894885244936
4864.7058823568.6950578017347-3.98917545173471
4961.7647058863.8914229065712-2.12671702657121
5055.8823529461.0788798035062-5.19652686350622
5173.5294117655.852849617922117.6765621420779
5261.7647058870.8297770263825-9.06507114638247
5367.6470588261.48005757585896.16700124414111
5467.6470588266.02826388302581.61879493697422
5555.8823529466.2943012300564-10.4119482900564
5652.9411764756.1294957239867-3.18831925398665
5755.8823529453.03818476305032.84416817694970
5855.8823529455.4346978311150.44765510888496
5964.7058823555.56983825643719.13604409356287
6067.6470588263.19874676550644.4483120544936
6158.8235294166.1527955493139-7.32926613931388
6241.1764705958.6696362246007-17.4931656346007
6341.1764705943.0063979304959-1.82992734049588
6441.1764705942.1764596123022-0.999989022302173
6544.1176470642.16372910146141.95391795853861
6632.3529411844.7059913538822-12.3530501738822
675034.674204521327815.3257954786722
6847.0588235349.380851079144-2.32202754914401
6958.8235294147.653674882269311.1698545277307
7070.5882352957.698192225664512.8900430643355
7167.6470588268.4141681920566-0.767109372056546
7258.8235294166.4294416553784-7.60591224537845
7361.7647058858.67387972821433.09082615178573
7455.8823529460.8022336974417-4.91988075744165
7567.6470588255.848606114308511.7984527056915
7667.6470588265.74525252154081.90180629845918
7767.6470588266.29005772644281.35700109355723
7867.6470588266.298544733671.34851408633004
7979.4117647166.2985447336713.1132199763300
8076.4705882476.4675937519970.00299448800305158
815074.4743802085584-24.4743802085584
8270.5882352951.465244758232819.1229905317672
8376.4705882468.02359917874518.44698906125492
8470.5882352974.0498631658642-3.46162787586422
8579.4117647169.254715269750910.1570494402491
8679.4117647176.61122118455342.80054352544656
8776.4705882477.018764212786-0.548175972785977
8870.5882352974.4828672157928-3.89463192579276
8967.6470588269.2610805251785-1.61402170517853
9067.6470588266.44217216622641.20488665377355
9170.5882352966.30066648547684.28756880452325
925068.8408069860908-18.8408069860908
9361.7647058851.182233396273910.5824724837261
9455.8823529460.3925689178618-4.5102159778618
9564.7058823555.84224085888818.8636414911119
9664.7058823563.202990269121.50289208088000
9752.9411764763.610533296893-10.6693568268930
9847.0588235353.4478495426302-6.38902601263015
9941.1764705947.814276329273-6.63780573927295
10035.2941176542.4467404629464-7.15262281294635
10141.1764705937.08344810023334.09302248976667
10247.0588235341.88920474720365.16961878279638
10323.5294117647.2440101026894-23.7145983426894
1048.82352941227.1846799325505-18.3611505205505
105013.3795147582909-13.3795147582909


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.2466145638083300.4932291276166610.75338543619167
80.1297110245276210.2594220490552420.870288975472379
90.09829278721024660.1965855744204930.901707212789753
100.04695654356243970.09391308712487940.95304345643756
110.1812703748378100.3625407496756210.81872962516219
120.2525477895147910.5050955790295820.747452210485209
130.2734534155850330.5469068311700660.726546584414967
140.1969075482139550.3938150964279090.803092451786045
150.1516561629019080.3033123258038170.848343837098092
160.1063954984444830.2127909968889650.893604501555517
170.1342461402491570.2684922804983140.865753859750843
180.1439130202538480.2878260405076960.856086979746152
190.3426455808873750.6852911617747490.657354419112625
200.3037583461727230.6075166923454460.696241653827277
210.915902885291620.168194229416760.08409711470838
220.9266846694486950.1466306611026090.0733153305513047
230.911555222759610.1768895544807790.0884447772403893
240.8848515604571190.2302968790857620.115148439542881
250.859814273589360.280371452821280.14018572641064
260.8239680102489180.3520639795021630.176031989751082
270.7827851853190730.4344296293618530.217214814680926
280.7336835883332240.5326328233335520.266316411666776
290.6921611182877550.6156777634244890.307838881712245
300.6325368892098290.7349262215803420.367463110790171
310.5714157680598750.857168463880250.428584231940125
320.515479231522250.96904153695550.48452076847775
330.5287816686181640.9424366627636720.471218331381836
340.4714565770490260.9429131540980520.528543422950974
350.5007581540203270.9984836919593450.499241845979673
360.5638028300751040.8723943398497920.436197169924896
370.6812504948143920.6374990103712170.318749505185608
380.6423605315973970.7152789368052050.357639468402603
390.5932313234173520.8135373531652960.406768676582648
400.576280144499280.847439711001440.42371985550072
410.5298326407823550.940334718435290.470167359217645
420.5971812460866440.8056375078267110.402818753913356
430.8746178846962510.2507642306074970.125382115303749
440.9562575738953870.08748485220922660.0437424261046133
450.941769137769390.1164617244612200.0582308622306101
460.938245388194560.1235092236108820.0617546118054409
470.9286303997347460.1427392005305080.0713696002652539
480.9102204602526420.1795590794947160.0897795397473578
490.8858607161471290.2282785677057420.114139283852871
500.8643152900461980.2713694199076040.135684709953802
510.906770248458060.1864595030838790.0932297515419393
520.898930377178330.2021392456433390.101069622821670
530.8816378081181730.2367243837636540.118362191881827
540.8506498655448010.2987002689103970.149350134455199
550.8480475286343520.3039049427312970.151952471365649
560.815437497199230.369125005601540.18456250280077
570.7762157726380170.4475684547239660.223784227361983
580.730726681595940.5385466368081210.269273318404061
590.720431523053380.5591369538932410.279568476946620
600.6806744605611460.6386510788777090.319325539438854
610.64898807562070.7020238487585990.351011924379300
620.735145382115090.5297092357698210.264854617884911
630.6873866534410910.6252266931178180.312613346558909
640.6330987826629680.7338024346740630.366901217337032
650.582818448775610.834363102448780.41718155122439
660.5833519072435620.8332961855128760.416648092756438
670.6660329304890520.6679341390218950.333967069510948
680.6104563774683940.7790872450632110.389543622531606
690.6812392257940940.6375215484118130.318760774205906
700.7529417125682640.4941165748634730.247058287431736
710.718506448031790.562987103936420.28149355196821
720.6806543675662040.6386912648675920.319345632433796
730.622816015337330.7543679693253390.377183984662670
740.5748892868886610.8502214262226780.425110713111339
750.6150428005685450.769914398862910.384957199431455
760.5602446866357770.8795106267284470.439755313364223
770.5133504388269230.9732991223461550.486649561173078
780.4477851140861580.8955702281723170.552214885913842
790.493211792404270.986423584808540.50678820759573
800.4277875535897640.8555751071795290.572212446410236
810.7089944593407570.5820110813184860.291005540659243
820.7850190403453120.4299619193093770.214980959654688
830.7659642025266880.4680715949466240.234035797473312
840.7033668639195380.5932662721609250.296633136080462
850.7036692002946530.5926615994106950.296330799705347
860.6372191756865910.7255616486268180.362780824313409
870.5570514089288320.8858971821423360.442948591071168
880.4878317618904710.9756635237809430.512168238109529
890.4082682154840010.8165364309680030.591731784515999
900.3240649545224180.6481299090448360.675935045477582
910.2636788812415170.5273577624830340.736321118758483
920.4145880459557960.8291760919115920.585411954044204
930.4374335298678810.8748670597357620.562566470132119
940.3684491226919020.7368982453838030.631550877308098
950.58653254991460.82693490017080.4134674500854
960.4546999809495250.9093999618990510.545300019050475
970.3312376382433430.6624752764866860.668762361756657
980.2043896913980460.4087793827960910.795610308601954


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 level20.0217391304347826OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/10zfbr1258451089.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/10zfbr1258451089.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/4574t1258451089.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/4574t1258451089.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/59i831258451089.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/59i831258451089.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/6q1u71258451089.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/6q1u71258451089.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/750ut1258451089.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/750ut1258451089.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/94fz41258451089.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584514961c3v9f336kbkdk6/94fz41258451089.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No 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