xsmle  A Command to Estimate Spatial Panel Data Models in Stata


 Cameron Berry
 1 years ago
 Views:
Transcription
1 xsmle  A Command to Estimate Spatial Panel Data Models in Stata Federico Belotti?, Gordon Hughes,AndreaPianoMortari?? CEIS, University of Rome Tor Vergata School of Economics, University of Edinburg Italian Stata Users Group Meeting Florence, November
2 Outline 1 Motivation 2 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command 3
3 A general specification for Spatial Panel models: nx KX KX nx y it = + y it 1 + w ij y jt + x itk k + w ij x jtk k + j=1 k=1 k=1 j=1 + µ i + t + it (1) nx it = m ij it + it i =1,...,n t =1,...,T (2) j=1 Static Models ( = 0 ) and Dynamic Models ( 6= 0,Yuetal.(2008)) if =0and! Spatial Autoregressive Model with Auto Regressive disturbances (SAC) if if =0! Spatial Durbin Model (SDM) =0and =0! Spatial Autoregressive Model (SAR) if =0and =0! Spatial Error Model (SEM) if =0, =0,andµ i = P n j=1 w ij µ i + i! Generalised Spatial Panel Random E ects model (GSPRE)
4 Anumberofspatialrelatedroutineshavebeenwrittenbyusersandavailable through SSC. A noncomprehensive list includes: Data management and visualization shp2dta by K. Crow spmat by D.M. Drukker et al spwmatrix by P.W. Jeanty spmap by M. Pisati geocode3 by S. Bernhard Cross sectional data spreg: SAR,SEM,SACvia ML or GS2SLS by D. M. Drukker et al spivreg: SACvia GS2SLS by D. M. Drukker et al spmlreg: SAR,SEM,SDM,SACvia ML by P.W. Jeanty spatreg: SAR,SEMvia ML by M. Pisati spautoreg: SAR,SEM,SDM,SACvia ML or GS2SLS by E.A. Shehata Panel data spreg*xt suite SAR, SEM, SDM, SAC via LS, GLS, GMM or GS2SLS by E.A. Shehata
5 DGP replications y it = nx w ij y jt +0.3x 1it +0.7x 2it + µ i + t + it n =1,...,188 t =1,...,5 j=1 where the nuisance parameters µ i (i =1,...,n) are drawn from an iid standard Gaussian random variable. To allow for dependence between the unitspecific e ects and the regressors, we generate the latter as follows x kit =0.4µ i +( ) 1/2 z kit, where k =1, 2andthez kit is an iid standard Gaussian random variable. =0.3 =0.5 =0.7 bias MSE bias MSE bias MSE xsmle spregfext xtivreg
6 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command xsmle fits (balanced) Spatial Panel data models via maximum likelihood (ML) Requirements: (At least) Stata Version 10 The n n matrix of spatial weights. xsmle will deal with the longitudinal dimension automatically Data must be tsset or xtset
7 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command The basic xsmle syntax is the following xsmle depvar indepvars if in weight, options The default model is the randome ects SAR model Only aweight are allowed but the declared weight variable must be constant within each panel unit The mi prefix is allowed Factor variables are allowed
8 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command Options common to all spatial models model(name) specifiesthespatialmodeltobeestimated.maybesar for the SpatialAutoRegressive model, sdm for the Spatial Durbin Model, sem for the SpatialError Model, sac for the SpatialAutoregressive with Spatially Autocorrelated Errors Model, gspre for the Generalised Spatial Random E ects Model. re use the random e ects estimator; the default. This option cannot be specified when model(sac). fe use the fixed e ects estimator. This option cannot be specified when model(gspre). type(type options [, leeyu]) specifies fixede ects type; only for fe estimators. May be ind for spatial fixed e ects, time for time fixed e ects or both for both spatial and time fixed e ects. Suboption leeyu allows to transform the data according to Lee and Yu (2010) approach and can be used only when type(ind).
9 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command noconstant suppresses the constant term in the model. Only for re estimators. noeffects suppresses the computation of direct, indirect and total e ects. nsim(#) sets the number of simulations for the LeSage and Pace (2009) procedure to compute the standard errors of the direct, indirect and total e ects. constraints(constraints list) appliesspecifiedlinearconstraints. from(init specs) specifies initial values for the coe cients. level(#) sets confidence level for confidence intervals; default is level(95). postscore save observationbyobservation scores in the estimation results list. posthessian save the Hessian corresponding to the full set of coe in the estimation results list. hausman performs the Hausman test. cients
10 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command Variance estimation This section describes the arguments of the vce(vcetype) option. oim observed information matrix. opg outer product of the gradient vectors. robust clustered sandwich estimator where clustvar is the panelvar. cluster clustvar clustered sandwich estimator. dkraay(#) DriscollKraay robust estimator. Where # is the maximum lag used in the calculation.
11 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command In xsmle the spatial weighting matrix can be astatamatrix a spmat object In both cases the matrix can be standardized or not. e.g. a Stata matrix can be created using matrix define, imported from Mata using st matrix( string scalar name, real matrix) or imported from GIS softwares like GeoDa using spwmatrix gal using path to gal file, wname(name of the matrix) spmat objects are created by spmat spmat import name of the object using path to file
12 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command SAR model wmatrix(name) specifies the weight matrix for the spatialautoregressive term. dlag includes (time) lagged dependent variable in the model. SDM model wmatrix(name) specifies the weight matrix for the spatialautoregressive term. dmatrix(name) specifies the weight matrix for the spatially lagged regressors; default is to use the matrix specified in wmat(name). durbin(dvarlist) specifiestheregressorsthathavetobespatiallylagged; default is to lag all independent variables specified in varlist. dlag includes (time) lagged dependent variable in the model.
13 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command SEM model ematrix(name) specifies the weight matrix for the spatialautocorrelated error term. SAC model wmatrix(name) specifies the weight matrix for the spatialautoregressive term. ematrix(name) specifies the weight matrix for the spatialautocorrelated error term. GSPRE model wmatrix(name) specifies the weight matrix for the spatialautocorrelated randome ects. ematrix(name) specifies the weight matrix for the spatialautocorrelated error term. error(#) defines the structure of the model. # is equal to 1 when 6= 6= 0,#isequalto2when =0,#isequalto3when =0,#is equal to 4 when =.
14 Options common to all spatial models The weighting matrix Models specific options xsmle postestimation command command allows to postestimate spatial fixed or random e ects. The methods implemented in this command are the panel data extensions of those available in Drukker, Prucha, and Raciborski (2011) predict type newvar if in, statistic where statistic includes: rform the default, calculates predicted values from the reducedform equation: y it =(I n W ) 1 (x it + i ) limited predicted values based on the limited information set. This option is available only when model(sac). naive predicted values based on the observed values of y it = Wy it + x it + i xb calculates the linear prediction including the fixed or random e ect x it + i. a estimates i,thefixedorrandome ect. In the case of fixede ects models, this statistic is allowed only when type(ind)
15 DGP  Fixed e ects SDM y it = nx w ij y jt +0.5x 1it 0.3x 2it 0.2x 3it +0.3 j=1 nx w ij x 2it +0.9 j=1 nx w ij x 1it + j=1 nx w ij x 3it + µ i + t + it n =1,...,188 t =1,...,5 j=1 where the nuisance parameters µ i (i =1,...,n) are drawn from an iid standard Gaussian random variable. To allow for dependence between the unitspecific e ects and the regressors, we generate the latter as follows x kit =0.4µ i +( ) 1/2 z kit, where k =1, 2, 3, z 1it is standard Gaussian, z 2it is N(0, )andz 3it is N(0, 2 2 ).
16 .. *** load a dta dataset containing the spatial contiguity matrix. use ASL_contiguity_mat_ns.dta, clear. *** get an spmat objects from dta. spmat dta W W*, replace. *** Summarize the spmat obj. spmat summarize W, links Summary of spatialweighting object W Matrix Description Dimensions 188 x 188 Stored as 188 x 188 Links total 906 min 1 mean max
17 . ** Fixedeffects Durbin model (correctly specified, row normalized W). xsmle y x1 x2 x3, wmat(w) model(sdm) fe type(ind) nsim(500) nolog Warning: All regressors will be spatially lagged SDM with spatial fixedeffects Number of obs = 940 Group variable: id Number of groups = 188 Time variable: t Panel length = 5 Rsq: within = between = overall = Mean of fixedeffects = Loglikelihood = y Coef. Std. Err. z P> z [95% Conf. Interval] Main x x x Wx x x x Spatial rho Variance sigma2_e [CONTINUES]
18 In a spatial setting, the e ect of an explanatory variable change in a particular unit a ects not only that unit but also its neighbors (LeSage and Pace, 2009). 2 3 =(I W ) 1 nk 4 k w 12 k w 1n k w 21 k k w 2n k w n1 k w n2 k k 7 5 If we have only 2 units and 1 regressor: apple SAR and SAC! (I W ) apple 1 0 SEM! 0 1 apple SDM! (I W ) 1 1 w 12 1 w
19 [CONTINUES] Direct x x x Indirect x x x Total x x x estimates store sdm_fe
20 ** Fixedeffects Durbin model (correctly specified, row normalized W). xsmle y x1 x2 x3, wmat(w) model(sdm) re type(ind) nsim(500) nolog noeff Warning: Option type(ind) will be ignored Warning: All regressors will be spatially lagged SDM with randomeffects Number of obs = 940 Group variable: id Number of groups = 188 Time variable: t Panel length = 5 Rsq: within = between = overall = Loglikelihood = y Coef. Std. Err. z P> z [95% Conf. Interval] Main x x x _cons Wx x x x Spatial rho Variance lgt_theta sigma_e estimates store sdm_re
21 hausman sdm_fe sdm_re, eq(1:1 2:2 3:3)  Coefficients  (b) (B) (bb) sqrt(diag(v_bv_b)) sdm_fe sdm_re Difference S.E. comp1 x x x comp2 x x x comp3 rho b = consistent under Ho and Ha; obtained from xsmle B = inconsistent under Ha, efficient under Ho; obtained from xsmle Test: Ho: difference in coefficients not systematic chi2(7) = (bb) [(V_bV_B)^(1)](bB) = chi2<0 ==> model fitted on these data fails to meet the asymptotic assumptions of the Hausman test; see suest for a generalized test
22 . ** Fixedeffects Durbin model (correctly specified, row normalized W). xsmle y x1 x2 x3, wmat(w) model(sdm) fe type(ind) hausman noeff nolog Warning: All regressors will be spatially lagged... estimating randomeffects model to perform Hausman test SDM with spatial fixedeffects Number of obs = 940 Group variable: id Number of groups = 188 Time variable: t Panel length = 5 Rsq: within = between = overall = Mean of fixedeffects = Loglikelihood = y Coef. Std. Err. z P> z [95% Conf. Interval] Main x x x Wx x x x Spatial rho Variance sigma2_e Ho: difference in coeffs not systematic chi2(7) = Prob>=chi2 =
23 . *********. predict yhat, rform. predict yhat1, naive. predict alphahat, a. sum alpha alphahat Variable Obs Mean Std. Dev. Min Max alpha alphahat
24
25 Using matrix notation the SDM ( = 0) may be derived from a SEM model hence { y = X + u u = W u + u(1 W ) = y(1 W ) = X (1 W )+ y = W y + X WX + y = W y + X + WX + and test the following constraints 1 =0and 6= 0) the model is a SAR 2 = ) the model is a SEM.
26 ** Test for SAR. test [Wx]x1 = [Wx]x2 = [Wx]x3 = 0 ( 1) [Wx]x1  [Wx]x2 = 0 ( 2) [Wx]x1  [Wx]x3 = 0 ( 3) [Wx]x1 = 0 chi2( 3) = Prob > chi2 = ** Test for SEM. testnl ([Wx]x1 = [Spatial]rho*[Main]x1) ([Wx]x2 = [Spatial]rho*[Main]x2) ([ > Wx]x3 = [Spatial]rho*[Main]x3) (1) [Wx]x1 = [Spatial]rho*[Main]x1 (2) [Wx]x2 = [Spatial]rho*[Main]x2 (3) [Wx]x3 = [Spatial]rho*[Main]x3 chi2(3) = Prob > chi2 =
27 ** SAC Model. xsmle y x1 x2 x3, wmat(w) emat(w) model(sac) fe type(ind) noeff nolog SAC with spatial fixedeffects Number of obs = 940 Group variable: id Number of groups = 188 Time variable: t Panel length = 5 Rsq: within = between = overall = Mean of fixedeffects = Loglikelihood = y Coef. Std. Err. z P> z [95% Conf. Interval] Main x x x Spatial rho lambda Variance sigma2_e
28 SDM vs SAC. qui xsmle y x1 x2 x3, wmat(w) model(sdm) fe type(ind) noeff nolog. estat ic Model Obs ll(null) ll(model) df AIC BIC Note: N=Obs used in calculating BIC; see [R] BIC note. qui xsmle y x1 x2 x3, wmat(w) emat(w) model(sac) fe type(ind) noeff nolog. estat ic Model Obs ll(null) ll(model) df AIC BIC Note: N=Obs used in calculating BIC; see [R] BIC note
29 Lee, L. F. and Yu, J. (2010). of spatial autoregressive panel data models with fixed e ects. Journal of Econometrics, 154(2): LeSage, J. P. and Pace, R. K. (2009). Introduction to Spatial Econometrics. Taylor & Francis. Yu, J., de Jong, R., and Lee, L. F. (2008). Quasimaximum likelihood estimators for spatial dynamic panel data with fixed e ects when both n and tarelarge.journal of Econometrics, 146:
Panel Data 4: Fixed Effects vs Random Effects Models
Panel Data 4: Fixed Effects vs Random Effects Models Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised April 4, 2017 These notes borrow very heavily, sometimes verbatim,
More informationInstrumental variables, bootstrapping, and generalized linear models
The Stata Journal (2003) 3, Number 4, pp. 351 360 Instrumental variables, bootstrapping, and generalized linear models James W. Hardin Arnold School of Public Health University of South Carolina Columbia,
More informationTitle. Syntax. stata.com. intreg Interval regression. weight. indepvars. intreg depvar 1 depvar 2. , options. Description. options
Title stata.com intreg Interval regression Syntax Menu Description Options Remarks and examples Stored results Methods and formulas References Also see Syntax intreg depvar 1 depvar 2 [ indepvars ] [ if
More informationAn Introduction to Stata Part II: Data Analysis
An Introduction to Stata Part II: Data Analysis Kerry L. Papps 1. Overview Dofiles Sorting a dataset Combining datasets Creating a dataset of means or medians etc. Weights Panel data capabilities Dummy
More informationStata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto
AGRODEP Technical Note 08 April 2013 Stata Training Manuel Barron and Pia Basurto AGRODEP Technical Notes are designed to document stateoftheart tools and methods. They are circulated in order to help
More informationSpeeding Up the ARDL Estimation Command:
Speeding Up the ARDL Estimation Command: A Case Study in Efficient Programming in Stata and Mata Sebastian Kripfganz 1 Daniel C. Schneider 2 1 University of Exeter 2 Max Planck Institute for Demographic
More informationCH5: CORR & SIMPLE LINEAR REFRESSION =======================================
STAT 430 SAS Examples SAS5 ===================== ssh xyz@glue.umd.edu, tap sas913 (old sas82), sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm CH5: CORR & SIMPLE LINEAR REFRESSION =======================================
More informationHeteroskedasticity and Homoskedasticity, and HomoskedasticityOnly Standard Errors
Heteroskedasticity and Homoskedasticity, and HomoskedasticityOnly Standard Errors (Section 5.4) What? Consequences of homoskedasticity Implication for computing standard errors What do these two terms
More informationINTRODUCTION TO PANEL DATA ANALYSIS
INTRODUCTION TO PANEL DATA ANALYSIS USING EVIEWS FARIDAH NAJUNA MISMAN, PhD FINANCE DEPARTMENT FACULTY OF BUSINESS & MANAGEMENT UiTM JOHOR PANEL DATA WORKSHOP23&24 MAY 2017 1 OUTLINE 1. Introduction 2.
More informationA quick introduction to STATA
A quick introduction to STATA Data files and other resources for the course book Introduction to Econometrics by Stock and Watson is available on: http://wps.aw.com/aw_stock_ie_3/178/45691/11696965.cw/index.html
More informationStata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012
Stata Session 2 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 4136, UiO, 2012 Tarjei Havnes (University of Oslo) Stata Session 2 ECON
More informationSource:
Time Series Source: http://www.princeton.edu/~otorres/stata/ Time series data is data collected over time for a single or a group of variables. Date variable For this kind of data the first thing to do
More informationTwoStage Least Squares
Chapter 316 TwoStage Least Squares Introduction This procedure calculates the twostage least squares (2SLS) estimate. This method is used fit models that include instrumental variables. 2SLS includes
More informationWeek 9: Modeling II. Marcelo Coca Perraillon. Health Services Research Methods I HSMP University of Colorado Anschutz Medical Campus
Week 9: Modeling II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Taking the log Retransformation
More informationMODULE ONE, PART THREE: READING DATA INTO STATA, CREATING AND RECODING VARIABLES, AND ESTIMATING AND TESTING MODELS IN STATA
MODULE ONE, PART THREE: READING DATA INTO STATA, CREATING AND RECODING VARIABLES, AND ESTIMATING AND TESTING MODELS IN STATA This Part Three of Module One provides a cookbooktype demonstration of the
More informationPage 1. Notes: MB allocated to data 2. Stata running in batch mode. . do 2simpowervarests.do. . capture log close. .
tm / / / / / / / / / / / / 101 Copyright 19842009 Statistics/Data Analysis StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800STATAPC http://wwwstatacom 9796964600 stata@statacom 9796964601
More informationSerial Correlation and Heteroscedasticity in Time series Regressions. Econometric (EC3090)  Week 11 Agustín Bénétrix
Serial Correlation and Heteroscedasticity in Time series Regressions Econometric (EC3090)  Week 11 Agustín Bénétrix 1 Properties of OLS with serially correlated errors OLS still unbiased and consistent
More informationPackage mvprobit. November 2, 2015
Version 0.18 Date 20151102 Title Multivariate Probit Models Package mvprobit November 2, 2015 Author Arne Henningsen Maintainer Arne Henningsen
More informationAn Introductory Guide to Stata
An Introductory Guide to Stata Scott L. Minkoff Assistant Professor Department of Political Science Barnard College sminkoff@barnard.edu Updated: July 9, 2012 1 TABLE OF CONTENTS ABOUT THIS GUIDE... 4
More informationECONOMICS 452 TIME SERIES WITH STATA
1 ECONOMICS 452 01 Introduction TIME SERIES WITH STATA This manual is intended for the first half of the Economics 452 course and introduces some of the time series capabilities in Stata 8 I will be writing
More informationEmpirical Asset Pricing
Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 17, 2013 Part I Stata Introduction 1 Stata Introduction Interface Commands Command
More informationExample 1 of panel data : Data for 6 airlines (groups) over 15 years (time periods) Example 1
Panel data set Consists of n entities or subjects (e.g., firms and states), each of which includes T observations measured at 1 through t time period. total number of observations : nt Panel data have
More informationReview of Stata II AERC Training Workshop Nairobi, May 2002
Review of Stata II AERC Training Workshop Nairobi, 2024 May 2002 This note provides more information on the basics of Stata that should help you with the exercises in the remaining sessions of the workshop.
More informationA First Tutorial in Stata
A First Tutorial in Stata Stan Hurn Queensland University of Technology National Centre for Econometric Research www.ncer.edu.au Stan Hurn (NCER) Stata Tutorial 1 / 66 Table of contents 1 Preliminaries
More informationStata versions 12 & 13 Week 4 Practice Problems
Stata versions 12 & 13 Week 4 Practice Problems SOLUTIONS 1 Practice Screen Capture a Create a word document Name it using the convention lastname_lab1docx (eg bigelow_lab1docx) b Using your browser, go
More informationA Short Guide to Stata 10 for Windows
A Short Guide to Stata 10 for Windows 1. Introduction 2 2. The Stata Environment 2 3. Where to get help 2 4. Opening and Saving Data 3 5. Importing Data 4 6. Data Manipulation 5 7. Descriptive Statistics
More informationTimeVarying Volatility and ARCH Models
TimeVarying Volatility and ARCH Models ARCH MODEL AND TIMEVARYING VOLATILITY In this lesson we'll use Gretl to estimate several models in which the variance of the dependent variable changes over time.
More informationIntroduction to Bayesian Analysis in Stata
tools Introduction to Bayesian Analysis in Gustavo Sánchez Corp LLC September 15, 2017 Porto, Portugal tools 1 Bayesian analysis: 2 Basic Concepts The tools 14: The command 15: The bayes prefix Postestimation
More informationSTATA TUTORIAL B. Rabin with modifications by T. Marsh
STATA TUTORIAL B. Rabin with modifications by T. Marsh 5.2.05 (content also from http://www.ats.ucla.edu/stat/spss/faq/compare_packages.htm) Why choose Stata? Stata has a wide array of predefined statistical
More informationMissing Data Part II: Multiple Imputation Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 24, 2015
Missing Data Part II: Multiple Imputation Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 24, 2015 Warning: I teach about Multiple Imputation with some trepidation.
More informationRobust Linear Regression (Passing Bablok MedianSlope)
Chapter 314 Robust Linear Regression (Passing Bablok MedianSlope) Introduction This procedure performs robust linear regression estimation using the PassingBablok (1988) medianslope algorithm. Their
More informationRegression. Page 1. Notes. Output Created Comments Data. 26Mar :31:18. Input. C:\Documents and Settings\BuroK\Desktop\Data Sets\Prestige.
GET FILE='C:\Documents and Settings\BuroK\Desktop\DataSets\Prestige.sav'. GET FILE='E:\MacEwan\Teaching\Stat252\Data\SPSS_data\MENTALID.sav'. DATASET ACTIVATE DataSet1. DATASET CLOSE DataSet2. GET FILE='E:\MacEwan\Teaching\Stat252\Data\SPSS_data\survey_part.sav'.
More informationIntroduction to Stata: An Inclass Tutorial
Introduction to Stata: An I. The Basics  Stata is a commanddriven statistical software program. In other words, you type in a command, and Stata executes it. You can use the dropdown menus to avoid
More informationxtdpdml: Linear Dynamic PanelData Estimation using Maximum Likelihood and Structural Equation Modeling
Abstract xtdpdml: Linear Dynamic PanelData Estimation using Maximum Likelihood and Structural Equation Modeling Richard Williams, University of Notre Dame (rwilliam@nd.edu) Paul D. Allison, University
More informationFurther processing of estimation results: Basic programming with matrices
The Stata Journal (2005) 5, Number 1, pp. 83 91 Further processing of estimation results: Basic programming with matrices Ian Watson ACIRRT, University of Sydney i.watson@econ.usyd.edu.au Abstract. Rather
More informationMissing Data Part II: Multiple Imputation & Maximum Likelihood
Missing Data Part II: Multiple Imputation & Maximum Likelihood Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 12, 2017 Warning: I teach about Multiple
More informationCompute MI estimates of coefficients using previously saved estimation results
Title mi estimate using Estimation using previously saved estimation results Syntax Compute MI estimates of coefficients using previously saved estimation results mi estimate using miestfile [, options
More informationMS&E 226: Small Data
MS&E 226: Small Data Lecture 13: The bootstrap (v3) Ramesh Johari ramesh.johari@stanford.edu 1 / 30 Resampling 2 / 30 Sampling distribution of a statistic For this lecture: There is a population model
More informationNCSS Statistical Software. Robust Regression
Chapter 308 Introduction Multiple regression analysis is documented in Chapter 305 Multiple Regression, so that information will not be repeated here. Refer to that chapter for in depth coverage of multiple
More information3 Nonlinear Regression
CSC 4 / CSC D / CSC C 3 Sometimes linear models are not sufficient to capture the realworld phenomena, and thus nonlinear models are necessary. In regression, all such models will have the same basic
More informationSimulating Multivariate Normal Data
Simulating Multivariate Normal Data You have a population correlation matrix and wish to simulate a set of data randomly sampled from a population with that structure. I shall present here code and examples
More informationGradient Descent. Wed Sept 20th, James McInenrey Adapted from slides by Francisco J. R. Ruiz
Gradient Descent Wed Sept 20th, 2017 James McInenrey Adapted from slides by Francisco J. R. Ruiz Housekeeping A few clarifications of and adjustments to the course schedule: No more breaks at the midpoint
More informationModern Spatial Econometrics in Practice: AGuidetoGeoDa, GeoDaSpace and PySAL
Modern Spatial Econometrics in Practice: AGuidetoGeoDa, GeoDaSpace and PySAL Luc Anselin Sergio J. Rey November 10, 2014 DRAFT Do Not Quote Copyright 2014 Luc Anselin and Sergio J. Rey, All Rights Reserved
More informationxtdpdml: Linear Dynamic PanelData Estimation using Maximum Likelihood and Structural Equation Modeling
Abstract xtdpdml: Linear Dynamic PanelData Estimation using Maximum Likelihood and Structural Equation Modeling Richard Williams, University of Notre Dame (rwilliam@nd.edu) Paul D. Allison, University
More informationThe linear mixed model: modeling hierarchical and longitudinal data
The linear mixed model: modeling hierarchical and longitudinal data Analysis of Experimental Data AED The linear mixed model: modeling hierarchical and longitudinal data 1 of 44 Contents 1 Modeling Hierarchical
More informationBASIC STEPS TO DO A SIMPLE PANEL DATA ANALYSIS IN STATA
BASIC STEPS TO DO A SIMPLE PANEL DATA ANALYSIS IN STATA By: Mahyudin Ahmad @ 2017 Basic steps to do a panel data analysis in STATA Page 1 Outline Outline: 1. Setting up commands 2. Importing data to Stata
More informationPackage REndo. November 8, 2017
Type Package Package REndo November 8, 2017 Title Fitting Linear Models with Endogenous Regressors using Latent Instrumental Variables Version 1.3 Date 20171108 Author Raluca Gui, Markus Meierer, Rene
More informationlavaan: an R package for structural equation modeling
lavaan: an R package for structural equation modeling Yves Rosseel Department of Data Analysis Belgium Modern Modeling Methods Conference May 22, 2012 University of Connecticut Yves Rosseel lavaan: an
More informationAn Econometric Study: The Cost of Mobile Broadband
An Econometric Study: The Cost of Mobile Broadband Zhiwei Peng, Yongdon Shin, Adrian Raducanu IATOM13 ENAC January 16, 2014 Zhiwei Peng, Yongdon Shin, Adrian Raducanu (UCLA) The Cost of Mobile Broadband
More informationComputation of the variancecovariance matrix
Computation of the variancecovariance matrix An example with the Countr package. Tarak Kharrat 1 and Georgi N. Boshnakov 2 1 Salford Business School, University of Salford, UK. 2 School of Mathematics,
More informationTitle. Syntax. svy: tabulate oneway Oneway tables for survey data. Basic syntax. svy: tabulate varname. Full syntax
Title svy: tabulate oneway Oneway tables for survey data Syntax Basic syntax svy: tabulate varname Full syntax svy [ vcetype ] [, svy options ] : tabulate varname [ if ] [ in ] [, tabulate options display
More informationPackage truncreg. R topics documented: August 3, 2016
Package truncreg August 3, 2016 Version 0.24 Date 20160803 Title Truncated Gaussian Regression Models Depends R (>= 1.8.0), maxlik Suggests survival Description Estimation of models for truncated Gaussian
More informationBetaRegression with SPSS Michael Smithson School of Psychology, The Australian National University
9/1/2005 BetaRegression with SPSS 1 BetaRegression with SPSS Michael Smithson School of Psychology, The Australian National University (email: Michael.Smithson@anu.edu.au) SPSS Nonlinear Regression syntax
More information**************************************************************************************************************** * Single Wave Analyses.
ASDA2 ANALYSIS EXAMPLE REPLICATION SPSS C11 * Syntax for Analysis Example Replication C11 * Use data sets previously prepared in SAS, refer to SAS Analysis Example Replication for C11 for details. ****************************************************************************************************************
More informationST512. Fall Quarter, Exam 1. Directions: Answer questions as directed. Please show work. For true/false questions, circle either true or false.
ST512 Fall Quarter, 2005 Exam 1 Name: Directions: Answer questions as directed. Please show work. For true/false questions, circle either true or false. 1. (42 points) A random sample of n = 30 NBA basketball
More informationTitle. Syntax. optimize( ) Function optimization. S = optimize init() (varies) optimize init which(s [, { "max" "min" } ] )
Title optimize( ) Function optimization Syntax S = optimize init() (varies) optimize init which(s [, { "max" "min" } ] ) (varies) optimize init evaluator(s [, &function() ] ) (varies) optimize init evaluatortype(s
More informationPackage merror. November 3, 2015
Version 2.0.2 Date 20151020 Package merror November 3, 2015 Author Title Accuracy and Precision of Measurements N>=3 methods are used to measure each of n items. The data are used
More informationPackage endogenous. October 29, 2016
Package endogenous October 29, 2016 Type Package Title Classical Simultaneous Equation Models Version 1.0 Date 20161025 Maintainer Andrew J. Spieker Description Likelihoodbased
More informationTitle. Syntax. Step 1: Initialization. moptimize( ) Model optimization
Title moptimize( ) Model optimization Syntax If you are reading this entry for the first time, skip down to Description and to Remarks, and more especially, to Mathematical statement of the moptimize(
More informationPubHlth 640 Intermediate Biostatistics Unit 2  Regression and Correlation. Simple Linear Regression Software: Stata v 10.1
PubHlth 640 Intermediate Biostatistics Unit 2  Regression and Correlation Simple Linear Regression Software: Stata v 10.1 Emergency Calls to the New York Auto Club Source: Chatterjee, S; Handcock MS and
More informationExploring Econometric Model Selection Using Sensitivity Analysis
Exploring Econometric Model Selection Using Sensitivity Analysis William Becker Paolo Paruolo Andrea Saltelli Nice, 2 nd July 2013 Outline What is the problem we are addressing? Past approaches Hoover
More informationPackage MARX. June 16, 2017
Package MARX June 16, 2017 Title Simulation, Estimation and Selection of MARX Models Version 0.1 Date 20170616 Author [aut, cre, cph], Alain Hecq [ctb], Lenard Lieb [ctb] Maintainer
More informationA User Manual for the Multivariate MLE Tool. Before running the main multivariate program saved in the SAS file Part2Main.sas,
A User Manual for the Multivariate MLE Tool Before running the main multivariate program saved in the SAS file PartMain.sas, the user must first compile the macros defined in the SAS file PartMacros.sas
More informationStat 5100 Handout #6 SAS: Linear Regression Remedial Measures
Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures Example: Age and plasma level for 25 healthy children in a study are reported. Of interest is how plasma level depends on age. (Text Table
More informationFactorial ANOVA. Skipping... Page 1 of 18
Factorial ANOVA The potato data: Batches of potatoes randomly assigned to to be stored at either cool or warm temperature, infected with one of three bacterial types. Then wait a set period. The dependent
More informationCSE446: Linear Regression. Spring 2017
CSE446: Linear Regression Spring 2017 Ali Farhadi Slides adapted from Carlos Guestrin and Luke Zettlemoyer Prediction of continuous variables Billionaire says: Wait, that s not what I meant! You say: Chill
More information050 0 N 03 BECABCDDDBDBCDBDBCDADDBACACBCCBAACEDEDBACBECCDDCEA
050 0 N 03 BECABCDDDBDBCDBDBCDADDBACACBCCBAACEDEDBACBECCDDCEA 55555555555555555555555555555555555555555555555555 YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 01 CAEADDBEDEDBABBBBCBDDDBAAAECEEDCDCDBACCACEECACCCEA
More informationECON Stata course, 3rd session
ECON4150  Stata course, 3rd session Andrea Papini Heavily based on last year s session by Tarjei Havnes February 4, 2016 Stata course, 3rd session February 4, 2016 1 / 19 Before we start 1. Download caschool.dta
More informationSubset Selection in Multiple Regression
Chapter 307 Subset Selection in Multiple Regression Introduction Multiple regression analysis is documented in Chapter 305 Multiple Regression, so that information will not be repeated here. Refer to that
More informationHow fixed mobile usage interact? Does FTTH deployment. influence the interaction?
How fixed mobile usage interact? Does FTTH deployment influence the interaction? Julienne Liang June 28th 2015 Abstract We estimate the interaction between fixed and mobile usage both for voice and data
More informationIntroduction to mixedeffects regression for (psycho)linguists
Introduction to mixedeffects regression for (psycho)linguists Martijn Wieling Department of Humanities Computing, University of Groningen Groningen, April 21, 2015 1 Martijn Wieling Introduction to mixedeffects
More informationChapter 7 Heteroscedastic Tobit Model Code
Ch 7 Heteroscedastic Tobit Model 1 Chapter 7 Heteroscedastic Tobit Model Code The code for estimating a heteroscedastic Tobit model in R and Stata is provided in this document, along with an annotated
More informationOn the Test and Estimation of Fractional Parameter. in ARFIMA Model: Bootstrap Approach
Applied Mathematical Sciences, Vol. 8, 2014, no. 96, 47834792 HIKARI Ltd, www.mhikari.com http://dx.doi.org/10.12988/ams.2014.46498 On the Test and Estimation of Fractional Parameter in ARFIMA Model:
More informationStatistics 202: Data Mining. c Jonathan Taylor. Outliers Based in part on slides from textbook, slides of Susan Holmes.
Outliers Based in part on slides from textbook, slides of Susan Holmes December 2, 2012 1 / 1 Concepts What is an outlier? The set of data points that are considerably different than the remainder of the
More informationMachine Learning Basics. Sargur N. Srihari
Machine Learning Basics Sargur N. srihari@cedar.buffalo.edu 1 Overview Deep learning is a specific type of ML Necessary to have a solid understanding of the basic principles of ML 2 Topics Stochastic Gradient
More informationSpatial Patterns Point Pattern Analysis Geographic Patterns in Areal Data
Spatial Patterns We will examine methods that are used to analyze patterns in two sorts of spatial data: Point Pattern Analysis  These methods concern themselves with the location information associated
More informationBayes Estimators & Ridge Regression
Bayes Estimators & Ridge Regression Readings ISLR 6 STA 521 Duke University Merlise Clyde October 27, 2017 Model Assume that we have centered (as before) and rescaled X o (original X) so that X j = X o
More informationGETTING STARTED WITH STATA FOR WINDOWS R RELEASE 15
GETTING STARTED WITH STATA FOR WINDOWS R RELEASE 15 A Stata Press Publication StataCorp LLC College Station, Texas Copyright c 1985 2017 StataCorp LLC All rights reserved Version 15 Published by Stata
More informationData Management 2. 1 Introduction. 2 Dofiles. 2.1 Adofiles and Dofiles
University of California, Santa Cruz Department of Economics ECON 294A (Fall 2014) Stata Lab Instructor: Manuel Barron 1 Data Management 2 1 Introduction Today we are going to introduce the use of dofiles,
More informationMachine Learning Basics: Stochastic Gradient Descent. Sargur N. Srihari
Machine Learning Basics: Stochastic Gradient Descent Sargur N. srihari@cedar.buffalo.edu 1 Topics 1. Learning Algorithms 2. Capacity, Overfitting and Underfitting 3. Hyperparameters and Validation Sets
More informationIntroduction to Mplus
Introduction to Mplus May 12, 2010 SPONSORED BY: Research Data Centre Population and Life Course Studies PLCS Interdisciplinary Development Initiative Piotr Wilk piotr.wilk@schulich.uwo.ca OVERVIEW Mplus
More information050 0 N 03 BECABCDDDBDBCDBDBCDADDBACACBCCBAACEDEDBACBECCDDCEA
050 0 N 03 BECABCDDDBDBCDBDBCDADDBACACBCCBAACEDEDBACBECCDDCEA 55555555555555555555555555555555555555555555555555 NYYNNYNNNYNYYYYYNNYNNNNNYNYYYYYNYNNNNYNNYNNNYNNNNN 01 CAEADDBEDEDBABBBBCBDDDBAAAECEEDCDCDBACCACEECACCCEA
More informationEvaluation Metrics. (Classifiers) CS229 Section Anand Avati
Evaluation Metrics (Classifiers) CS Section Anand Avati Topics Why? Binary classifiers Metrics Rank view Thresholding Confusion Matrix Point metrics: Accuracy, Precision, Recall / Sensitivity, Specificity,
More informationPackage MSwM. R topics documented: February 19, Type Package Title Fitting Markov Switching Models Version 1.
Type Package Title Fitting Markov Switching Models Version 1.2 Date 20140205 Package MSwM February 19, 2015 Author Josep A. SanchezEspigares, Alberto LopezMoreno Maintainer Josep A. SanchezEspigares
More informationModel Diagnostic tests
Model Diagnostic tests 1. Multicollinearity a) Pairwise correlation test Quick/Group stats/ correlations b) VIF Step 1. Open the EViews workfile named Fish8.wk1. (FROM DATA FILES TSIME) Step 2. Select
More informationChapter 15: Forecasting
Chapter 15: Forecasting In this chapter: 1. Forecasting chicken consumption using OLS (UE 15.1, Equation 6.8, p. 501) 2. Forecasting chicken consumption using a generalized least squares (GLS) model estimated
More informationMultiple Imputation for Missing Data. Benjamin Cooper, MPH Public Health Data & Training Center Institute for Public Health
Multiple Imputation for Missing Data Benjamin Cooper, MPH Public Health Data & Training Center Institute for Public Health Outline Missing data mechanisms What is Multiple Imputation? Software Options
More informationMixture Models and EM
Mixture Models and EM Goal: Introduction to probabilistic mixture models and the expectationmaximization (EM) algorithm. Motivation: simultaneous fitting of multiple model instances unsupervised clustering
More informationResampling Methods. Levi Waldron, CUNY School of Public Health. July 13, 2016
Resampling Methods Levi Waldron, CUNY School of Public Health July 13, 2016 Outline and introduction Objectives: prediction or inference? Crossvalidation Bootstrap Permutation Test Monte Carlo Simulation
More informationThe Truth behind PGA Tour Player Scores
The Truth behind PGA Tour Player Scores Sukhyun Sean Park, Dong Kyun Kim, Ilsung Lee May 7, 2016 Abstract The main aim of this project is to analyze the variation in a dataset that is obtained from the
More informationBlandAltman Plot and Analysis
Chapter 04 BlandAltman Plot and Analysis Introduction The BlandAltman (meandifference or limits of agreement) plot and analysis is used to compare two measurements of the same variable. That is, it
More informationMONTE CARLO EXPERIMENTS USING GRETL: A REVIEW WITH EXAMPLES
MONTE CARLO EXPERIMENTS USING GRETL: A REVIEW WITH EXAMPLES LEE C. ADKINS Abstract. Monte Carlo simulations are a very powerful way to demonstrate the basic sampling properties of various statistics in
More informationGAMs semiparametric GLMs. Simon Wood Mathematical Sciences, University of Bath, U.K.
GAMs semiparametric GLMs Simon Wood Mathematical Sciences, University of Bath, U.K. Generalized linear models, GLM 1. A GLM models a univariate response, y i as g{e(y i )} = X i β where y i Exponential
More informationSAS Econometrics and Time Series Analysis 1.1 for JMP
SAS Econometrics and Time Series Analysis 1.1 for JMP SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2011. SAS Econometrics and Time Series Analysis
More informationThe Solution to the Factorial Analysis of Variance
The Solution to the Factorial Analysis of Variance As shown in the Excel file, Howell 2, the ANOVA analysis (in the ToolPac) yielded the following table: Anova: TwoFactor With Replication SUMMARYCounting
More informationSTATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany
STATA Tutorial to Accompany Introduction to Econometrics by James H. Stock and Mark W. Watson STATA Tutorial to accompany Stock/Watson Introduction to Econometrics Copyright 2003 Pearson Education Inc.
More informationStandard Errors in OLS Luke Sonnet
Standard Errors in OLS Luke Sonnet Contents VarianceCovariance of ˆβ 1 Standard Estimation (Spherical Errors) 2 Robust Estimation (Heteroskedasticity Constistent Errors) 4 Cluster Robust Estimation 7
More informationMonte Carlo Analysis
Monte Carlo Analysis Andrew Q. Philips* February 7, 27 *Ph.D Candidate, Department of Political Science, Texas A&M University, 2 Allen Building, 4348 TAMU, College Station, TX 778434348. aphilips@pols.tamu.edu.
More informationMissing Data: What Are You Missing?
Missing Data: What Are You Missing? Craig D. Newgard, MD, MPH Jason S. Haukoos, MD, MS Roger J. Lewis, MD, PhD Society for Academic Emergency Medicine Annual Meeting San Francisco, CA May 006 INTRODUCTION
More informationThe biplot command and software development at StataCorp.
Outline The biplot command and software development at StataCorp. June 26, 2009 1 Properties Mathematical Background 2 Biplot now Forthcomming biplot 3 Outline Properties Mathematical Background 1 Properties
More information