| Multiple Regression (1) | *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, 17 Dec 2010 14:44:29 +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/17/t1292597990qlb7z4gr97spczs.htm/, Retrieved Fri, 17 Dec 2010 16:00:07 +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/17/t1292597990qlb7z4gr97spczs.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 « | 10102 8863 8366 8236 12008
8463 10102 8626 8253 9169
9114 8463 8863 7733 8788
8563 9114 10102 8366 8417
8872 8563 8463 8626 8247
8301 8872 9114 8863 8197
8301 8301 8563 10102 8236
8278 8301 8872 8463 8253
7736 8278 8301 9114 7733
7973 7736 8301 8563 8366
8268 7973 8278 8872 8626
9476 8268 7736 8301 8863
11100 9476 7973 8301 10102
8962 11100 8268 8278 8463
9173 8962 9476 7736 9114
8738 9173 11100 7973 8563
8459 8738 8962 8268 8872
8078 8459 9173 9476 8301
8411 8078 8738 11100 8301
8291 8411 8459 8962 8278
7810 8291 8078 9173 7736
8616 7810 8411 8738 7973
8312 8616 8291 8459 8268
9692 8312 7810 8078 9476
9911 9692 8616 8411 11100
8915 9911 8312 8291 8962
9452 8915 9692 7810 9173
9112 9452 9911 8616 8738
8472 9112 8915 8312 8459
8230 8472 9452 9692 8078
8384 8230 9112 9911 8411
8625 8384 8472 8915 8291
8221 8625 8230 9452 7810
8649 8221 8384 9112 8616
8625 8649 8625 8472 8312
10443 8625 8221 8230 9692
10357 10443 8649 8384 9911
8586 10357 8625 8625 8915
8892 8586 10443 8221 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 | Yt[t] = + 3000.29080206064 + 0.241703589564587`Yt-1`[t] -0.0637255373607908`Yt-3`[t] -0.105740638589231`Yt-6`[t] + 0.576198585815679`Yt-12
`[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) | 3000.29080206064 | 1347.539397 | 2.2265 | 0.028829 | 0.014415 | `Yt-1` | 0.241703589564587 | 0.079842 | 3.0273 | 0.003331 | 0.001666 | `Yt-3` | -0.0637255373607908 | 0.07025 | -0.9071 | 0.367098 | 0.183549 | `Yt-6` | -0.105740638589231 | 0.0802 | -1.3185 | 0.191158 | 0.095579 | `Yt-12
` | 0.576198585815679 | 0.07139 | 8.0711 | 0 | 0 |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.806187929180415 | R-squared | 0.649938977156206 | Adjusted R-squared | 0.632214368404622 | F-TEST (value) | 36.6687347667465 | F-TEST (DF numerator) | 4 | F-TEST (DF denominator) | 79 | p-value | 0 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 459.357740870306 | Sum Squared Residuals | 16669753.1937002 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 10102 | 10657.4945898650 | -555.494589864962 | 2 | 8463 | 9302.77132163496 | -839.77132163496 | 3 | 9114 | 8726.96965685472 | 387.030343145281 | 4 | 8563 | 8524.65925330665 | 38.3407466933546 | 5 | 8872 | 8370.48040556903 | 501.519594430971 | 6 | 8301 | 8349.81102928618 | -48.8110292861799 | 7 | 8301 | 8138.37014436535 | 162.629855634649 | 8 | 8278 | 8301.78323592748 | -23.7832359274822 | 9 | 7736 | 7964.15091485477 | -228.150914854766 | 10 | 7973 | 8256.14436599475 | -283.144365994751 | 11 | 8268 | 8432.03157906886 | -164.03157906886 | 12 | 9476 | 8734.81034871273 | 741.189651287271 | 13 | 11100 | 9725.59538037787 | 1374.40461962213 | 14 | 8962 | 9157.36552884498 | -195.36552884498 | 15 | 9173 | 8996.03951070543 | 176.960489294573 | 16 | 8738 | 8601.00274329954 | 136.997256700456 | 17 | 8459 | 8778.95875534954 | -319.958755349541 | 18 | 8078 | 8241.33328156135 | -163.333281561351 | 19 | 8411 | 8005.24202562028 | 405.757974379723 | 20 | 8291 | 8316.32966369896 | -25.3296636989592 | 21 | 7810 | 7976.99375443124 | -166.993754431245 | 22 | 8616 | 8022.06996653417 | 593.930033465834 | 23 | 8312 | 8424.01034518854 | -112.010345188539 | 24 | 9692 | 9117.51951239928 | 574.480487600718 | 25 | 9911 | 10300.2425536001 | -389.242553600063 | 26 | 8915 | 9153.32450322917 | -238.324503229175 | 27 | 9452 | 8997.08563523348 | 454.914364766518 | 28 | 9112 | 8777.05123061491 | 334.948769385087 | 29 | 8472 | 8629.72839406285 | -157.728394062852 | 30 | 8230 | 8075.36374072986 | 154.63625927014 | 31 | 8384 | 8207.25508398348 | 176.744916016522 | 32 | 8625 | 8321.43562642432 | 303.564373575677 | 33 | 8221 | 8061.17352885094 | 159.826471149059 | 34 | 8649 | 8454.07942320106 | 194.920576798938 | 35 | 8625 | 8434.6803436399 | 190.319656360104 | 36 | 10443 | 9275.36785754834 | 1167.63214245166 | 37 | 10357 | 9797.41388533723 | 559.58611466277 | 38 | 8586 | 9178.77950415891 | -592.779504158913 | 39 | 8892 | 8987.00727869118 | -95.00727869118 | 40 | 8329 | 8825.28446081745 | -496.28446081745 | 41 | 8101 | 8435.83394696266 | -334.833946962655 | 42 | 7922 | 8029.54897538691 | -107.548975386912 | 43 | 8120 | 8119.98978752326 | 0.010212476735866 | 44 | 7838 | 8508.50705089842 | -670.507050898419 | 45 | 7735 | 8186.61264575095 | -451.612645750948 | 46 | 8406 | 8455.2444938832 | -49.2444938832061 | 47 | 8209 | 8645.67830355556 | -436.678303555555 | 48 | 9451 | 9671.08303007987 | -220.083030079870 | 49 | 10041 | 9858.02932792918 | 182.970672070819 | 50 | 9411 | 9022.55954123496 | 388.440458765041 | 51 | 10405 | 8978.34721544146 | 1426.65278455855 | 52 | 8467 | 8785.65074411819 | -318.650744118187 | 53 | 8464 | 8246.83390431542 | 217.166095684581 | 54 | 8102 | 7948.29618942127 | 153.703810578732 | 55 | 7627 | 8035.99992462796 | -408.999924627958 | 56 | 7513 | 7825.51049730806 | -312.510497308056 | 57 | 7510 | 7656.57028352559 | -146.570283525589 | 58 | 8291 | 8277.66941167152 | 13.3305883284799 | 59 | 8064 | 8360.51072689067 | -296.510726890672 | 60 | 9383 | 9059.75194342397 | 323.248056576032 | 61 | 9706 | 9718.97330234202 | -12.9733023420156 | 62 | 8579 | 9460.55858248757 | -881.558582487571 | 63 | 9474 | 9677.16326948595 | -203.163269485951 | 64 | 8318 | 8673.64833552975 | -355.648335529746 | 65 | 8213 | 8488.332195801 | -275.332195801003 | 66 | 8059 | 8057.86317259434 | 1.13682740565717 | 67 | 9111 | 7786.4589864637 | 1324.54101353630 | 68 | 7708 | 8100.9054050156 | -392.905405015606 | 69 | 7680 | 7675.24253431524 | 4.75746568475654 | 70 | 8014 | 8173.68284223508 | -159.682842235079 | 71 | 8007 | 8224.12445813855 | -217.124458138550 | 72 | 8718 | 9000.50684109132 | -282.506841091322 | 73 | 9486 | 9225.94675521583 | 260.053244784167 | 74 | 9113 | 8910.99950048938 | 202.000499510617 | 75 | 9025 | 9294.1936767038 | -269.193676703800 | 76 | 8476 | 8522.5796096373 | -46.5796096373016 | 77 | 7952 | 8353.8932973614 | -401.893297361396 | 78 | 7759 | 8068.93228746475 | -309.932287464745 | 79 | 7835 | 8582.22091653142 | -747.220916531419 | 80 | 7600 | 7865.01721320977 | -265.017213209767 | 81 | 7651 | 7813.68751416573 | -162.687514165735 | 82 | 8319 | 8071.67319464203 | 247.326805357967 | 83 | 8812 | 8299.48139827101 | 512.518601728989 | 84 | 8630 | 8845.47640328362 | -215.476403283621 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 8 | 0.276335513087138 | 0.552671026174277 | 0.723664486912862 | 9 | 0.327824731929404 | 0.655649463858808 | 0.672175268070596 | 10 | 0.410114439690031 | 0.820228879380062 | 0.589885560309969 | 11 | 0.300240855430904 | 0.600481710861807 | 0.699759144569096 | 12 | 0.544338535020122 | 0.911322929959756 | 0.455661464979878 | 13 | 0.967327226150502 | 0.0653455476989957 | 0.0326727738494978 | 14 | 0.955549583104901 | 0.088900833790198 | 0.044450416895099 | 15 | 0.933338684807976 | 0.133322630384049 | 0.0666613151920245 | 16 | 0.91348538086579 | 0.173029238268420 | 0.0865146191342102 | 17 | 0.897675207971843 | 0.204649584056314 | 0.102324792028157 | 18 | 0.855673200921566 | 0.288653598156867 | 0.144326799078434 | 19 | 0.853134172614955 | 0.293731654770091 | 0.146865827385045 | 20 | 0.80441837535946 | 0.391163249281081 | 0.195581624640540 | 21 | 0.762190417231992 | 0.475619165536017 | 0.237809582768008 | 22 | 0.762781367427515 | 0.47443726514497 | 0.237218632572485 | 23 | 0.710339505640487 | 0.579320988719025 | 0.289660494359513 | 24 | 0.704072020545687 | 0.591855958908627 | 0.295927979454314 | 25 | 0.672111603663626 | 0.655776792672748 | 0.327888396336374 | 26 | 0.617654060969023 | 0.764691878061953 | 0.382345939030977 | 27 | 0.609995296492681 | 0.780009407014637 | 0.390004703507319 | 28 | 0.586428178493848 | 0.827143643012304 | 0.413571821506152 | 29 | 0.527420872361172 | 0.945158255277656 | 0.472579127638828 | 30 | 0.462992284561133 | 0.925984569122267 | 0.537007715438867 | 31 | 0.400873742412532 | 0.801747484825064 | 0.599126257587468 | 32 | 0.353237741798266 | 0.706475483596531 | 0.646762258201734 | 33 | 0.295493180734147 | 0.590986361468295 | 0.704506819265853 | 34 | 0.245027789741765 | 0.49005557948353 | 0.754972210258235 | 35 | 0.199830720825401 | 0.399661441650802 | 0.800169279174599 | 36 | 0.489360960141012 | 0.978721920282023 | 0.510639039858988 | 37 | 0.551207062158698 | 0.897585875682605 | 0.448792937841302 | 38 | 0.575532396160635 | 0.84893520767873 | 0.424467603839365 | 39 | 0.517989107587281 | 0.964021784825437 | 0.482010892412719 | 40 | 0.512231290320684 | 0.975537419358632 | 0.487768709679316 | 41 | 0.498689056715854 | 0.997378113431708 | 0.501310943284146 | 42 | 0.435765566543469 | 0.871531133086938 | 0.564234433456531 | 43 | 0.374538261824518 | 0.749076523649037 | 0.625461738175481 | 44 | 0.475929011209274 | 0.951858022418548 | 0.524070988790726 | 45 | 0.485909080066162 | 0.971818160132324 | 0.514090919933838 | 46 | 0.427228303521997 | 0.854456607043993 | 0.572771696478003 | 47 | 0.424259095354283 | 0.848518190708566 | 0.575740904645717 | 48 | 0.376366971712316 | 0.752733943424631 | 0.623633028287684 | 49 | 0.330207459792645 | 0.66041491958529 | 0.669792540207355 | 50 | 0.309900006146192 | 0.619800012292384 | 0.690099993853808 | 51 | 0.860586085640912 | 0.278827828718175 | 0.139413914359088 | 52 | 0.828084520574296 | 0.343830958851408 | 0.171915479425704 | 53 | 0.802568514194823 | 0.394862971610354 | 0.197431485805177 | 54 | 0.778024519827552 | 0.443950960344896 | 0.221975480172448 | 55 | 0.762620464611636 | 0.474759070776728 | 0.237379535388364 | 56 | 0.731935306961998 | 0.536129386076004 | 0.268064693038002 | 57 | 0.696610392529937 | 0.606779214940127 | 0.303389607470063 | 58 | 0.629490677232357 | 0.741018645535286 | 0.370509322767643 | 59 | 0.595939943080857 | 0.808120113838286 | 0.404060056919143 | 60 | 0.575501694764031 | 0.848996610471938 | 0.424498305235969 | 61 | 0.528399774455452 | 0.943200451089096 | 0.471600225544548 | 62 | 0.66392944546801 | 0.672141109063979 | 0.336070554531990 | 63 | 0.644110101074491 | 0.711779797851018 | 0.355889898925509 | 64 | 0.590798424199388 | 0.818403151601223 | 0.409201575800612 | 65 | 0.515463058455447 | 0.969073883089106 | 0.484536941544553 | 66 | 0.430011271054494 | 0.860022542108989 | 0.569988728945506 | 67 | 0.95436455300343 | 0.0912708939931406 | 0.0456354469965703 | 68 | 0.96655245698608 | 0.0668950860278417 | 0.0334475430139209 | 69 | 0.942307353768112 | 0.115385292463776 | 0.0576926462318878 | 70 | 0.929974782867829 | 0.140050434264342 | 0.0700252171321708 | 71 | 0.898066371823888 | 0.203867256352224 | 0.101933628176112 | 72 | 0.836828821240169 | 0.326342357519662 | 0.163171178759831 | 73 | 0.946067038558727 | 0.107865922882546 | 0.053932961441273 | 74 | 0.905821549292529 | 0.188356901414943 | 0.0941784507074714 | 75 | 0.81981539171538 | 0.360369216569239 | 0.180184608284619 | 76 | 0.885769109374186 | 0.228461781251627 | 0.114230890625814 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 0 | 0 | OK | 5% type I error level | 0 | 0 | OK | 10% type I error level | 4 | 0.0579710144927536 | OK |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/10ch501292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/10ch501292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/1g78r1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/1g78r1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/2g78r1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/2g78r1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/3g78r1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/3g78r1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/4qy7c1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/4qy7c1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/5qy7c1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/5qy7c1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/6qy7c1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/6qy7c1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/7jqof1292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/7jqof1292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/8ch501292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/8ch501292597060.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/9ch501292597060.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/17/t1292597990qlb7z4gr97spczs/9ch501292597060.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
|