Home » date » 2008 » Dec » 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: Wed, 17 Dec 2008 11:39:55 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni.htm/, Retrieved Wed, 17 Dec 2008 19:48:28 +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/2008/Dec/17/t1229539708vipcu7q4zoi50ni.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
1721 0 0.44 1476 0 0.09 1842 0 0.2 2171 0 0.82 1670 0 0.5 1540 0 0.2 1266 0 1 897 0 0.47 1266 0 0.49 1519 0 0.82 1074 0 0.39 1435 0 0.6 1385 0 0.59 1440 0 0.72 1883 0 0.97 1822 0 0.58 1661 0 0.27 1774 0 0.84 1133 0 0.51 1361 0 0.13 1688 0 0.65 2216 0 0.51 2896 0 1.06 1382 0 0.81 1330 0 0.54 1419 0 0.85 1662 0 0.93 2040 0 0.29 2126 0 1.01 1649 0 0.65 1610 0 0.88 1952 0 0.45 2102 0 0.74 1749 0 1.08 2091 0 0.27 3036 0 0.24 2414 0 0.27 2097 0 0.25 2705 0 0.69 2431 0 0.73 4192 1 1.04 3990 0 1.04 2854 0 0.3 1966 0 0.59 2431 0 0.72 2763 0 0.22 2831 0 1.12 2023 0 0.93 2934 0 0.99 2489 0 0.56 3252 0 1 3018 0 0.57 3193 0 1 3976 0 0.97 2584 0 0.3 2512 0 0.45 2169 0 0.73 2504 0 1.13 1843 0 0.65 1408 -1 0.64 2179 0 0.68 3690 0 0.41 2372 0 0.98 2494 0 0.3 3872 0 0.37 2786 0 1.12 2312 0 0.4 1599 0 0.5 3167 0 1.23 3433 0 0.94 2648 0 1.08 1978 0 1.12 1947 0 0.83 3113 0 1.22 2856 0 0.55 3174 0 0.38 3507 0 1.26 4174 0 0.49 2978 0 1.13 4428 0 1.07 2832 0 0.86 2930 0 0.94 3681 0 0.45 3253 0 0.66 1660 -1 0.71 2208 0 0.54 3139 0 0.9 3409 0 1.23 3445 0 0.46 2410 0 1.33 3262 0 0.64 2897 0 0.9 2526 0 0.5 3982 0 1.37 4097 0 0.96 3403 0 0.62 3362 0 1.24 2708 0 1.1 3129 0 0.86 3550 0 1.2 2696 0 0.77 2885 0 0.67 2945 0 1.05 3600 0 1.32 3808 0 0.6 3671 0 1.31 4005 0 1.41
 
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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 1289.31020876413 + 1344.84084081993D[t] + 84.7943996269861X[t] -56.5131772164014M1[t] -30.5909616006774M2[t] + 181.617856851149M3[t] + 312.240342762376M4[t] + 388.071705980489M5[t] + 381.063287160659M6[t] -99.2947460441981M7[t] -86.0185223282531M8[t] -25.3256950165499M9[t] + 246.771409676564M10[t] + 280.256148923197M11[t] + 19.6106820481556t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1289.31020876413236.2293785.457900
D1344.84084081993341.4371273.93880.0001598e-05
X84.7943996269861189.5299420.44740.6556430.327821
M1-56.5131772164014266.835558-0.21180.8327390.41637
M2-30.5909616006774270.337991-0.11320.9101520.455076
M3181.617856851149270.2819460.6720.5032950.251648
M4312.240342762376270.085351.15610.2506420.125321
M5388.071705980489278.3485161.39420.1666170.083309
M6381.063287160659270.4361261.40910.1621860.081093
M7-99.2947460441981270.162464-0.36750.7140630.357031
M8-86.0185223282531270.56776-0.31790.7512670.375634
M9-25.3256950165499270.154464-0.09370.9255150.462758
M10246.771409676564272.2378150.90650.3670630.183531
M11280.256148923197270.578661.03580.3030260.151513
t19.61068204815561.9393110.112200


Multiple Linear Regression - Regression Statistics
Multiple R0.800301280676477
R-squared0.640482139852408
Adjusted R-squared0.585772900264731
F-TEST (value)11.7070195944868
F-TEST (DF numerator)14
F-TEST (DF denominator)92
p-value5.55111512312578e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation548.764103764027
Sum Squared Residuals27705067.8253541


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
117211289.71724943176431.282750568238
214761305.57210722619170.427892773808
318421546.71899168514295.281008314856
421711749.52468741326421.475312586742
516701817.83252479889-147.832524798892
615401804.99646813912-264.996468139121
712661412.08463668401-146.084636684008
88971400.03051064581-503.030510645806
912661482.02990799820-216.029907998204
1015191801.71984661638-282.719846616379
1110741818.35367607156-744.353676071564
1214351575.51503311819-140.515033118190
1313851537.76459395367-152.764593953674
1414401594.32076356906-154.320763569062
1518831847.3388639757935.6611360242092
1618221964.50221608065-142.502216080649
1716612033.65799746255-372.657997462552
1817742094.59306847826-320.593068478259
1911331605.86356544465-472.863565444652
2013611606.52859935050-245.528599350498
2116881730.92519651639-42.9251965163893
2222162010.76176730988205.238232690119
2328962110.49410839951785.505891600488
2413821828.65004161772-446.650041617724
2513301768.85305855019-438.853058550192
2614191840.67222009844-421.672220098437
2716622079.27527256858-417.275272568578
2820402175.24002476669-135.240024766690
2921262331.73403776439-205.734037764389
3016492313.810317127-664.810317126998
3116101872.56567788450-262.565677884504
3219521868.99099180983.0090081909996
3321021973.88487706069128.115122939315
3417492294.42275967513-545.42275967513
3520912278.83471727206-187.834717272060
3630362015.645418408211020.35458159179
3724141981.28675522877432.713244771227
3820972025.1237649001171.8762350998874
3927052294.25280123597410.747198764031
4024312447.87774518043-16.8777451804310
4141923914.44689515099277.553104849005
4239902582.208317559391407.79168244061
4328542058.71311067872795.286889321281
4419662116.19039233465-150.190392334646
4524312207.51717364601223.482826353987
4627632456.82776057379306.172239426211
4728312586.23814153287244.761858467135
4820232309.48173872870-286.481738728697
4929342277.66690753807656.33309246193
5024892286.73821336235202.261786637654
5132522555.8672496982696.132750301798
5230182669.63882581798348.36117418202
5331932801.54246292385391.457537076147
5439762811.600894163371164.39910583663
5525842294.04129525659289.958704743414
5625122339.64736096474172.352639035265
5721692443.69330222015-274.69330222015
5825042769.31884881221-265.318848812214
5918432781.71295828605-938.712958286049
6014081175.37870659481232.621293405191
6121792486.70882823157-307.708828231572
6236902509.347237996161180.65276200384
6323722789.49954628353-417.499546283529
6424942882.07252249656-388.072522496561
6538722983.45017573672888.549824263281
6627863059.64823868528-273.648238685284
6723122537.84891979715-225.848919797152
6815992579.21526552395-980.215265523952
6931672721.41868661151445.58131338849
7034332988.53609746095444.463902539046
7126483053.50273470352-405.50273470352
7219782796.24904381356-818.249043813558
7319472734.75617275349-787.756172753486
7431132813.35888627189299.641113728109
7528562988.36613902179-132.366139021792
7631743124.1842590445949.8157409554123
7735073294.24537598260212.754624017396
7841743241.55595149815932.44404850185
7929782835.07701610272142.922983897281
8044282862.87625788921565.1237421108
8128322925.37294332739-93.3729433273925
8229303223.86428203882-293.864282038821
8336813235.41044751639445.589552483614
8432532992.57180456301260.428195436987
8516601615.0681885561944.9318114438138
8622082991.02687910341-783.026879103408
8731393253.37236346910-114.372363469105
8834093431.58768330539-22.5876833053930
8934453461.73804085888-16.7380408588825
9024103548.11143176269-1138.11143176269
9132623028.85594486336233.144055136636
9228973083.78939453048-186.789394530481
9325263130.17514403954-604.175144039545
9439823495.65405845629486.345941543708
9540973513.98377590402583.016224095984
9634033224.5082131558178.491786844200
9733623240.17824575629121.821754243714
9827083273.83992747239-565.839927472387
9931293485.30877206189-356.308772061892
10035503664.37203589445-114.372035894451
10126963723.35248932112-1027.35248932112
10228853727.47531258674-842.475312586742
10329453298.94983328830-353.949833288295
10436003354.73122695168245.268773048318
10538083373.98276858011434.017231419889
10636713725.89457905654-54.8945790565403
10740053787.46944031403217.530559685972


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
180.02731567986487250.05463135972974510.972684320135128
190.007780410702781680.01556082140556340.992219589297218
200.02054294384278980.04108588768557960.97945705615721
210.01442041560304350.02884083120608700.985579584396956
220.02014594462947660.04029188925895330.979854055370523
230.2416644648171510.4833289296343020.758335535182849
240.1806329472986190.3612658945972390.81936705270138
250.1498456310656650.299691262131330.850154368934335
260.1145917925873780.2291835851747550.885408207412622
270.09106238554635080.1821247710927020.90893761445365
280.05865971437275040.1173194287455010.94134028562725
290.03909993803116050.0781998760623210.96090006196884
300.0295182791831530.0590365583663060.970481720816847
310.02139079827647820.04278159655295640.978609201723522
320.02314146570050110.04628293140100220.976858534299499
330.01720799407147760.03441598814295510.982792005928522
340.01644501202341650.03289002404683290.983554987976584
350.01045830840145610.02091661680291210.989541691598544
360.07127573335552680.1425514667110540.928724266644473
370.06095354582613150.1219070916522630.939046454173869
380.04261461356998380.08522922713996760.957385386430016
390.03328244338434160.06656488676868310.966717556615658
400.02251347701320190.04502695402640380.977486522986798
410.01439669389153890.02879338778307780.985603306108461
420.1443448553044020.2886897106088030.855655144695598
430.1641118449973370.3282236899946730.835888155002663
440.1346955736249820.2693911472499640.865304426375018
450.1011731157735850.2023462315471690.898826884226415
460.07558125137860730.1511625027572150.924418748621393
470.05483141366436630.1096628273287330.945168586335634
480.05124772306302270.1024954461260450.948752276936977
490.04587740043508990.09175480087017970.95412259956491
500.03195850074719150.06391700149438310.968041499252808
510.02835430601304510.05670861202609030.971645693986955
520.01989553625784100.03979107251568190.98010446374216
530.01419935212159180.02839870424318360.985800647878408
540.03096614925587690.06193229851175390.969033850744123
550.02211252495563280.04422504991126560.977887475044367
560.01479216728014780.02958433456029560.985207832719852
570.01411917236389610.02823834472779230.985880827636104
580.01203322464827150.0240664492965430.987966775351728
590.04377051976867230.08754103953734450.956229480231328
600.03111517004948280.06223034009896560.968884829950517
610.03066154634781160.06132309269562320.969338453652188
620.06956163510876780.1391232702175360.930438364891232
630.07512253617910730.1502450723582150.924877463820893
640.07469560822807710.1493912164561540.925304391771923
650.1008522608405340.2017045216810680.899147739159466
660.0907547245811080.1815094491622160.909245275418892
670.07488048270913130.1497609654182630.925119517290869
680.2228173895292800.4456347790585590.77718261047072
690.1909731911199010.3819463822398020.809026808880099
700.1546284774866770.3092569549733540.845371522513323
710.1903902643331360.3807805286662720.809609735666864
720.3405036944263200.6810073888526410.65949630557368
730.4921458521493560.9842917042987120.507854147850644
740.4573726531825790.9147453063651570.542627346817421
750.399047310292750.79809462058550.60095268970725
760.3373557016094430.6747114032188860.662644298390557
770.2927076071330970.5854152142661940.707292392866903
780.6240667010999740.7518665978000530.375933298900026
790.5389219378402180.9221561243195640.461078062159782
800.9096533357187910.1806933285624180.0903466642812091
810.864245901679340.2715081966413190.135754098320660
820.8627814062000640.2744371875998720.137218593799936
830.805756253296360.388487493407280.19424374670364
840.719856007157080.560287985685840.28014399284292
850.613508855579410.772982288841180.38649114442059
860.5756217295307830.8487565409384340.424378270469217
870.453422215126490.906844430252980.54657778487351
880.3170468721065520.6340937442131040.682953127893448
890.3330182887045380.6660365774090750.666981711295462


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level170.236111111111111NOK
10% type I error level290.402777777777778NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/10ki831229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/10ki831229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/1mtpd1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/1mtpd1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/2turv1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/2turv1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/330ct1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/330ct1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/46gpa1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/46gpa1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/5gv8l1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/5gv8l1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/62wij1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/62wij1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/7vkdq1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/7vkdq1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/8i2yh1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/8i2yh1229539183.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/9pmfe1229539183.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229539708vipcu7q4zoi50ni/9pmfe1229539183.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