Spatial Econometric Analysis Using GAUSS

Slides:



Advertisements
Similar presentations
FINANCIAL TIME-SERIES ECONOMETRICS SUN LIJIAN Feb 23,2001.
Advertisements

StatLab Workshop Yale University Maximiliano Appendino, Economics October 18 th, 2013.
Introduction to Matlab
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
Applied Econometrics Second edition
Data Modeling and Parameter Estimation Nov 9, 2005 PSCI 702.
R. Werner Solar Terrestrial Influences Institute - BAS Time Series Analysis by means of inference statistical methods.
Regression Analysis Using Excel. Econometrics Econometrics is simply the statistical analysis of economic phenomena Here, we just summarize some of the.
Chapter 8 and 9 Review: Logical Functions and Control Structures Introduction to MATLAB 7 Engineering 161.
CHAPTER 1 ECONOMETRICS x x x x x Econometrics Tools of: Economic theory Mathematics Statistical inference applied to Analysis of economic data.
Multiple Regression Applications
Least-Squares Regression
Spatial Econometric Analysis Using GAUSS 4 Kuan-Pin Lin Portland State University.
Chapter 10 Review: Matrix Algebra
GAUSS Mathematical and Statistical System GAUSS 12 Windows Interface Pages Command, Source, Data, Debug, Help Windows Command Input, Program Output, …
Nonparametric Econometrics1 Intro to Matlab for Data Analysis and Statistical Modeling.
SAS Workshop Lecture 1 Lecturer: Annie N. Simpson, MSc.
Data, graphics, and programming in R 28.1, 30.1, Daily:10:00-12:45 & 13:45-16:30 EXCEPT WED 4 th 9:00-11:45 & 12:45-15:30 Teacher: Anna Kuparinen.
Introduction to SAS. What is SAS? SAS originally stood for “Statistical Analysis System”. SAS is a computer software system that provides all the tools.
FINANCIAL ECONOMETRIC Financial econometrics is the econometrics of financial markets Econometrics is a mixture of economics, mathematics and statistics.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Agenda Introduction Overview of White-box testing Basis path testing
Matlab Basics Tutorial. Vectors Let's start off by creating something simple, like a vector. Enter each element of the vector (separated by a space) between.
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Various topics Petter Mostad Overview Epidemiology Study types / data types Econometrics Time series data More about sampling –Estimation.
Maximum Likelihood Estimation Methods of Economic Investigation Lecture 17.
Spatial Econometric Analysis Using GAUSS
Generalised method of moments approach to testing the CAPM Nimesh Mistry Filipp Levin.
Lecture 26: Reusable Methods: Enviable Sloth. Creating Function M-files User defined functions are stored as M- files To use them, they must be in the.
K. Ensor, STAT Spring 2005 Estimation of AR models Assume for now mean is 0. Estimate parameters of the model, including the noise variace. –Least.
Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Lecturer: Ing. Martina Hanová, PhD. Business Modeling.
G Lecture 71 Revisiting Hierarchical Mixed Models A General Version of the Model Variance/Covariances of Two Kinds of Random Effects Parameter Estimation.
R. Kass/W03 P416 Lecture 5 l Suppose we are trying to measure the true value of some quantity (x T ). u We make repeated measurements of this quantity.
MathematicalMarketing Slide 5.1 OLS Chapter 5: Ordinary Least Square Regression We will be discussing  The Linear Regression Model  Estimation of the.
Computacion Inteligente Least-Square Methods for System Identification.
Lecturer: Ing. Martina Hanová, PhD. Business Modeling.
Stats 242.3(02) Statistical Theory and Methodology.
Spatial Econometric Analysis
Heteroscedasticity Chapter 8
The Maximum Likelihood Method
Chapter 7. Classification and Prediction
Dynamic Models, Autocorrelation and Forecasting
Introduction to Matlab
Spatial Econometric Analysis Using GAUSS
Matlab Training Session 4: Control, Flow and Functions
Lecture: MATLAB Chapter 1 Introduction
2017年6月4日更新 1. イントロダクション 東北大学 大学院工学研究科 嶋田 慶太.
REGRESSION DIAGNOSTIC II: HETEROSCEDASTICITY
The Maximum Likelihood Method
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
CHAPTER 16 ECONOMIC FORECASTING Damodar Gujarati
The Maximum Likelihood Method
StatLab Matlab Workshop
Matlab review Matlab is a numerical analysis system
Spatial Econometric Analysis
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Lecture 2 Introduction to MATLAB
مدلسازي تجربي – تخمين پارامتر
Spatial Econometric Analysis Using GAUSS
Communication and Coding Theory Lab(CS491)
A First Book of ANSI C Fourth Edition
Heteroskedasticity.
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Spatial Econometric Analysis
Matlab Basics Tutorial
BOX JENKINS (ARIMA) METHODOLOGY
Presentation transcript:

Spatial Econometric Analysis Using GAUSS 2 Kuan-Pin Lin Portland State University

GAUSS Mathematical and Statistical System Windows Interface Windows Command, Error, Log, … Menu File, Edit, Run, …, Help Operation Interactive Mode Command (Input / Output) Batch Mode Writing Program Online Help

GAUSS Basics Basic Operations on Matrices + -  ^   .*   ./   %   !   *   / .<   .<=   .==   .>=   .>   ./=     <   <=   ==   >=   >   /= .not  .and   .or   .xor   not  and or   xor ~   |   .*.   *~ Special Operators []   {}   :   .   '(transpose) Useful Algrbra and Matrix Operations exp ln log  abs  sqrt  pi sin cos inv invpd(inverse) det(determinant) Example Least Squares: b=y/x

GAUSS Programming Useful GAUSS Functions System Functions: use, load, output Data Generating Functions: ones, zeros, eye, seqa, seqm, rndu, rndn Data Conversion Functions: reshape, selif, delif, vec, vech, xpnd, submat, diag, diagrv Basic Matrix Functions: Matrix Description: rows, cols, maxc, minc, meanc, median, stdc Matrix Operations: sumc,cumsumc,prodc,cumprodc,sortc,sorthc,sortind Matrix Computation: det,inv,invpd,solpd,vcx,corrx,cond,rank,eig,eigh Probability and Statistical Functions: pdfn, cdfn, cdftc, cdffc, cdfchic, dstat, ols Calculus Functions: gradp, hessp, intsimp, linsolve, eqsolve, sqpsolve

GAUSS Programming Controlling Execution Flow If Statement if; then; else; elseif; endif; For Loop for i (start,stop,step); ... endfor; Do Loop do while ... endo; do until ... endo;

GAUSS Programming Write Your Own Functions Single Line Function fn fn_name(args) = code_for_function; Procedure proc [[(nrets)=]] proc_name(arg_list); local list of local variables; ... statements in the body of procedure; retp(ret_list); endp;

GAUSS Programming Example 1 Do you know the accuracy of your computer's numerical calculation? This example addresses this important problem. Suppose e is a known small positive number, and the 5x4 matrix X is defined as follows: Verify that the eigenvalues of X'X are 4+e2, e2, e2, and e2. How small of the value of e your computer will allow so that X'X can be inverted? (example.1) one=ones(1,4); e=1.0; do until e < 1.0e-20; x=one|(e.*eye(4)); print "e = " e; r=eigrs(x'x); print r'; invx=invpd(x'x); print invx; e=e/10; endo;

GAUSS Programming Example 2 Write a single-line GAUSS function to convert a quarterly time series into the annual series by taking the average of every four data points. How you extend the single-line version of time series conversion function to a multi-line procedure so that it can handle the conversion of more than one time series? (example.2) fn qtoa1(x) = meanc(reshape(x,rows(x)/4,4)'); proc qtoa(x); local r,c,y,i; r = rows(x); c = cols(x); y = qtoa1(x[.,1]); i = 2; do until i > c; y = y~qtoa1(x[.,i]); i = i+1; endo; retp(y); endp;

GPE2 for GAUSS GPE2 is a package of econometric procedures written in GAUSS. There are four main functions, driven by a set of global control variables: Reset Set up global control (input and output) variables. Estimate Estimation of a linear or generalized linear model. Forecast Forecasting based on a linear or generalized linear model. Optimize Estimation of a nonlinear model. Gpehelp Online help of using GPE2.

GPE2 for GAUSS Selected Global Control Variables Input Control Variables _names, _begin, _end, _rstat, _rtest, _rplot, _rlist,_const, _restr, _vcov, _hacv, _weight, _ivar, _dlags, _pdl, _eq, _id, _ar, _ma, _arma, _garch, _acf, _acf2, _nlopt, _method, _iter, _tol, _step, _conv, _fbrgin, _fend, _fstat, _fplot, _splag, _spw, _spwd Output Control Variables __y, __x, __e, __b, __vb, __v, __rss, __r2, __f, __vf, __t, __a, __va

GPE2 for GAUSS A Typical Program Using GPE2 /* ** Comments on program title, purposes, and the usage of the program */ use gpe2; @ using GPE package (version 2) @ // this must be the first executable statement ** Writing output to file or sending it to printer: ** specify file name for output // Loading data: read data series from data files. ** Generating or transforming data series: ** create and generate variables with data scaling or transformation ** (e.g. y and x are generated here and will be used below) call reset; @ initialize global variables @ ** Set input control variables for model estimation ** (e.g. _names for variable names, see Appendix A) call estimate(y,x); @ do model estimation @ // variables y, x are generated earlier ** Retrieve output control variables for model evaluation and analysis ** Set more input control variables if needed, for model prediction ** (e.g. _b for estimated parameters) call forecast(y,x); @ do model prediction @ end; @ important: don’t forget this @

GPE2 for GAUSS Examples More than 70 examples covering linear and nonlinear least squares, instrumental variables, system of simultaneous linear equations, time series analysis, panel data, limited dependent variables, maximum likelihood, generalized methods of moments, and … The latest extensions include spatial lag model estimation, hypothesis testing, and robust inference.

Software Demonstration Installation GAUSS Light 10.0 GPE2 for GAUSS 10.0 Example: Zellner and Revankar [1970] U.S. Transportation Equipment Industry Cobb-Douglas Production Function ln(Q) = a + b ln(L) + g ln(K) + e Generalized Cobb-Douglas Production Function ln(Q) + q Q = a + b ln(L) + g ln(K) + e

Example Zellner and Revankar [1970] Cobb-Douglas Production Function OLS Estimator Hypothesis Testing Constant Returns to Scale? Homoscedasticity? Generalized Production Function Output Effects? Instrumental Variables GAUSS/GPE2 Program and Data

References K.-P. Lin, Computational Econometrics: GAUSS Programming for Econometricians and Financial Analysts, ETEXT Publishing, Los Angeles, 2001. C.-F. Chung, Learning Econometrics with GAUSS, Institute of Economics, Academia Sinica, 2000. A. Zellner and N. Revankar, "Generalized Production Functions," Review of Economic Studies, 1970, 241-250.