| | *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, 22 Dec 2010 15:22:46 +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/Dec/22/t1293031253e8tul81xfj5o4gv.htm/, Retrieved Wed, 22 Dec 2010 16:20:56 +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/Dec/22/t1293031253e8tul81xfj5o4gv.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 « | 186448 17822 1942 16739 4872 1020
190530 22422 2547 17851 4905 1200
194207 18817 2033 17034 4971 1279
190855 22043 2049 18055 4971 1308
200779 19191 2007 18216 4930 1173
204428 23171 2660 18960 5001 1291
207617 19463 2063 17903 5059 1466
212071 22522 2113 18842 5085 1507
214239 20265 2145 18907 5111 1478
215883 24249 2866 19862 5190 1629
223484 20299 2163 18836 5076 1712
221529 25455 2157 19846 5134 1727
225247 21089 2201 19511 4804 1519
226699 26237 2838 20318 4579 1617
231406 21362 2142 19843 4526 1637
232324 26489 2253 20975 4550 1633
237192 21828 2258 20485 4566 1469
236727 27496 2979 21407 4588 1657
240698 21991 2288 20404 4564 1599
240688 27611 2431 21454 4723 1420
245283 22512 2393 21558 4553 1495
243556 28581 3244 22442 4556 1623
247826 23000 2476 21201 4542 1346
245798 28385 2490 21804 4234 1613
250479 23387 2547 22537 4341 1563
249216 30192 3461 22736 4269 2071
251896 24346 2549 21525 4217 1584
247616 30393 2496 22427 4207 1843
249994 24753 2532 23437 4267 1598
246552 31 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!
Multiple Linear Regression - Estimated Regression Equation | Nettoschuld[t] = + 339556.817626673 -0.0481617613139481ParafiscaleOntvangsten[t] -0.41758570531135`Niet-parafiscaleOntvangsten`[t] -0.079014694953187LopendeUitgaven[t] -23.260766663216Rentelasten[t] + 0.59991448783166KapitaalUitgaven[t] + e[t] |
Multiple Linear Regression - Ordinary Least Squares | Variable | Parameter | S.D. | T-STAT H0: parameter = 0 | 2-tail p-value | 1-tail p-value | (Intercept) | 339556.817626673 | 43292.692778 | 7.8433 | 0 | 0 | ParafiscaleOntvangsten | -0.0481617613139481 | 0.451468 | -0.1067 | 0.91535 | 0.457675 | `Niet-parafiscaleOntvangsten` | -0.41758570531135 | 2.485849 | -0.168 | 0.867079 | 0.43354 | LopendeUitgaven | -0.079014694953187 | 0.728579 | -0.1085 | 0.913949 | 0.456974 | Rentelasten | -23.260766663216 | 6.586492 | -3.5316 | 0.000736 | 0.000368 | KapitaalUitgaven | 0.59991448783166 | 1.551211 | 0.3867 | 0.700122 | 0.350061 |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.776717115423032 | R-squared | 0.603289477391076 | Adjusted R-squared | 0.574953011490439 | F-TEST (value) | 21.290215918475 | F-TEST (DF numerator) | 5 | F-TEST (DF denominator) | 70 | p-value | 6.99107438606461e-13 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 11873.7191966773 | Sum Squared Residuals | 9868964529.30806 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 186448 | 223850.3578924 | -37402.3578924002 | 2 | 190530 | 222628.689405778 | -32098.689405778 | 3 | 194207 | 221593.689258388 | -27386.689258388 | 4 | 190855 | 221368.361561704 | -30513.3615617041 | 5 | 200779 | 222383.239116042 | -21604.2391160417 | 6 | 204428 | 220279.360383875 | -15851.3603838745 | 7 | 207617 | 219546.621962367 | -11929.621962367 | 8 | 212071 | 218724.037611439 | -6653.03761143853 | 9 | 214239 | 218192.062555591 | -3953.06255559146 | 10 | 215883 | 215876.634292575 | 6.36570742457321 | 11 | 223484 | 219143.025379718 | 4340.97462028197 | 12 | 221529 | 217477.278261563 | 4051.7217384366 | 13 | 225247 | 225246.919448628 | 0.0805513719735806 | 14 | 226699 | 229961.679867304 | -3262.67986730438 | 15 | 231406 | 231769.459007616 | -363.459007616426 | 16 | 232324 | 230826.078951515 | 1497.92104848526 | 17 | 237192 | 230616.631950384 | 6575.3680496163 | 18 | 236727 | 229570.767302102 | 7156.23269789848 | 19 | 240698 | 230727.164619166 | 9970.83538083406 | 20 | 240688 | 226507.968742248 | 14180.031257752 | 21 | 245283 | 230760.520211049 | 14522.4797889514 | 22 | 243556 | 230050.018810528 | 13505.9811894715 | 23 | 247826 | 230897.047078693 | 16928.9529213067 | 24 | 245798 | 237908.697233608 | 7889.30276639186 | 25 | 250479 | 235548.791802696 | 14930.2081973039 | 26 | 249216 | 236803.185517574 | 12412.8144824255 | 27 | 251896 | 238478.665643961 | 13417.3343560387 | 28 | 247616 | 238526.27777981 | 9089.72222018985 | 29 | 249994 | 237160.447137015 | 12833.5528629848 | 30 | 246552 | 236876.100888231 | 9675.89911176936 | 31 | 248771 | 238326.138925629 | 10444.8610743709 | 32 | 247551 | 239318.473651425 | 8232.52634857504 | 33 | 249745 | 239614.916296358 | 10130.0837036422 | 34 | 245742 | 240068.641526505 | 5673.35847349463 | 35 | 249019 | 242814.575073595 | 6204.42492640496 | 36 | 245841 | 242384.578292205 | 3456.42170779517 | 37 | 248771 | 240491.679916583 | 8279.32008341729 | 38 | 244723 | 238083.446192438 | 6639.55380756211 | 39 | 246878 | 238939.267528246 | 7938.73247175353 | 40 | 246014 | 238027.72181241 | 7986.27818758957 | 41 | 248496 | 236933.232743889 | 11562.7672561112 | 42 | 244351 | 236076.42348666 | 8274.57651334034 | 43 | 248016 | 237995.911208351 | 10020.0887916491 | 44 | 246509 | 239199.019377301 | 7309.9806226991 | 45 | 249426 | 243968.785715264 | 5457.21428473577 | 46 | 247840 | 244755.552081246 | 3084.44791875431 | 47 | 251035 | 247304.927010381 | 3730.07298961894 | 48 | 250161 | 245848.166831541 | 4312.83316845854 | 49 | 254278 | 245033.462034772 | 9244.53796522848 | 50 | 250801 | 250337.450957799 | 463.549042200927 | 51 | 253985 | 251394.782091362 | 2590.21790863777 | 52 | 249174 | 250463.335031752 | -1289.33503175152 | 53 | 251287 | 252734.414774885 | -1447.41477488466 | 54 | 247947 | 253429.429781653 | -5482.42978165256 | 55 | 249992 | 254006.324100502 | -4014.32410050208 | 56 | 243805 | 256414.71389525 | -12609.71389525 | 57 | 255812 | 263543.240454638 | -7731.24045463795 | 58 | 250417 | 257732.044523119 | -7315.0445231195 | 59 | 253033 | 259853.506099276 | -6820.50609927571 | 60 | 248705 | 258553.030091642 | -9848.03009164178 | 61 | 253950 | 261577.913953915 | -7627.91395391511 | 62 | 251484 | 260320.213242624 | -8836.21324262381 | 63 | 251093 | 259665.740602664 | -8572.74060266435 | 64 | 245996 | 260299.155158584 | -14303.1551585843 | 65 | 252721 | 260513.092809361 | -7792.0928093611 | 66 | 248019 | 259136.899477625 | -11117.899477625 | 67 | 250464 | 258111.475995655 | -7647.47599565543 | 68 | 245571 | 258558.5694206 | -12987.5694205997 | 69 | 252690 | 258273.54070774 | -5583.54070773967 | 70 | 250183 | 256796.9386042 | -6613.93860420049 | 71 | 253639 | 258581.520151416 | -4942.52015141576 | 72 | 254436 | 255365.479777894 | -929.479777894365 | 73 | 265280 | 259870.250695415 | 5409.74930458459 | 74 | 268705 | 261136.427392119 | 7568.57260788119 | 75 | 270643 | 262697.35422867 | 7945.64577133006 | 76 | 271480 | 261894.456601271 | 9585.54339872862 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 9 | 0.152602195862955 | 0.305204391725909 | 0.847397804137045 | 10 | 0.16160512073923 | 0.323210241478461 | 0.83839487926077 | 11 | 0.0925443552573939 | 0.185088710514788 | 0.907455644742606 | 12 | 0.085990251928903 | 0.171980503857806 | 0.914009748071097 | 13 | 0.0685242482011057 | 0.137048496402211 | 0.931475751798894 | 14 | 0.0572816499632039 | 0.114563299926408 | 0.942718350036796 | 15 | 0.085963681658097 | 0.171927363316194 | 0.914036318341903 | 16 | 0.073804519864012 | 0.147609039728024 | 0.926195480135988 | 17 | 0.0944724870850097 | 0.188944974170019 | 0.90552751291499 | 18 | 0.0822557791476052 | 0.16451155829521 | 0.917744220852395 | 19 | 0.0791344339288085 | 0.158268867857617 | 0.920865566071192 | 20 | 0.474068748850204 | 0.948137497700408 | 0.525931251149796 | 21 | 0.501625160834717 | 0.996749678330567 | 0.498374839165283 | 22 | 0.465255904870885 | 0.93051180974177 | 0.534744095129115 | 23 | 0.623307729763887 | 0.753384540472226 | 0.376692270236113 | 24 | 0.55436611117106 | 0.89126777765788 | 0.44563388882894 | 25 | 0.829523181081362 | 0.340953637837275 | 0.170476818918638 | 26 | 0.831048275700119 | 0.337903448599762 | 0.168951724299881 | 27 | 0.857294400532545 | 0.28541119893491 | 0.142705599467455 | 28 | 0.858055487003078 | 0.283889025993844 | 0.141944512996922 | 29 | 0.989635663017233 | 0.0207286739655345 | 0.0103643369827673 | 30 | 0.985067550868913 | 0.0298648982621738 | 0.0149324491310869 | 31 | 0.978291988309868 | 0.043416023380265 | 0.0217080116901325 | 32 | 0.987599359107654 | 0.0248012817846919 | 0.0124006408923459 | 33 | 0.999170161456863 | 0.00165967708627322 | 0.000829838543136612 | 34 | 0.99915968903504 | 0.00168062192991835 | 0.000840310964959173 | 35 | 0.999356340051563 | 0.00128731989687491 | 0.000643659948437457 | 36 | 0.999914575366404 | 0.000170849267192123 | 8.54246335960613e-05 | 37 | 0.999978917258257 | 4.21654834849041e-05 | 2.1082741742452e-05 | 38 | 0.99998100399941 | 3.79920011788756e-05 | 1.89960005894378e-05 | 39 | 0.999970006576907 | 5.99868461857316e-05 | 2.99934230928658e-05 | 40 | 0.999974810587664 | 5.03788246719325e-05 | 2.51894123359662e-05 | 41 | 0.999971084217052 | 5.78315658955957e-05 | 2.89157829477978e-05 | 42 | 0.99996109770477 | 7.78045904626379e-05 | 3.89022952313189e-05 | 43 | 0.999929861361585 | 0.000140277276830627 | 7.01386384153137e-05 | 44 | 0.999867563808405 | 0.000264872383189466 | 0.000132436191594733 | 45 | 0.999900974106376 | 0.000198051787247442 | 9.90258936237208e-05 | 46 | 0.999867033512298 | 0.000265932975404515 | 0.000132966487702258 | 47 | 0.999819465799302 | 0.000361068401395079 | 0.000180534200697539 | 48 | 0.99975387513226 | 0.000492249735478768 | 0.000246124867739384 | 49 | 0.999729313342882 | 0.000541373314236076 | 0.000270686657118038 | 50 | 0.99980452421739 | 0.000390951565220379 | 0.00019547578261019 | 51 | 0.99989103942781 | 0.000217921144379738 | 0.000108960572189869 | 52 | 0.999759404602581 | 0.000481190794838058 | 0.000240595397419029 | 53 | 0.999759155328846 | 0.000481689342307984 | 0.000240844671153992 | 54 | 0.99977789857475 | 0.000444202850500633 | 0.000222101425250316 | 55 | 0.999967142942667 | 6.57141146665237e-05 | 3.28570573332618e-05 | 56 | 0.999974581614983 | 5.08367700340501e-05 | 2.5418385017025e-05 | 57 | 0.99998567100186 | 2.86579962803592e-05 | 1.43289981401796e-05 | 58 | 0.999980259988177 | 3.94800236459473e-05 | 1.97400118229737e-05 | 59 | 0.999986771799267 | 2.64564014664218e-05 | 1.32282007332109e-05 | 60 | 0.999981833654548 | 3.63326909036603e-05 | 1.81663454518301e-05 | 61 | 0.99993375783682 | 0.000132484326360958 | 6.6242163180479e-05 | 62 | 0.999758356298257 | 0.000483287403485522 | 0.000241643701742761 | 63 | 0.999725460663313 | 0.000549078673374526 | 0.000274539336687263 | 64 | 0.998921811527923 | 0.00215637694415461 | 0.00107818847207731 | 65 | 0.996485706823846 | 0.00702858635230723 | 0.00351429317615362 | 66 | 0.987323330971868 | 0.0253533380562641 | 0.012676669028132 | 67 | 0.988847179201368 | 0.0223056415972636 | 0.0111528207986318 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 33 | 0.559322033898305 | NOK | 5% type I error level | 39 | 0.661016949152542 | NOK | 10% type I error level | 39 | 0.661016949152542 | NOK |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/10miuz1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/10miuz1293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/1xyen1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/1xyen1293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/2q8e81293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/2q8e81293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/3q8e81293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/3q8e81293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/4q8e81293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/4q8e81293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/5jzdb1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/5jzdb1293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/6jzdb1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/6jzdb1293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/7t8ue1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/7t8ue1293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/8t8ue1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/8t8ue1293031357.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/9miuz1293031357.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/22/t1293031253e8tul81xfj5o4gv/9miuz1293031357.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
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
|