Home » date » 2009 » Nov » 20 »

Workshop 7

*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: Fri, 20 Nov 2009 08:23:47 -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/20/t1258730949tujo67p30qbkpwf.htm/, Retrieved Fri, 20 Nov 2009 16:29:22 +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/20/t1258730949tujo67p30qbkpwf.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 «
33 62 39 64 45 62 46 64 45 64 45 69 49 69 50 65 54 56 59 58 58 53 56 62 48 55 50 60 52 59 53 58 55 53 43 57 42 57 38 53 41 54 41 53 39 57 34 57 27 55 15 49 14 50 31 49 41 54 43 58 46 58 42 52 45 56 45 52 40 59 35 53 36 52 38 53 39 51 32 50 24 56 21 52 12 46 29 48 36 46 31 48 28 48 30 49 38 53 27 48 40 51 40 48 44 50 47 55 45 52 42 53 38 52 46 55 37 53 41 53 40 56 33 54 34 52 36 55 36 54 38 59 42 56 35 56 25 51 24 53 22 52 27 51 17 46 30 49 30 46 34 55 37 57 36 53 33 52 33 53 33 50 37 54 40 53 35 50 37 51 43 52 42 47 33 51 39 49 40 53 37 52 44 45 42 53 43 51 40 48 30 48 30 48 31 48 18 40 24 43 22 40 26 39 28 39 23 36 17 41 12 39 9 40 19 39 21 46 18 40 18 37 15 37 24 44 18 41 19 40 30 36 33 38 35 43 36 42 47 45 46 46
 
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
Spaar[t] = + 36.0876640540603 + 0.426549024778832Alg_E[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)36.08766405406031.6392222.015100
Alg_E0.4265490247788320.0446129.561200


Multiple Linear Regression - Regression Statistics
Multiple R0.659133991381146
R-squared0.434457618594041
Adjusted R-squared0.429705161607436
F-TEST (value)91.417475175179
F-TEST (DF numerator)1
F-TEST (DF denominator)119
p-value2.22044604925031e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.21474437315503
Sum Squared Residuals3236.03350640490


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16250.163781871761711.8362181282383
26452.723076020434711.2769239795653
36255.28237016910776.7176298308923
46455.70891919388658.29108080611347
56455.28237016910778.7176298308923
66955.282370169107713.7176298308923
76956.98856626822312.0114337317770
86557.41511529300197.58488470699815
95659.1213113921172-3.12131139211718
105861.2540565160113-3.25405651601134
115360.8275074912325-7.82750749123251
126259.97440944167482.02559055832516
135556.5620172434442-1.56201724344419
146057.41511529300192.58488470699815
155958.26821334255950.731786657440484
165858.6947623673383-0.694762367338348
175359.547860416896-6.54786041689601
185754.429272119552.57072788044997
195754.00272309477122.9972769052288
205352.29652699565590.703473004344129
215453.57617406999240.423825930007633
225353.5761740699924-0.576174069992367
235752.72307602043474.2769239795653
245750.59033089654056.40966910345946
255547.60448772308877.39551227691128
264942.48589942574276.51410057425726
275042.05935040096397.9406495990361
284949.310683822204-0.310683822204048
295453.57617406999240.423825930007633
305854.429272119553.57072788044997
315855.70891919388652.29108080611347
325254.0027230947712-2.0027230947712
335655.28237016910770.717629830892306
345255.2823701691077-3.28237016910769
355953.14962504521355.85037495478646
365351.01687992131941.98312007868062
375251.44342894609820.556571053901792
385352.29652699565590.703473004344129
395152.7230760204347-1.72307602043470
405049.73723284698290.262767153017120
415646.32484064875229.67515935124777
425245.04519357441576.95480642558427
434641.20625235140624.79374764859376
444848.4575857726464-0.457585772646385
454651.4434289460982-5.44342894609821
464849.310683822204-1.31068382220405
474848.0310367478676-0.0310367478675531
484948.88413479742520.115865202574783
495352.29652699565590.703473004344129
504847.60448772308870.395512276911279
515153.1496250452135-2.14962504521354
524853.1496250452135-5.14962504521354
535054.8558211443289-4.85582114432886
545556.1354682186654-1.13546821866536
555255.2823701691077-3.28237016910769
565354.0027230947712-1.00272309477120
575252.2965269956559-0.296526995655871
585555.7089191938865-0.708919193886526
595351.86997797087701.13002202912296
605353.5761740699924-0.576174069992367
615653.14962504521352.85037495478646
625450.16378187176173.83621812823829
635250.59033089654051.40966910345946
645551.44342894609823.55657105390179
655451.44342894609822.55657105390179
665952.29652699565596.70347300434413
675654.00272309477121.9972769052288
685651.01687992131944.98312007868062
695146.75138967353114.24861032646894
705346.32484064875226.67515935124777
715245.47174259919466.52825740080544
725147.60448772308873.39551227691128
734643.33899747530042.6610025246996
744948.88413479742520.115865202574783
754648.8841347974252-2.88413479742522
765550.59033089654054.40966910345946
775751.86997797087705.13002202912296
785351.44342894609821.55657105390179
795250.16378187176171.83621812823829
805350.16378187176172.83621812823829
815050.1637818717617-0.163781871761712
825451.86997797087702.13002202912296
835353.1496250452135-0.149625045213535
845051.0168799213194-1.01687992131938
855151.8699779708770-0.86997797087704
865254.42927211955-2.42927211955003
874754.0027230947712-7.0027230947712
885150.16378187176170.836218128238288
894952.7230760204347-3.7230760204347
905353.1496250452135-0.149625045213535
915251.86997797087700.130022029122961
924554.8558211443289-9.85582114432886
935354.0027230947712-1.00272309477120
945154.42927211955-3.42927211955003
954853.1496250452135-5.14962504521354
964848.8841347974252-0.884134797425217
974848.8841347974252-0.884134797425217
984849.310683822204-1.31068382220405
994043.7655465000792-3.76554650007923
1004346.3248406487522-3.32484064875223
1014045.4717425991946-5.47174259919456
1023947.1779386983099-8.17793869830989
1033948.0310367478676-9.03103674786755
1043645.8982916239734-9.8982916239734
1054143.3389974753004-2.33899747530040
1063941.2062523514062-2.20625235140624
1074039.92660527706970.0733947229302516
1083944.1920955248581-5.19209552485807
1094645.04519357441570.95480642558427
1104043.7655465000792-3.76554650007923
1113743.7655465000792-6.76554650007923
1123742.4858994257427-5.48589942574274
1134446.3248406487522-2.32484064875223
1144143.7655465000792-2.76554650007923
1154044.1920955248581-4.19209552485807
1163648.8841347974252-12.8841347974252
1173850.1637818717617-12.1637818717617
1184351.0168799213194-8.01687992131938
1194251.4434289460982-9.4434289460982
1204556.1354682186654-11.1354682186654
1214655.7089191938865-9.70891919388653


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.01665899718086930.03331799436173860.983341002819131
60.1253595718655630.2507191437311260.874640428134437
70.1078643632979760.2157287265959520.892135636702024
80.06867186298538590.1373437259707720.931328137014614
90.4367059370624840.8734118741249690.563294062937516
100.3973203113179860.7946406226359710.602679688682014
110.525607304287470.948785391425060.47439269571253
120.4541874668582730.9083749337165460.545812533141727
130.5651549916892730.8696900166214540.434845008310727
140.4870800112381960.9741600224763920.512919988761804
150.4105243341315820.8210486682631650.589475665868417
160.3439484998684370.6878969997368730.656051500131563
170.3946761709679390.7893523419358790.605323829032061
180.4350742208080180.8701484416160350.564925779191982
190.4630585369350220.9261170738700430.536941463064978
200.642115482470990.7157690350580190.357884517529010
210.6852581981988070.6294836036023860.314741801801193
220.7288662814565350.542267437086930.271133718543465
230.7003450744001780.5993098511996440.299654925599822
240.6828188780440440.6343622439119120.317181121955956
250.6893234123991430.6213531752017150.310676587600857
260.7483888529130450.5032222941739110.251611147086955
270.7567483673147580.4865032653704840.243251632685242
280.7810196797194950.4379606405610090.218980320280505
290.753873195351150.4922536092976990.246126804648849
300.7183513601827550.563297279634490.281648639817245
310.6756454226973260.6487091546053480.324354577302674
320.6751575653386730.6496848693226550.324842434661327
330.6317056459964770.7365887080070460.368294354003523
340.6389342065902350.722131586819530.361065793409765
350.6310531785543810.7378936428912380.368946821445619
360.5985523909142940.8028952181714110.401447609085706
370.5727204056390940.8545591887218120.427279594360906
380.5388035493418690.9223929013162610.461196450658131
390.5310182467513190.9379635064973620.468981753248681
400.5122922770025970.9754154459948060.487707722997403
410.5694303066122880.8611393867754230.430569693387712
420.572338407664560.855323184670880.42766159233544
430.5757003872368650.848599225526270.424299612763135
440.5721749476790080.8556501046419850.427825052320992
450.6543441746852020.6913116506295970.345655825314798
460.6460261868558390.7079476262883220.353973813144161
470.6252803960682160.7494392078635670.374719603931784
480.5973735330759350.8052529338481290.402626466924065
490.5566851340014030.8866297319971940.443314865998597
500.5283234302815040.9433531394369920.471676569718496
510.5032503631299670.9934992737400660.496749636870033
520.5345156606056220.9309686787887570.465484339394378
530.5444101722784120.9111796554431760.455589827721588
540.4978270880760070.9956541761520150.502172911923993
550.473368142990150.946736285980300.52663185700985
560.4297578162974820.8595156325949640.570242183702518
570.3874798664522970.7749597329045940.612520133547703
580.3419431805141390.6838863610282770.658056819485861
590.3035470253530620.6070940507061240.696452974646938
600.2652209124074030.5304418248148050.734779087592597
610.2429840952097400.4859681904194810.75701590479026
620.2303940472096560.4607880944193110.769605952790344
630.2025310072181530.4050620144363070.797468992781847
640.1920499367793750.3840998735587490.807950063220625
650.1745554076694780.3491108153389550.825444592330522
660.2251748901054010.4503497802108020.774825109894599
670.2089706408987860.4179412817975720.791029359101214
680.23109781764510.46219563529020.7689021823549
690.2333671302976640.4667342605953290.766632869702336
700.2881201976679430.5762403953358870.711879802332057
710.3546434329507480.7092868659014960.645356567049252
720.3656667672312140.7313335344624280.634333232768786
730.3727191017654790.7454382035309570.627280898234521
740.3525364126973410.7050728253946820.647463587302659
750.3428883622943650.685776724588730.657111637705635
760.3975965637774220.7951931275548450.602403436222578
770.5004721654168220.9990556691663560.499527834583178
780.5083352556582510.9833294886834980.491664744341749
790.5262489098545040.9475021802909930.473751090145496
800.5792317308059550.8415365383880910.420768269194045
810.5731510559554560.8536978880890880.426848944044544
820.628397632357930.743204735284140.37160236764207
830.6391261165224010.7217477669551970.360873883477599
840.6359263577155130.7281472845689730.364073642284487
850.6402953460456840.7194093079086330.359704653954316
860.6328158505990410.7343682988019180.367184149400959
870.6397018683463090.7205962633073820.360298131653691
880.6852945995624110.6294108008751780.314705400437589
890.6690695789011440.6618608421977110.330930421098856
900.727230887384940.5455382252301190.272769112615060
910.797308279224220.4053834415515590.202691720775779
920.8233967958199620.3532064083600770.176603204180038
930.882749625825050.23450074834990.11725037417495
940.909261368100550.1814772637989010.0907386318994506
950.9146917744858520.1706164510282960.0853082255141479
960.9448510955381170.1102978089237650.0551489044618827
970.9719457281939020.05610854361219630.0280542718060982
980.9902049461102060.01959010777958740.0097950538897937
990.9870615942783580.02587681144328500.0129384057216425
1000.9857977377268390.02840452454632280.0142022622731614
1010.9811327758128970.03773444837420670.0188672241871033
1020.9791299232595950.041740153480810.020870076740405
1030.97769728618220.04460542763559820.0223027138177991
1040.9874415522181170.02511689556376510.0125584477818825
1050.9800288012512270.03994239749754690.0199711987487734
1060.9667024290713650.06659514185726930.0332975709286346
1070.9497453551516850.1005092896966310.0502546448483155
1080.9243797655231790.1512404689536420.075620234476821
1090.9709237761926060.05815244761478860.0290762238073943
1100.9518331572561240.09633368548775110.0481668427438756
1110.92919934152470.1416013169506000.0708006584753002
1120.8925006542286380.2149986915427240.107499345771362
1130.8977973971862590.2044052056274820.102202602813741
1140.8835233593885220.2329532812229570.116476640611478
1150.951925896096940.09614820780611980.0480741039030599
1160.9334302264202720.1331395471594570.0665697735797285


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


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/1p5k91258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/1p5k91258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/20iba1258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/20iba1258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/3kr151258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/3kr151258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/4kd7c1258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/4kd7c1258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/5x9qz1258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/5x9qz1258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/6dsat1258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/6dsat1258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/7dzi41258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/7dzi41258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/8avv41258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/8avv41258730622.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/915cd1258730622.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258730949tujo67p30qbkpwf/915cd1258730622.ps (open in new window)


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