Home » date » 2010 » Nov » 23 »

*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, 23 Nov 2010 13:01:30 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq.htm/, Retrieved Tue, 23 Nov 2010 14:00:33 +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/2010/Nov/23/t1290517233c2qf0vauesx37dq.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
38 23 10 11 35 37 12 36 15 10 11 35 37 12 23 25 10 11 35 37 12 30 18 10 11 35 37 12 26 21 10 11 35 37 12 26 19 10 11 35 37 12 30 15 13 12 38 34 12 27 22 10 11 35 37 12 34 19 10 11 35 37 14 28 20 13 9 34 32 12 36 26 10 11 35 37 12 42 26 10 11 35 37 12 31 21 10 11 35 37 14 26 19 10 11 35 37 12 16 19 13 12 38 34 12 23 19 10 11 35 37 14 45 28 10 11 35 37 12 30 27 10 11 35 37 15 45 18 10 11 35 37 12 30 19 10 11 35 37 15 24 24 10 11 35 37 12 29 21 13 12 38 34 12 30 22 13 9 34 32 12 31 25 10 11 35 37 14 34 15 10 11 35 37 14 41 34 10 11 35 37 12 37 23 10 11 35 37 12 33 19 10 11 35 37 12 48 15 10 11 35 37 14 44 15 10 11 35 37 15 29 17 10 11 35 37 14 44 30 13 9 34 32 12 43 28 10 11 35 37 14 31 23 10 11 35 37 14 28 23 10 11 35 37 12 26 21 10 11 35 37 14 30 18 10 11 35 37 12 27 19 15 11 33 36 12 34 24 10 11 35 37 12 47 15 10 11 35 37 12 37 24 13 16 34 36 12 27 20 10 11 35 37 12 30 20 10 11 35 37 12 36 44 10 11 35 37 14 39 20 10 11 35 37 12 32 20 10 11 35 37 12 25 20 10 11 35 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 time12 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
CM+D[t] = + 44.1744764200473 + 0.355225335188637`PE+PC`[t] -0.223616457775059happiness[t] + 0.253261494075167depression[t] -0.457390995302612connected[t] -0.134163985832665separated[t] + 0.0731026269579095populariteit[t] + 0.00173563261092779t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)44.174476420047350.901410.86780.3872410.193621
`PE+PC`0.3552253351886370.1122633.16420.0019780.000989
happiness-0.2236164577750591.298405-0.17220.8635570.431778
depression0.2532614940751670.5991770.42270.6732960.336648
connected-0.4573909953026120.676092-0.67650.5000330.250017
separated-0.1341639858326651.036453-0.12940.8972260.448613
populariteit0.07310262695790950.5985370.12210.9029990.4515
t0.001735632610927790.0177240.09790.9221590.46108


Multiple Linear Regression - Regression Statistics
Multiple R0.293957093886829
R-squared0.08641077304639
Adjusted R-squared0.0322148019559215
F-TEST (value)1.59441322496364
F-TEST (DF numerator)7
F-TEST (DF denominator)118
p-value0.143625117302426
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.94948698655691
Sum Squared Residuals5698.85358640621


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13832.8005858311685.19941416883201
23629.96051878226986.03948121773016
32333.5145077667671-10.5145077667671
43031.0296660530576-1.02966605305760
52632.0970776912344-6.09707769123444
62631.3883626534681-5.3883626534681
73028.58192803766461.41807196233537
82732.4575099242559-5.45750992425586
93431.53977480521672.46022519478330
102831.7013690820909-3.70136908209087
113633.88361816284322.11638183715681
124233.88535379545418.11464620454588
133132.2571680060377-1.25716800603768
142631.4022477143555-5.40224771435552
151630.0167144393066-14.0167144393066
162331.5519242334932-8.5519242334932
174534.60448262888610.3955173711140
183034.4703008071820-4.47030080718205
194531.055700542221513.9442994577785
203031.6319693908948-1.63196939089481
212433.1905238185752-9.1905238185752
222930.7393145379604-1.73931453796036
233032.4343829764102-2.43438297641020
243133.6971613055124-2.69716130551243
253430.1466435862373.85335641376300
264136.75145533351624.2485446664838
273732.84571227905214.15428772094788
283331.42654657090851.57345342909149
294830.153586116680717.8464138833193
304430.228424376249513.7715756237505
312930.8675080522798-1.86750805227983
324435.29180635141768.70819364858235
334334.77845800457678.2215419954233
343133.0040669612444-2.00406696124444
352832.8595973399395-4.85959733993954
362632.297087556089-6.29708755608902
373031.0869419292182-1.08694192921822
382731.3747665845804-4.37476658458038
393433.22176520557190.778234794428106
404730.026472821485116.9735271785149
413734.41224954897972.58775045102032
422731.8060707626501-4.80607076265013
433031.8078063952611-1.80780639526106
443640.4811553263151-4.48115532631508
453931.81127766048297.18872233951709
463231.81301329309380.186986706906158
472531.8147489257048-6.81474892570477
481928.6194565416180-9.61945654161797
492932.1734455261153-3.17344552611526
502632.1260197217166-6.12601972171661
513130.07919721330.920802786700005
523132.1786524239480-1.17865242394805
533130.97879459667820.0212054033218439
543931.47167301879267.52832698120737
552832.1838593217808-4.18385932178083
562230.4094682784486-8.40946827844857
573131.4768799166254-0.476879916625412
583631.62482080315224.37517919684784
592830.4146751762814-2.41467517628136
603933.25821349040145.74178650959862
613532.19427311744642.80572688255360
623331.84078341486871.15921658513131
632731.487293712291-4.48729371229098
643332.90993068565650.0900693143435477
653131.1355396423242-0.135539642324197
663931.63870586403967.36129413596042
673733.06134283740513.93865716259494
682431.7152797562193-7.71527975621935
692832.5970159466172-4.59701594661715
703727.98082222177589.0191777782242
713233.0682853678488-1.06828536784877
723129.04996949256361.95003050743643
732929.4069304603631-0.406930460363133
744035.41386435808624.58613564191381
754032.72000256310387.27999743689616
761529.7337302602899-14.7337302602899
772729.6863044558912-2.68630445589121
783232.1746174348226-0.174617434822594
792832.2255145044431-4.22551450444309
804136.63615941323354.36384058676652
814732.939436440042214.0605635599578
824235.42774941897366.57225058102639
833233.3393465179255-1.33934651792547
843333.874401889126-0.87440188912601
852935.0777309816178-6.07773098161775
863732.38386918663544.61613081336459
873930.68258077026118.31741922973894
882930.8202338571869-1.8202338571869
893332.95332150092960.0466784990703529
903131.1297690205878-0.129769020587818
912131.7551993062707-10.7551993062707
923634.88086032862141.11913967137857
933235.237821296421-3.23782129642100
941531.5410983232297-16.5410983232297
952533.6250245299629-8.62502452996291
962830.1236682476971-2.12366824769705
973933.32243189700575.6775681029943
983129.01230207034341.98769792965658
994028.707973804775311.2920261952247
1002531.5515121188953-6.5515121188953
1013633.83080501655392.16919498344613
1022329.2146112917125-6.21461129171252
1033930.13581767597358.86418232402646
1043133.8360119143867-2.83601191438666
1052329.7840636060068-6.78406360600676
1063131.7081311684767-0.708131168476692
1072832.9354014509168-4.93540145091677
1084731.516235742773215.4837642572268
1092532.141666028456-7.14166602845602
1102630.4540310024291-4.4540310024291
1112432.4053505670329-8.40535056703291
1123032.8573235966661-2.85732359666608
1132533.4715390914006-8.47153909140057
1144431.871401249833312.1285987501667
1153840.6774878686489-2.67748786864887
1163629.09270489434976.9072951056503
1173433.39077698231900.609223017681041
1184532.059315913700712.9406840862993
1192931.3754690572301-2.37546905723012
1202532.2966754414911-7.29667544149113
1213033.364087079668-3.36408707966797
1222732.237331879356-5.23733187935599
1234433.513763598805610.4862364011944
1243136.5663219941985-5.56632199419849
1253533.72625494530031.27374505469968
1264737.28024392979769.71975607020239


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.7741795510421040.4516408979157920.225820448957896
120.8149145520900870.3701708958198260.185085447909913
130.729755094369280.540489811261440.27024490563072
140.6795800198238570.6408399603522870.320419980176143
150.7603637058842260.4792725882315480.239636294115774
160.7352125131111030.5295749737777940.264787486888897
170.8353978488981680.3292043022036640.164602151101832
180.7808579137529480.4382841724941040.219142086247052
190.8578932390138640.2842135219722710.142106760986136
200.8052888542008960.3894222915982080.194711145799104
210.8766043737022560.2467912525954890.123395626297744
220.8409286242566530.3181427514866940.159071375743347
230.7919972538685190.4160054922629620.208002746131481
240.7380387401435440.5239225197129130.261961259856457
250.6823558993028250.6352882013943490.317644100697175
260.628397732480640.743204535038720.37160226751936
270.5606895323393610.8786209353212770.439310467660639
280.4993725420220450.998745084044090.500627457977955
290.712494630997280.575010738005440.28750536900272
300.7589564962590270.4820870074819460.241043503740973
310.7628083824437750.4743832351124510.237191617556225
320.7778945687454230.4442108625091540.222105431254577
330.764031850003810.4719362999923790.235968149996189
340.754397002799980.4912059944000390.245602997200020
350.7905180381004770.4189639237990450.209481961899523
360.8155544294973420.3688911410053160.184445570502658
370.7896373844112930.4207252311774150.210362615588707
380.7603812151786110.4792375696427780.239618784821389
390.7147045690093870.5705908619812260.285295430990613
400.8345937487057460.3308125025885080.165406251294254
410.7956537936076150.408692412784770.204346206392385
420.8107828480860150.3784343038279690.189217151913985
430.787891153546170.4242176929076590.212108846453829
440.7533709671292240.4932580657415520.246629032870776
450.7356458006680170.5287083986639650.264354199331983
460.6975717508985620.6048564982028770.302428249101438
470.7225661270982480.5548677458035050.277433872901752
480.7919149412724330.4161701174551350.208085058727567
490.7602613008875480.4794773982249040.239738699112452
500.7530226358098980.4939547283802040.246977364190102
510.7205585906136660.5588828187726680.279441409386334
520.674546944615520.650906110768960.32545305538448
530.6258850264867990.7482299470264020.374114973513201
540.6258987781054330.7482024437891350.374101221894567
550.5946853003074550.810629399385090.405314699692545
560.6210038184032790.7579923631934430.378996181596721
570.5685701710143480.8628596579713040.431429828985652
580.5318042796019890.9363914407960220.468195720398011
590.4846531007382080.9693062014764160.515346899261792
600.4652739070457570.9305478140915140.534726092954243
610.4192161746982320.8384323493964640.580783825301768
620.3681645393321070.7363290786642140.631835460667893
630.3389689412269120.6779378824538240.661031058773088
640.2907781865500270.5815563731000540.709221813449973
650.2461149123342440.4922298246684880.753885087665756
660.2465637890466220.4931275780932440.753436210953378
670.2185501569100420.4371003138200840.781449843089958
680.2301916793145330.4603833586290660.769808320685467
690.2165168481306240.4330336962612480.783483151869376
700.2376425059757140.4752850119514270.762357494024286
710.1990564218904210.3981128437808420.800943578109579
720.1652637641805250.3305275283610490.834736235819476
730.1378532133499850.2757064266999710.862146786650015
740.1202593067360450.2405186134720910.879740693263955
750.121986672590530.243973345181060.87801332740947
760.2385922037746780.4771844075493560.761407796225322
770.2046620996283550.409324199256710.795337900371645
780.1684648272293860.3369296544587710.831535172770614
790.1494033217441320.2988066434882640.850596678255868
800.1293022206634390.2586044413268780.870697779336561
810.2295857606627970.4591715213255950.770414239337203
820.2362929497024040.4725858994048080.763707050297596
830.2125691280665950.425138256133190.787430871933405
840.1794519760608260.3589039521216510.820548023939174
850.1596925693253290.3193851386506580.840307430674671
860.1523426088338210.3046852176676430.847657391166179
870.2034651835262830.4069303670525660.796534816473717
880.1663267419460950.3326534838921890.833673258053905
890.1380556974819640.2761113949639280.861944302518036
900.1075984544069100.2151969088138190.89240154559309
910.1186363424519630.2372726849039260.881363657548037
920.1067106758199590.2134213516399180.89328932418004
930.08751513262486150.1750302652497230.912484867375138
940.1881704979458090.3763409958916170.811829502054191
950.21023346831170.42046693662340.7897665316883
960.1695701361166150.3391402722332310.830429863883385
970.1596102763318970.3192205526637930.840389723668103
980.1259184669423680.2518369338847360.874081533057632
990.2004562881983540.4009125763967090.799543711801646
1000.1711946944271040.3423893888542080.828805305572896
1010.1556420411250330.3112840822500660.844357958874967
1020.1256872195845050.2513744391690100.874312780415495
1030.2045195674387530.4090391348775060.795480432561247
1040.1713360190501860.3426720381003730.828663980949814
1050.1307675358935260.2615350717870520.869232464106474
1060.1213400269227360.2426800538454710.878659973077264
1070.1190359892873440.2380719785746880.880964010712656
1080.2484814307765160.4969628615530320.751518569223484
1090.1888952655817880.3777905311635750.811104734418212
1100.1912281573872800.3824563147745590.80877184261272
1110.1316933933912590.2633867867825190.86830660660874
1120.0867317670122280.1734635340244560.913268232987772
1130.17305551589780.34611103179560.8269444841022
1140.1151740462331490.2303480924662970.884825953766851
1150.06585745660195570.1317149132039110.934142543398044


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/2010/Nov/23/t1290517233c2qf0vauesx37dq/10nz8t1290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/10nz8t1290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/1gyt01290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/1gyt01290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/2gyt01290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/2gyt01290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/3r7sl1290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/3r7sl1290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/4r7sl1290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/4r7sl1290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/5jyao1290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/5jyao1290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/6jyao1290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/6jyao1290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/7u7r81290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/7u7r81290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/8u7r81290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/8u7r81290517274.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/9nz8t1290517274.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290517233c2qf0vauesx37dq/9nz8t1290517274.ps (open in new window)


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