Stable regression program stabelreg.exe --------------------------------------- stablereg is used for linear regression problems y = theta[1]*x1 + ... + theta[k]*xk + epsilon, where epsilon is assumed to be a heavy tailed stable error. When the error terms are heavy tailed, ordinary least squares (OLS) can give unreliable estimates of the regression coefficients. This program estimates the regression coefficients theta[1],..., theta[k], and the stable parameters (alpha,beta,gamma,delta) of the error term. It will also give confidence intervals for all the parameter estimates. This program is based on paper Linear and nonlinear regression with stable errors, by John P. Nolan and Diana Ojeda Revah, Journal of Econometrics, Volume 172, pages 186-194 (2013). Note: stablereg.exe is a Windows 32 bit program. It will also run under Windows 64 bit. It will not run on other systems. To use the program ------------------ 1. Download the program stablereg.exe to your computer. Put it in a folder for which you have write access. 2. Create a text input file that contains one line of input parameters, and then n lines with the data for the regression. Do this in the same folder where you put the program in step 1. See the lines at the bottom of this file for an example. (a) The form of the first line should be: n k trimprob[1] trimprob[2] symmetric param conf_level where n = number of data values k = number of regression variables trimprob[2] = trim probabilities. Use 0.1 0.9 if unsure. symmetric = 1 if you want to restrict the stable fit to the symmetric case = 0 if you want to allow asymmetric param = parameterization of stable distribution you want to use (can by 0, 1, or 2) conf_level = confidence level, e.g. 0.95 Note that n, k, symmetric and param are integer values and should not have decimal points. (b) Lines 2,3,4,...,(n+1) of the file should contain the data values in the form y x1 ... xk where y is the value of the dependent variable and x1 ... xk are the independent variables. Note that if you want to have a constant/intercept term in the model, you must enter a column of 1s in the input file. 3. Run the program on your input file. Start a command window and cd to the folder where you put the program and input file. (If you do not know how to do this, ask someone local to assist you.) Run the program: if you put the input data in the file test.dat, type stablereg < test.dat Output will be sent to the console; if you want to redirect it to a file, say test.out, use stablereg < test.dat > test.out Notes: (1) If any of the stable parameters are at a boundary, e.g. alpha=2 or abs(beta)=1, then the Fisher information matrix is singular and confidence intervals are not possible. If a parameter is near one of these boundaries, then the Fisher information matrix is nearly singular and results are not likely to be useful. (2) If alpha < 0.5, the Fisher information matrix is not available. Example ------- The regression model is y = theta[1] + theta[2] * x + epsilon, where theta[1] is the intercept, theta[2] is the slope, and epsilon is a stable error. In this example there are n=100 data rows k=2 regression coefficients trimprob = 0.1 0.9 are the trim probabilities symmetric=0, so we are not assuming symmetry param=2 for the 2-parameterization for stable laws conf_level=0.95 Note that the data file requires a column of 1s for the constant/ intercept term. Below is the output from the program, below that is the input file. The data was generated with theta[1]=3.0, theta[2]=-2.0, alpha=, beta=, gamma=, delta=0 in the 2-parameterization. ---------------- program output -------------------------- >stablereg < test.dat Stable regression program, June 2011 (library version 5.03.03 2011/08/11) n=100 k=2 trimprob= 0.100000 0.900000 symmetric=0 theta[1] theta[2] OLS coefficients: 3.1601 -2.1294 ML coefficients: 3.0138 -2.0196 Stable parameters in the 2-parameterization: alpha=1.33559 beta=0.59921 gamma= 0.076211 delta= -2.414e-019 Asymptotic Fisher information matrix: 52.94998 -7.874455 -147.1668 -218.7869 -106.8273 -7.874455 31.03471 -125.3357 220.9103 107.8641 -147.1668 -125.3357 24542.94 -4911.879 -2398.329 -218.7869 220.9103 -4911.879 12003.39 5860.91 -106.8273 107.8641 -2398.329 5860.91 3917.531 Asymptotic 95.00% confidence intervals: alpha : 1.3356 +/- 0.28956 beta : 0.59921 +/- 0.3805 delta : 0.076211 +/- 0.013435 theta[1]: 3.0138 +/- 0.035969 theta[2]: -2.0196 +/- 0.060319 ---------------- input file test.dat --------------------- 100 2 0.1 0.9 0 2 0.95 2.338487 1 0.3927386 2.235764 1 0.3431984 2.070914 1 0.4148042 2.613185 1 0.1781231 2.445696 1 0.2540967 2.347485 1 0.4258215 1.238248 1 0.8661778 2.98847 1 0.03788169 1.838762 1 0.6568528 1.175915 1 0.9277728 2.408992 1 0.304761 1.984147 1 0.5166594 2.818205 1 0.0613039 2.951728 1 0.01227912 2.118377 1 0.4287728 1.223098 1 0.8560916 2.426375 1 0.6771644 2.592227 1 0.286885 1.460394 1 0.8720562 2.556342 1 0.204913 1.441858 1 0.8308347 2.883262 1 0.0791805 2.905496 1 0.05634998 1.709259 1 0.6643398 2.185562 1 0.4657978 2.949767 1 0.03948595 1.057182 1 0.9897278 1.317668 1 0.8444833 1.693376 1 0.7531302 0.9661343 1 0.9337602 2.719688 1 0.1321129 1.876093 1 0.997976 2.828308 1 0.1442632 2.572827 1 0.2424957 2.302384 1 0.444942 1.278442 1 0.8810497 2.994869 1 0.06087682 1.72429 1 0.6103497 1.940056 1 0.5396896 1.267478 1 0.8692597 1.255509 1 0.8225974 1.112386 1 0.9487281 1.339469 1 0.8194314 1.285876 1 0.8153282 2.087611 1 0.4578974 1.637504 1 0.7197847 2.18599 1 0.447029 2.154706 1 0.4664971 2.417917 1 0.309534 1.706288 1 0.7038244 2.418668 1 0.3145045 2.949145 1 0.1916526 2.365577 1 0.345957 1.892275 1 0.5475366 1.363871 1 0.8319614 2.30772 1 0.3759958 2.601848 1 0.2007295 2.33662 1 0.3244505 1.014331 1 0.9931241 2.359703 1 0.3316523 1.088018 1 0.9738092 3.146223 1 0.1135595 1.347302 1 0.856509 2.061883 1 0.5606603 1.894588 1 0.5237418 1.887402 1 0.4876107 1.327036 1 0.8976011 2.526988 1 0.3449357 1.74818 1 0.6172271 2.165891 1 0.4131711 3.082326 1 0.1210715 2.258843 1 0.4043837 2.865207 1 0.05369592 1.40072 1 0.7816115 1.503033 1 0.9008011 2.866231 1 0.05433948 2.371882 1 0.3766773 1.566231 1 0.6710571 2.859686 1 0.09535147 1.863089 1 0.5592863 7.224775 1 0.1830285 2.242116 1 0.3351343 2.797859 1 0.0776582 3.049769 1 0.02389987 1.85217 1 0.5502926 2.236861 1 0.4024208 1.908503 1 0.3371041 1.736559 1 0.594297 1.954944 1 0.6176503 2.664778 1 0.1713348 2.106328 1 0.3518692 1.986921 1 0.5606277 1.841949 1 0.6492121 1.183248 1 0.8312586 2.192884 1 0.403619 1.470945 1 0.7812964 1.103659 1 0.9402434 1.277019 1 0.8721286 2.931109 1 0.06546117 3.205591 1 0.004808947 ----------------------- end of input file --------------------- John P Nolan, 14 October 2011 jpnolan@american.edu Updated 5 June 2013, giving publication reference and a few more lines of instruction.