Gretl Command Reference

Total Page:16

File Type:pdf, Size:1020Kb

Gretl Command Reference Gretl Command Reference Gnu Regression, Econometrics and Time-series Library Allin Cottrell Department of Economics Wake Forest University Riccardo “Jack” Lucchetti Dipartimento di Economia Università Politecnica delle Marche July, 2017 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see http://www.gnu.org/licenses/fdl.html). Contents 1 Gretl commands 1 1.1 Introduction..............................................1 1.2 Commands...............................................1 add...................................................1 adf....................................................2 anova..................................................3 append.................................................4 ar.....................................................5 ar1....................................................5 arbond.................................................6 arch...................................................7 arima..................................................7 arma...................................................8 biprobit.................................................9 boxplot.................................................9 break.................................................. 10 catch.................................................. 10 chow................................................... 10 clear................................................... 11 coeffsum................................................ 11 coint................................................... 11 coint2.................................................. 12 corr................................................... 13 corrgm................................................. 14 cusum.................................................. 14 data................................................... 15 dataset................................................. 16 debug.................................................. 17 delete.................................................. 17 diff.................................................... 18 difftest................................................. 18 discrete................................................. 19 dpanel.................................................. 19 i Contents ii dummify................................................ 20 duration................................................ 20 elif.................................................... 21 else................................................... 21 end.................................................... 21 endif................................................... 21 endloop................................................. 21 eqnprint................................................ 21 equation................................................ 22 estimate................................................ 22 eval................................................... 23 fcast................................................... 23 flush................................................... 24 foreign................................................. 25 fractint................................................. 25 freq................................................... 26 function................................................. 27 garch.................................................. 27 genr................................................... 28 gmm................................................... 29 gnuplot................................................. 31 graphpg................................................. 33 hausman................................................ 34 heckit.................................................. 35 help................................................... 35 hfplot.................................................. 36 hsk.................................................... 36 hurst.................................................. 36 if..................................................... 37 include................................................. 37 info................................................... 38 install.................................................. 38 intreg.................................................. 38 join................................................... 39 kpss................................................... 39 labels.................................................. 40 lad.................................................... 41 lags................................................... 41 ldiff................................................... 41 Contents iii leverage................................................. 42 levinlin................................................. 42 logistic................................................. 43 logit................................................... 43 logs................................................... 44 loop................................................... 44 mahal.................................................. 45 makepkg................................................ 45 markers................................................. 46 meantest................................................ 46 midasreg................................................ 47 mle.................................................... 48 modeltab................................................ 49 modprint................................................ 49 modtest................................................. 50 mpols.................................................. 51 negbin.................................................. 51 nls.................................................... 52 normtest................................................ 53 nulldata................................................. 53 ols.................................................... 54 omit................................................... 55 open................................................... 55 orthdev................................................. 56 outfile.................................................. 57 panel.................................................. 58 pca.................................................... 59 pergm.................................................. 59 plot................................................... 60 poisson................................................. 61 print................................................... 62 printf.................................................. 63 probit.................................................. 64 pvalue.................................................. 65 qlrtest.................................................. 65 qqplot.................................................. 66 quantreg................................................ 66 quit................................................... 67 rename................................................. 67 Contents iv reset................................................... 67 restrict................................................. 67 rmplot.................................................. 69 run.................................................... 70 runs................................................... 70 scatters................................................. 70 sdiff................................................... 71 set.................................................... 71 setinfo................................................. 76 setmiss................................................. 76 setobs.................................................. 77 setopt.................................................. 78 shell................................................... 79 smpl................................................... 79 spearman................................................ 80 sprintf.................................................. 81 square.................................................. 81 store................................................... 81 summary................................................ 82 system................................................. 83 tabprint................................................. 84 textplot................................................. 85 tobit................................................... 85 tsls.................................................... 86 var.................................................... 87 varlist.................................................. 88 vartest.................................................. 88 vecm................................................... 88 vif.................................................... 89 wls.................................................... 89 xcorrgm................................................. 90 xtab................................................... 90 1.3 Commands by topic......................................... 91 Estimation............................................... 91 Tests.................................................. 91 Transformations........................................... 92 Statistics................................................ 92 Dataset................................................. 92 Graphs................................................. 92 Contents v Printing................................................. 92 Prediction............................................... 92 Programming............................................
Recommended publications
  • Seminar to Advanced Macroeconomics
    Seminar to Advanced Macroeconomics Jaromír Baxa IES FSV UK, WS 2010/2011 Introduction Aim of the seminar: Overview over empirical methods used in macro to make your horizons wider. Easy applications of econometrics to macroeconomic topics discussed in the lectures Using econometric software Talking about your Project Tasks and discussion about Problem Sets Why Empirical Seminar? The Role of Empirical Work in Macro Correspondence between the theory and real data Forecasting and economic policy Finding empirical evidence to build new theories Fundamental ucertainty in econometrics: choice of variables => Robustness over different datasets, over different additional variables... => We should always keep in mind this uncertainty and ask: Are my results good because of the datasets? Methods Descriptive statistics, tests... Some nonparametric methods: tests, density estimates Linear Regression Panel data regression Principal Components method Time series: seasonal adjustment, trends... Dynamic models (very brief introduction) ... Software You can't do empirical work without it. There are many software packages for econometrics: Commercial: TSP, SAS, Stata, E-views, PC-Give, Gauss, S-Plus and many others Freeware/Open Source/Shareware without limitations: Gretl, R-Project, Ox See http://freestatistics.altervista.org/stat.php for comprehensive list. Use whatever you want to And bring your laptop with (if you can) Gretl Available in Room 016: TSP (GiweWin GUI), SPSS for Windows 10.0, R (with necessary libraries), Gretl, JMulti Gretl: http://gretl.sourceforge.net, GNU GPL licence, crossplatform. Have a look into documentation: manual as an textbook available. Don't forget to install seasonal adjustment methods, we will use them in a couple of weeks.
    [Show full text]
  • Regression Models by Gretl and R Statistical Packages for Data Analysis in Marine Geology Polina Lemenkova
    Regression Models by Gretl and R Statistical Packages for Data Analysis in Marine Geology Polina Lemenkova To cite this version: Polina Lemenkova. Regression Models by Gretl and R Statistical Packages for Data Analysis in Marine Geology. International Journal of Environmental Trends (IJENT), 2019, 3 (1), pp.39 - 59. hal-02163671 HAL Id: hal-02163671 https://hal.archives-ouvertes.fr/hal-02163671 Submitted on 3 Jul 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution| 4.0 International License International Journal of Environmental Trends (IJENT) 2019: 3 (1),39-59 ISSN: 2602-4160 Research Article REGRESSION MODELS BY GRETL AND R STATISTICAL PACKAGES FOR DATA ANALYSIS IN MARINE GEOLOGY Polina Lemenkova 1* 1 ORCID ID number: 0000-0002-5759-1089. Ocean University of China, College of Marine Geo-sciences. 238 Songling Rd., 266100, Qingdao, Shandong, P. R. C. Tel.: +86-1768-554-1605. Abstract Received 3 May 2018 Gretl and R statistical libraries enables to perform data analysis using various algorithms, modules and functions. The case study of this research consists in geospatial analysis of Accepted the Mariana Trench, a hadal trench located in the Pacific Ocean.
    [Show full text]
  • 8 the Software Jmulti
    P1: IML CB698-Driver CB698-LUTKEPOHI CB698-LUTKEPOHI-Sample.cls August 25, 2006 17:44 8 The Software JMulTi Markus Kr¨atzig 8.1 Introduction to JMulTi 8.1.1 Software Concept This chapter gives a general overview of the software by which the examples in this book can be reproduced; it is freely available via the Internet.1 The information given here covers general issues and concepts of JMulTi. Detailed descriptions on how to use certain methods in the program are left to the help system installed with the software. JMulTi is an interactive JAVA application designed for the specific needs of time series analysis. It does not compute the results of the statistical calcu- lations itself but delegates this part to a computational engine via a communi- cations layer. The range of its own computing functions is limited and is only meant to support data transformations to provide input for the various statistical routines. Like other software packages, JMulTi contains graphical user interface (GUI) components that simplify tasks common to empirical analysis – espe- cially reading in data, transforming variables, creating new variables, editing data, and saving data sets. Most of its functions are accessible by simple mouse interaction. Originally the software was designed as an easy-to-use GUI for complex and difficult-to-use econometric procedures written in GAUSS that were not available in other packages. Because this concept has proved to be quite fruit- ful, JMulTi has now evolved into a comprehensive modeling environment for multiple time series analysis. The underlying general functionality has been bundled in the software framework JStatCom, which is designed as a ready-made platform for the creation of various statistical applications by developers.
    [Show full text]
  • QUANTILE REGRESSION for CLIMATE DATA Dilhani Marasinghe Clemson University, [email protected]
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Clemson University: TigerPrints Clemson University TigerPrints All Theses Theses 8-2014 QUANTILE REGRESSION FOR CLIMATE DATA Dilhani Marasinghe Clemson University, [email protected] Follow this and additional works at: https://tigerprints.clemson.edu/all_theses Part of the Statistics and Probability Commons Recommended Citation Marasinghe, Dilhani, "QUANTILE REGRESSION FOR CLIMATE DATA" (2014). All Theses. 1909. https://tigerprints.clemson.edu/all_theses/1909 This Thesis is brought to you for free and open access by the Theses at TigerPrints. It has been accepted for inclusion in All Theses by an authorized administrator of TigerPrints. For more information, please contact [email protected]. QUANTILE REGRESSION FOR CLIMATE DATA A Master Thesis Presented to the Graduate School of Clemson University In Partial Fulfillment of the Requirements for the Degree MASTER OF SCIENCE Mathematical Sciences by DILHANI SHALIKA MARASINGHE August 2014 Accepted by: Dr. Collin Gallagher, Committee Chair Dr. Christoper McMahan Dr. Robert Lund Abstract Quantile regression is a developing statistical tool which is used to explain the relationship between response and predictor variables. This thesis describes two examples of climatology using quantile re- gression. Our main goal is to estimate derivatives of a conditional mean and/or conditional quantile function. We introduce a method to handle autocorrelation in the framework of quantile regression and used it with the temperature data. Also we explain some properties of the tornado data which is non-normally distributed. Even though quantile regression provides a more comprehensive view, when talking about residuals with the normality and the constant variance assumption, we would prefer least square regression for our temperature analysis.
    [Show full text]
  • Gretl User's Guide
    Gretl User’s Guide Gnu Regression, Econometrics and Time-series Allin Cottrell Department of Economics Wake Forest university Riccardo “Jack” Lucchetti Dipartimento di Economia Università Politecnica delle Marche December, 2008 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see http://www.gnu.org/licenses/fdl.html). Contents 1 Introduction 1 1.1 Features at a glance ......................................... 1 1.2 Acknowledgements ......................................... 1 1.3 Installing the programs ....................................... 2 I Running the program 4 2 Getting started 5 2.1 Let’s run a regression ........................................ 5 2.2 Estimation output .......................................... 7 2.3 The main window menus ...................................... 8 2.4 Keyboard shortcuts ......................................... 11 2.5 The gretl toolbar ........................................... 11 3 Modes of working 13 3.1 Command scripts ........................................... 13 3.2 Saving script objects ......................................... 15 3.3 The gretl console ........................................... 15 3.4 The Session concept ......................................... 16 4 Data files 19 4.1 Native format ............................................. 19 4.2 Other data file formats ....................................... 19 4.3 Binary databases ..........................................
    [Show full text]
  • IASK Conference Nunes&Balsa .Pdf
    Teaching Methodologies and Open Source Software: Empirical Application to Econometrics and Mathematics Alcina Nunes and Carlos Balsa Abstract — Nowadays, the software open source represents an important teaching resource. However, it is not sufficiently explored as an higher education teaching methodology. In subjects with a very specific goal, applied contents and attended by a small number of students, the commercial software is still preferred to the open source software. Aware of this reality, this paper presents a reflection about the use of open source software in Applied Econometrics and Mathematics. The adoption of two different software programmes – Gretl and Octave – allows the discussion about a comprehensive set of pedagogical, economical and technical advantages and some observed practical limitations. In practice, the refereed advantages are stressed when the students’ results are analysed. Their academic results benefit from the adoption of software which is executed, distributed and improved freely. Index Terms — Econometrics, Mathematics, Open-Source software , Teaching methodologies. —————————— —————————— 1 INTRODUCTION commercial software with which the teachers seem to have created strong personal and he access to open source software is professional links. Tnowadays a rather unexplored source of In the Escola Superior de Tecnologia e de academic pedagogic tools. Software Gestão do Instituto Politécnico de Bragança tools which are crucial to the promotion of, (ESTiG-IPB ) the use of open source software both theoretic and practical, learning is not uncommon. Indeed, the commercial processes in higher education teaching software is being substituted by open source institutions. software concerning operative systems, Along with commercial labels it is possible internet navigation, e-mail management and to find a large diversity of high quality free word processing programmes.
    [Show full text]
  • Using the Vars Package
    Using the vars package Dr. Bernhard Pfaff, Kronberg im Taunus September 9, 2007 Abstract The utilisation of the functions contained in the package ‘vars’ are ex- plained by employing a data set of the Canadian economy. The package’s scope includes functions for estimating vector autoregressive (henceforth: VAR) and structural vector autoregressive models (henceforth: SVAR). In addition to the two cornerstone functions VAR() and SVAR() for estimat- ing such models, functions for diagnostic testing, estimation of restricted VARs, prediction of VARs, causality analysis, impulse response analysis (henceforth: IRA) and forecast error variance decomposition (henceforth: FEVD) are provided too. In each section, the underlying concept and/or method is briefly explained, thereby drawing on the exibitions in Lutke-¨ pohl [2006], Lutkepohl,¨ Kr¨atzig, Phillips, Ghysels & Smith [2004], Lutke-¨ pohl & Breitung [1997], Hamilton [1994] and Watson [1994]. The package’s code is purely written in R and S3-classes with methods have been utilised. It is shipped with a NAMESPACE and a ChangeLog file. It has dependencies to MASS (see Venables & Ripley [2002]) and strucchange (see Zeileis, Leisch, Hornik & Kleiber [2002]). Contents 1 Introduction 2 2 VAR: Vector autoregressive models 2 2.1 Definition . 2 2.2 Estimation . 3 2.3 Restricted VARs . 7 2.4 Diagnostic testing . 9 2.5 Causality Analysis . 14 2.6 Forecasting . 17 2.7 Impulse response analysis . 19 2.8 Forecast error variance decomposition . 21 3 SVAR: Structural vector autoregressive models 23 3.1 Definition . 23 3.2 Estimation . 24 3.3 Impulse response analysis . 27 3.4 Forecast error variance decomposition . 28 4 VECM to VAR 28 1 1 Introduction Since the critique of Sims [1980] in the early eighties of the last cen- tury, VAR analysis has evolved as a standard instrument in econometrics for analysing multivariate time series.
    [Show full text]
  • Quantreg: Quantile Regression
    Package ‘quantreg’ June 6, 2021 Title Quantile Regression Description Estimation and inference methods for models of conditional quantiles: Linear and nonlinear parametric and non-parametric (total variation penalized) models for conditional quantiles of a univariate response and several methods for handling censored survival data. Portfolio selection methods based on expected shortfall risk are also now included. See Koenker (2006) <doi:10.1017/CBO9780511754098> and Koenker et al. (2017) <doi:10.1201/9781315120256>. Version 5.86 Maintainer Roger Koenker <[email protected]> Repository CRAN Depends R (>= 2.6), stats, SparseM Imports methods, graphics, Matrix, MatrixModels, conquer Suggests tripack, akima, MASS, survival, rgl, logspline, nor1mix, Formula, zoo, R.rsp License GPL (>= 2) URL https://www.r-project.org NeedsCompilation yes VignetteBuilder R.rsp Author Roger Koenker [cre, aut], Stephen Portnoy [ctb] (Contributions to Censored QR code), Pin Tian Ng [ctb] (Contributions to Sparse QR code), Blaise Melly [ctb] (Contributions to preprocessing code), Achim Zeileis [ctb] (Contributions to dynrq code essentially identical to his dynlm code), Philip Grosjean [ctb] (Contributions to nlrq code), Cleve Moler [ctb] (author of several linpack routines), Yousef Saad [ctb] (author of sparskit2), Victor Chernozhukov [ctb] (contributions to extreme value inference code), Ivan Fernandez-Val [ctb] (contributions to extreme value inference code), Brian D Ripley [trl, ctb] (Initial (2001) R port from S (to my 1 2 R topics documented: everlasting shame -- how could I have been so slow to adopt R!) and for numerous other suggestions and useful advice) Date/Publication 2021-06-06 17:10:02 UTC R topics documented: akj..............................................3 anova.rq . .5 bandwidth.rq .
    [Show full text]
  • Eugine Pavlov
    Eugine Pavlov [email protected]; [email protected] +7 (968) 671 34 72 Moscow, Russia Nakhimovsky prospect, 47 Education BA in Economics, honors Belgorod State University, Belgorod, Russia, 2011 Concentration: International economics MA in Economics, honors Higher school of economics, Moscow, Russia, 2013 Concentration: Economics of energy and exhaustible resources MA in Economics New economic school, Moscow, Russia, expected 2014 Scholarships Potanin Charity Fund scholarship (2009-2011) Oxford Russia Fund scholarship (2011-2012) Higher school of economics scholarship for academic progress (2012-2013) Publications V. Kryukov, E. Pavlov (2012), “An approach to social and economic assessment of resource regime in an oil and gas sector (the case of the USA)”, Voprosy economiki, Vol.10, 105-116 p. Conferences, II Russian Congress for economic science (2013, Suzdal) summer schools Presentation: “An approach to social and economic assessment of resource regime in an oil and gas sector” E.ON Ruhrgas AG cycle of lectures on energy economics (2012, Moscow) Russian summer school on institutional analysis (2010, Moscow) Presentation: “A straw for a bubble: contract approach to irrational trading” XXXIX Week of science in Saint Petersburg polytechnic university Presentation: “Global financial transaction tax – effects of implementation” (2010, Saint Petersburg) I Russian Congress for economic science (2009, Moscow) Presentation: “Innovation effects under poor institutions” School on EU-Russia relations (2009, Voronezh) Research RA, topic concerning
    [Show full text]
  • They Have Very Good Docs At
    Intro to the Julia programming language Brendan O’Connor CMU, Dec 2013 They have very good docs at: http://julialang.org/ I’m borrowing some slides from: http://julialang.org/blog/2013/03/julia-tutorial-MIT/ 1 Tuesday, December 17, 13 Julia • A relatively new, open-source numeric programming language that’s both convenient and fast • Version 0.2. Still in flux, especially libraries. But the basics are very usable. • Lots of development momentum 2 Tuesday, December 17, 13 Why Julia? Dynamic languages are extremely popular for numerical work: ‣ Matlab, R, NumPy/SciPy, Mathematica, etc. ‣ very simple to learn and easy to do research in However, all have a “split language” approach: ‣ high-level dynamic language for scripting low-level operations ‣ C/C++/Fortran for implementing fast low-level operations Libraries in C — no productivity boost for library writers Forces vectorization — sometimes a scalar loop is just better slide from ?? 2012 3 Bezanson, Karpinski, Shah, Edelman Tuesday, December 17, 13 “Gang of Forty” Matlab Maple Mathematica SciPy SciLab IDL R Octave S-PLUS SAS J APL Maxima Mathcad Axiom Sage Lush Ch LabView O-Matrix PV-WAVE Igor Pro OriginLab FreeMat Yorick GAUSS MuPad Genius SciRuby Ox Stata JLab Magma Euler Rlab Speakeasy GDL Nickle gretl ana Torch7 slide from March 2013 4 Bezanson, Karpinski, Shah, Edelman Tuesday, December 17, 13 Numeric programming environments Core properties Dynamic Fast? and math-y? C/C++/ Fortran/Java − + Matlab + − Num/SciPy + − R + − Older table: http://brenocon.com/blog/2009/02/comparison-of-data-analysis-packages-r-matlab-scipy-excel-sas-spss-stata/ Tuesday, December 17, 13 - Dynamic vs Fast: the usual tradeof - PL quality: more subjective.
    [Show full text]
  • Economic Theory and Econometric Methods in Spatial Market Integration Analysis
    ECONOMIC THEORY AND ECONOMETRIC METHODS IN SPATIAL MARKET INTEGRATION ANALYSIS Dissertation to obtain the Ph. D. degree in the International Ph. D. Program for Agricultural Sciences in Göttingen (IPAG) at the Faculty of Agricultural Sciences, Georg-August-University Göttingen, Germany presented by Sergio René Araujo Enciso born in Ciudad de México, D.F, México Göttingen, March 2012 D7 1. Name of supervisor: Prof. Dr. Stephan v.Cramon-Taubadel 2. Name of co-supervisor: Prof. Dr. Bernhard Brümmer 3. Name of a further member of the examination committee: J-Prof. Xiaohua Yu, Ph.D. Date of dissertation: May the 30th, 2012 For Rosi, René, Mónica, Móniquita, Dolores, Raúl, Julia, Luz María, Dolores & José Acknowledgments-Agradecimientos Through the last six year, I have been living is a sort of self-exile driven by my own ideas about experiencing life in a foreign country. At this stage I feel alienated not only here, but at homeland as well. Somehow, as one Professor once said: “You will become a citizen of the world”, so that defining homeland is no longer straightforward in my situation. Along with the many sacrifices, i.e. spicy food, that have been done for pursuing a life abroad, there are invaluable rewards; the most important for sure is the chance of meeting wonderful people trough the journey. Especially, I am grateful to my supervisors: Prof. Dr. von Cramon-Taubadel for the lively discussions and for being supportive during my studies, Prof. Dr. Bernhard Brümmer for awakening my interest in quantitative methods during the lectures and for his valuable recommendations, and J-Prof.
    [Show full text]
  • Using the MIDAS Matlab Toolbox Via GNU Octave
    Using the MIDAS Matlab Toolbox via GNU Octave Allin Cottrell∗ August 30, 2016 1 Introduction Eric Ghysels' MIDAS Matlab Toolbox is the benchmark implementation of MIDAS (Mixed Data Sampling) methods in econometrics, written by the economist who pioneered these methods.1 Octave is a free, open-source clone of Matlab, albeit|not surprisingly|not quite 100% compat- ible with the latter. It's often the case that for complex programs, some tweaks are required to get Matlab code to run on Octave, and the MIDAS Toolbox is a case in point. This note explains how to get the MIDAS Toolbox running on Octave. However, parts of the following may be of interest to Matlab users too, since some of the tweaks described below are also required to run Ghysels' code on Matlab R2016a for Linux.2 I begin by stating what's needed on the Octave side, then describe my modifications to the MIDAS Toolbox files. An annotated listing of these modifications is given in section 4. Section 5 provides instructions for installing the modified version of the Toolbox, and section 6 goes into some technicalities, for anyone who's interested. 2 On the Octave side First, you will need the io, optim and statistics packages installed; and optim requires struct. If you don't already have these, it's simply a matter of executing the following commands at the Octave prompt (when online, of course):3 pkg install -forge io pkg install -forge struct pkg install -forge optim pkg install -forge statistics Second, the MIDAS code calls the Matlab function addParameter, which is not supported in Octave (or not in Octave version ≤ 4.0.3 anyway).
    [Show full text]