| | *The author of this computation has been verified* | R Software Module: /rwasp_multipleregression.wasp (opens new window with default values) | Title produced by software: Multiple Regression | Date of computation: Fri, 20 Nov 2009 06:12:38 -0700 | | Cite this page as follows: | Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx.htm/, Retrieved Fri, 20 Nov 2009 14:20:30 +0100 | | BibTeX entries for LaTeX users: | @Manual{KEY,
author = {{YOUR NAME}},
publisher = {Office for Research Development and Education},
title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx.htm/},
year = {2009},
}
@Manual{R,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Development Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2009},
note = {{ISBN} 3-900051-07-0},
url = {http://www.R-project.org},
}
| | Original text written by user: | | | IsPrivate? | No (this computation is public) | | User-defined keywords: | Rob_WS7_1 | | Dataseries X: | » Textbox « » Textfile « » CSV « | 106370 100,3
109375 101,9
116476 102,1
123297 103,2
114813 103,7
117925 106,2
126466 107,7
131235 109,9
120546 111,7
123791 114,9
129813 116
133463 118,3
122987 120,4
125418 126
130199 128,1
133016 130,1
121454 130,8
122044 133,6
128313 134,2
131556 135,5
120027 136,2
123001 139,1
130111 139
132524 139,6
123742 138,7
124931 140,9
133646 141,3
136557 141,8
127509 142
128945 144,5
137191 144,6
139716 145,5
129083 146,8
131604 149,5
139413 149,9
143125 150,1
133948 150,9
137116 152,8
144864 153,1
149277 154
138796 154,9
143258 156,9
150034 158,4
154708 159,7
144888 160,2
148762 163,2
156500 163,7
161088 164,4
152772 163,7
158011 165,5
163318 165,6
169969 166,8
162269 167,5
165765 170,6
170600 170,9
174681 172
166364 171,8
170240 173,9
176150 174
182056 173,8
172218 173,9
177856 176
182253 176,6
188090 178,2
176863 179,2
183273 181,3
187969 181,8
194650 182,9
183036 183,8
189516 186,3
193805 187,4
200499 189,2
188142 189,7
193732 191,9
1971 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 | HFCE[t] = + 7117.57957043553 + 942.117029576953RPI[t] + e[t] |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.95295985390233 | R-squared | 0.90813248314955 | Adjusted R-squared | 0.907088534094432 | F-TEST (value) | 869.901149578852 | F-TEST (DF numerator) | 1 | F-TEST (DF denominator) | 88 | p-value | 0 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 9503.7112551085 | Sum Squared Residuals | 7948206430.60187 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 106370 | 101611.917637004 | 4758.08236299578 | 2 | 109375 | 103119.304884327 | 6255.69511567294 | 3 | 116476 | 103307.728290242 | 13168.2717097576 | 4 | 123297 | 104344.057022777 | 18952.9429772229 | 5 | 114813 | 104815.115537566 | 9997.88446243442 | 6 | 117925 | 107170.408111508 | 10754.5918884920 | 7 | 126466 | 108583.583655873 | 17882.4163441266 | 8 | 131235 | 110656.241120943 | 20578.7588790573 | 9 | 120546 | 112352.051774181 | 8193.94822581879 | 10 | 123791 | 115366.826268827 | 8424.17373117254 | 11 | 129813 | 116403.155001362 | 13409.8449986379 | 12 | 133463 | 118570.024169389 | 14892.9758306109 | 13 | 122987 | 120548.469931501 | 2438.5300684993 | 14 | 125418 | 125824.325297132 | -406.32529713163 | 15 | 130199 | 127802.771059243 | 2396.22894075677 | 16 | 133016 | 129687.005118397 | 3328.99488160287 | 17 | 121454 | 130346.487039101 | -8892.48703910101 | 18 | 122044 | 132984.414721916 | -10940.4147219165 | 19 | 128313 | 133549.684939663 | -5236.68493966263 | 20 | 131556 | 134774.437078113 | -3218.43707811268 | 21 | 120027 | 135433.918998817 | -15406.9189988165 | 22 | 123001 | 138166.058384590 | -15165.0583845897 | 23 | 130111 | 138071.846681632 | -7960.84668163202 | 24 | 132524 | 138637.116899378 | -6113.11689937818 | 25 | 123742 | 137789.211572759 | -14047.2115727589 | 26 | 124931 | 139861.869037828 | -14930.8690378282 | 27 | 133646 | 140238.715849659 | -6592.71584965902 | 28 | 136557 | 140709.774364447 | -4152.7743644475 | 29 | 127509 | 140898.197770363 | -13389.1977703629 | 30 | 128945 | 143253.490344305 | -14308.4903443053 | 31 | 137191 | 143347.702047263 | -6156.70204726295 | 32 | 139716 | 144195.607373882 | -4479.60737388221 | 33 | 129083 | 145420.359512332 | -16337.3595123323 | 34 | 131604 | 147964.07549219 | -16360.0754921900 | 35 | 139413 | 148340.922304021 | -8927.92230402081 | 36 | 143125 | 148529.345709936 | -5404.34570993619 | 37 | 133948 | 149283.039333598 | -15335.0393335978 | 38 | 137116 | 151073.061689794 | -13957.0616897940 | 39 | 144864 | 151355.696798667 | -6491.69679866705 | 40 | 149277 | 152203.602125286 | -2926.60212528631 | 41 | 138796 | 153051.507451906 | -14255.5074519056 | 42 | 143258 | 154935.741511059 | -11677.7415110595 | 43 | 150034 | 156348.917055425 | -6314.91705542491 | 44 | 154708 | 157573.669193875 | -2865.66919387493 | 45 | 144888 | 158044.727708663 | -13156.7277086634 | 46 | 148762 | 160871.078797394 | -12109.0787973943 | 47 | 156500 | 161342.137312183 | -4842.13731218275 | 48 | 161088 | 162001.619232887 | -913.619232886629 | 49 | 152772 | 161342.137312183 | -8570.13731218275 | 50 | 158011 | 163037.947965421 | -5026.94796542127 | 51 | 163318 | 163132.159668379 | 185.840331621038 | 52 | 169969 | 164262.700103871 | 5706.29989612868 | 53 | 162269 | 164922.182024575 | -2653.18202457518 | 54 | 165765 | 167842.744816264 | -2077.74481626373 | 55 | 170600 | 168125.379925137 | 2474.62007486318 | 56 | 174681 | 169161.708657671 | 5519.29134232854 | 57 | 166364 | 168973.285251756 | -2609.28525175609 | 58 | 170240 | 170951.731013868 | -711.731013867682 | 59 | 176150 | 171045.942716825 | 5104.05728317462 | 60 | 182056 | 170857.51931091 | 11198.48068909 | 61 | 172218 | 170951.731013868 | 1266.26898613232 | 62 | 177856 | 172930.176775979 | 4925.82322402072 | 63 | 182253 | 173495.446993725 | 8757.55300627456 | 64 | 188090 | 175002.834241049 | 13087.1657589514 | 65 | 176863 | 175944.951270626 | 918.048729374482 | 66 | 183273 | 177923.397032737 | 5349.60296726286 | 67 | 187969 | 178394.455547526 | 9574.54445247439 | 68 | 194650 | 179430.784280060 | 15219.2157199397 | 69 | 183036 | 180278.689606680 | 2757.31039332048 | 70 | 189516 | 182633.982180622 | 6882.0178193781 | 71 | 193805 | 183670.310913157 | 10134.6890868435 | 72 | 200499 | 185366.121566395 | 15132.8784336050 | 73 | 188142 | 185837.180081184 | 2304.81991881647 | 74 | 193732 | 187909.837546253 | 5822.16245374717 | 75 | 197126 | 188569.319466957 | 8556.68053304331 | 76 | 205140 | 189605.648199491 | 15534.3518005087 | 77 | 191751 | 190076.706714280 | 1674.29328572019 | 78 | 196700 | 193279.904614841 | 3420.09538515854 | 79 | 199784 | 194881.503565122 | 4902.49643487771 | 80 | 207360 | 196859.949327234 | 10500.0506727661 | 81 | 196101 | 198367.336574557 | -2266.33657455701 | 82 | 200824 | 201476.322772161 | -652.322772160962 | 83 | 205743 | 202230.016395823 | 3512.98360417749 | 84 | 212489 | 204773.732375680 | 7715.2676243197 | 85 | 200810 | 205998.484514130 | -5188.48451413032 | 86 | 203683 | 209955.376038354 | -6272.37603835354 | 87 | 207286 | 211933.821800465 | -4647.82180046513 | 88 | 210910 | 210143.799444269 | 766.200555731074 | 89 | 194915 | 205810.061108215 | -10895.0611082149 | 90 | 217920 | 207411.660058496 | 10508.3399415042 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 5 | 0.168560274331752 | 0.337120548663505 | 0.831439725668248 | 6 | 0.141336574113161 | 0.282673148226322 | 0.858663425886839 | 7 | 0.0806079834539858 | 0.161215966907972 | 0.919392016546014 | 8 | 0.0488561050817873 | 0.0977122101635746 | 0.951143894918213 | 9 | 0.143854965070560 | 0.287709930141119 | 0.85614503492944 | 10 | 0.154955938019746 | 0.309911876039492 | 0.845044061980254 | 11 | 0.126207839923069 | 0.252415679846138 | 0.873792160076931 | 12 | 0.119384947484536 | 0.238769894969071 | 0.880615052515464 | 13 | 0.221792370022380 | 0.443584740044759 | 0.77820762997762 | 14 | 0.276168784401322 | 0.552337568802645 | 0.723831215598678 | 15 | 0.242918600800659 | 0.485837201601318 | 0.757081399199341 | 16 | 0.211352244392847 | 0.422704488785694 | 0.788647755607153 | 17 | 0.316760505330473 | 0.633521010660945 | 0.683239494669527 | 18 | 0.362358019044491 | 0.724716038088982 | 0.637641980955509 | 19 | 0.300489462398163 | 0.600978924796326 | 0.699510537601837 | 20 | 0.247342267092178 | 0.494684534184355 | 0.752657732907822 | 21 | 0.310985323033706 | 0.621970646067412 | 0.689014676966294 | 22 | 0.306319505816718 | 0.612639011633436 | 0.693680494183282 | 23 | 0.245734064085329 | 0.491468128170658 | 0.754265935914671 | 24 | 0.201458472305119 | 0.402916944610237 | 0.798541527694881 | 25 | 0.183790157609529 | 0.367580315219057 | 0.816209842390471 | 26 | 0.162939308785125 | 0.325878617570250 | 0.837060691214875 | 27 | 0.135927326850338 | 0.271854653700675 | 0.864072673149662 | 28 | 0.129474441880495 | 0.258948883760990 | 0.870525558119505 | 29 | 0.105290055760070 | 0.210580111520141 | 0.89470994423993 | 30 | 0.08609179055941 | 0.17218358111882 | 0.91390820944059 | 31 | 0.0777965639701615 | 0.155593127940323 | 0.922203436029839 | 32 | 0.079687498475619 | 0.159374996951238 | 0.920312501524381 | 33 | 0.0744837511941968 | 0.148967502388394 | 0.925516248805803 | 34 | 0.0701963914970464 | 0.140392782994093 | 0.929803608502954 | 35 | 0.0643160672069142 | 0.128632134413828 | 0.935683932793086 | 36 | 0.071426842708806 | 0.142853685417612 | 0.928573157291194 | 37 | 0.0693467511580726 | 0.138693502316145 | 0.930653248841927 | 38 | 0.0680152392812337 | 0.136030478562467 | 0.931984760718766 | 39 | 0.076930743437782 | 0.153861486875564 | 0.923069256562218 | 40 | 0.109066584819248 | 0.218133169638496 | 0.890933415180752 | 41 | 0.119481201959119 | 0.238962403918238 | 0.880518798040881 | 42 | 0.13192816937339 | 0.26385633874678 | 0.86807183062661 | 43 | 0.160554813772191 | 0.321109627544381 | 0.839445186227809 | 44 | 0.218801705296822 | 0.437603410593643 | 0.781198294703178 | 45 | 0.278398328728696 | 0.556796657457391 | 0.721601671271304 | 46 | 0.372355538939091 | 0.744711077878182 | 0.627644461060909 | 47 | 0.458448820587021 | 0.916897641174043 | 0.541551179412979 | 48 | 0.561743372156219 | 0.876513255687561 | 0.438256627843781 | 49 | 0.658670504484025 | 0.68265899103195 | 0.341329495515975 | 50 | 0.73956247028942 | 0.52087505942116 | 0.26043752971058 | 51 | 0.803639136393638 | 0.392721727212724 | 0.196360863606362 | 52 | 0.875636784793912 | 0.248726430412177 | 0.124363215206088 | 53 | 0.905328701930201 | 0.189342596139599 | 0.0946712980697993 | 54 | 0.93158551806954 | 0.136828963860919 | 0.0684144819304594 | 55 | 0.946512395708525 | 0.106975208582951 | 0.0534876042914754 | 56 | 0.958027367454414 | 0.0839452650911726 | 0.0419726325455863 | 57 | 0.973420017237096 | 0.0531599655258076 | 0.0265799827629038 | 58 | 0.982505388762715 | 0.0349892224745693 | 0.0174946112372847 | 59 | 0.985008977862029 | 0.029982044275943 | 0.0149910221379715 | 60 | 0.988712597124446 | 0.0225748057511074 | 0.0112874028755537 | 61 | 0.99170873798077 | 0.0165825240384601 | 0.00829126201923006 | 62 | 0.992107232652045 | 0.0157855346959096 | 0.0078927673479548 | 63 | 0.991608369950604 | 0.0167832600987911 | 0.00839163004939553 | 64 | 0.992447699172063 | 0.0151046016558733 | 0.00755230082793667 | 65 | 0.994557912543335 | 0.0108841749133306 | 0.00544208745666531 | 66 | 0.993942213530946 | 0.0121155729381074 | 0.00605778646905371 | 67 | 0.992170841801656 | 0.0156583163966881 | 0.00782915819834406 | 68 | 0.992815457161779 | 0.0143690856764427 | 0.00718454283822133 | 69 | 0.992862859318753 | 0.0142742813624941 | 0.00713714068124703 | 70 | 0.989863397125188 | 0.0202732057496248 | 0.0101366028748124 | 71 | 0.984971050412187 | 0.0300578991756262 | 0.0150289495878131 | 72 | 0.985803690646625 | 0.0283926187067508 | 0.0141963093533754 | 73 | 0.982487949425414 | 0.0350241011491725 | 0.0175120505745862 | 74 | 0.972562285580466 | 0.0548754288390675 | 0.0274377144195337 | 75 | 0.956409617194278 | 0.0871807656114446 | 0.0435903828057223 | 76 | 0.965566497289299 | 0.0688670054214026 | 0.0344335027107013 | 77 | 0.948845314432565 | 0.102309371134870 | 0.0511546855674348 | 78 | 0.918177155135035 | 0.163645689729931 | 0.0818228448649654 | 79 | 0.869603222520928 | 0.260793554958144 | 0.130396777479072 | 80 | 0.857875918060095 | 0.28424816387981 | 0.142124081939905 | 81 | 0.79911529273791 | 0.40176941452418 | 0.20088470726209 | 82 | 0.710733388101687 | 0.578533223796626 | 0.289266611898313 | 83 | 0.584748438601267 | 0.830503122797466 | 0.415251561398733 | 84 | 0.568241895814561 | 0.863516208370877 | 0.431758104185439 | 85 | 0.410628768869048 | 0.821257537738097 | 0.589371231130952 |
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 | 16 | 0.197530864197531 | NOK | 10% type I error level | 22 | 0.271604938271605 | NOK |
| Charts produced by software: | | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/10pt7z1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/10pt7z1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/1ed1u1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/1ed1u1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/2bowv1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/2bowv1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/3u0bg1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/3u0bg1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/4onp71258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/4onp71258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/5s8yo1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/5s8yo1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/6wy071258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/6wy071258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/7poba1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/7poba1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/8ca0n1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/8ca0n1258722754.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/9yexz1258722754.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t12587232179px1963yn45jgsx/9yexz1258722754.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
|
|