Bayesian Logistic Regression Modelling via Markov Chain Monte Carlo Algorithm

Similar documents
Ordinal Data Modeling

Advanced Bayesian Models for the Social Sciences. TA: Elizabeth Menninga (University of North Carolina, Chapel Hill)

Advanced Bayesian Models for the Social Sciences

Russian Journal of Agricultural and Socio-Economic Sciences, 3(15)

A Brief Introduction to Bayesian Statistics

Bayesian Inference Bayes Laplace

An Exercise in Bayesian Econometric Analysis Probit and Linear Probability Models

BAYESIAN HYPOTHESIS TESTING WITH SPSS AMOS

Ecological Statistics

The matching effect of intra-class correlation (ICC) on the estimation of contextual effect: A Bayesian approach of multilevel modeling

Bayesian and Classical Approaches to Inference and Model Averaging

Introduction to Bayesian Analysis 1

Data Analysis Using Regression and Multilevel/Hierarchical Models

Exploration of real-time crash likelihood of Powered-Two Wheelers in Greece. Road safety; real-time data; crash likelihood; powered-two-wheelers

Bayesian Modelling on Incidence of Pregnancy among HIV/AIDS Patient Women at Adare Hospital, Hawassa, Ethiopia

Bayesian Estimation of a Meta-analysis model using Gibbs sampler

THE INDIRECT EFFECT IN MULTIPLE MEDIATORS MODEL BY STRUCTURAL EQUATION MODELING ABSTRACT

Response to Comment on Cognitive Science in the field: Does exercising core mathematical concepts improve school readiness?

Combining Risks from Several Tumors Using Markov Chain Monte Carlo

For general queries, contact

Citation for published version (APA): Ebbes, P. (2004). Latent instrumental variables: a new approach to solve for endogeneity s.n.

Detection of Unknown Confounders. by Bayesian Confirmatory Factor Analysis

Score Tests of Normality in Bivariate Probit Models

Exploring the Influence of Particle Filter Parameters on Order Effects in Causal Learning

You must answer question 1.

Georgetown University ECON-616, Fall Macroeconometrics. URL: Office Hours: by appointment

A COMPARISON OF IMPUTATION METHODS FOR MISSING DATA IN A MULTI-CENTER RANDOMIZED CLINICAL TRIAL: THE IMPACT STUDY

Understandable Statistics

Measuring Goodness of Fit for the

Estimation of contraceptive prevalence and unmet need for family planning in Africa and worldwide,

Bayesian Confidence Intervals for Means and Variances of Lognormal and Bivariate Lognormal Distributions

Introductory Statistical Inference with the Likelihood Function

Statistical reports Regression, 2010

Computer Age Statistical Inference. Algorithms, Evidence, and Data Science. BRADLEY EFRON Stanford University, California

How few countries will do? Comparative survey analysis from a Bayesian perspective

Running Head: BAYESIAN MEDIATION WITH MISSING DATA 1. A Bayesian Approach for Estimating Mediation Effects with Missing Data. Craig K.

MS&E 226: Small Data

Midterm Exam ANSWERS Categorical Data Analysis, CHL5407H

Applied Medical. Statistics Using SAS. Geoff Der. Brian S. Everitt. CRC Press. Taylor Si Francis Croup. Taylor & Francis Croup, an informa business

STATISTICS & PROBABILITY

Kelvin Chan Feb 10, 2015

Mediation Analysis With Principal Stratification

Bayesian Mediation Analysis

Multivariate Regression with Small Samples: A Comparison of Estimation Methods W. Holmes Finch Maria E. Hernández Finch Ball State University

Logistic Regression and Bayesian Approaches in Modeling Acceptance of Male Circumcision in Pune, India

S Imputation of Categorical Missing Data: A comparison of Multivariate Normal and. Multinomial Methods. Holmes Finch.

Econometrics II - Time Series Analysis

Testing the Predictability of Consumption Growth: Evidence from China

Individual Differences in Attention During Category Learning

ST440/550: Applied Bayesian Statistics. (10) Frequentist Properties of Bayesian Methods

Bayesian Analysis of Between-Group Differences in Variance Components in Hierarchical Generalized Linear Models

In addition, a working knowledge of Matlab programming language is required to perform well in the course.

WIOLETTA GRZENDA.

Unit 1 Exploring and Understanding Data

Bayesian Logistic Regression Model on Risk Factors of Type 2 Diabetes Mellitus

2.75: 84% 2.5: 80% 2.25: 78% 2: 74% 1.75: 70% 1.5: 66% 1.25: 64% 1.0: 60% 0.5: 50% 0.25: 25% 0: 0%

Practical Bayesian Design and Analysis for Drug and Device Clinical Trials

Today: Binomial response variable with an explanatory variable on an ordinal (rank) scale.

Bayesian Joint Modelling of Longitudinal and Survival Data of HIV/AIDS Patients: A Case Study at Bale Robe General Hospital, Ethiopia

INTRODUCTION TO ECONOMETRICS (EC212)

A Bayesian Measurement Model of Political Support for Endorsement Experiments, with Application to the Militant Groups in Pakistan

Bayesian Model Averaging for Propensity Score Analysis

Applying Bayesian Ordinal Regression to ICAP Maladaptive Behavior Subscales

Bayesian and Frequentist Approaches

DECISION ANALYSIS WITH BAYESIAN NETWORKS

Introduction. Patrick Breheny. January 10. The meaning of probability The Bayesian approach Preview of MCMC methods

Learning from data when all models are wrong

Measurement Error in Nonlinear Models

A Bayesian Nonparametric Model Fit statistic of Item Response Models

Application of Multinomial-Dirichlet Conjugate in MCMC Estimation : A Breast Cancer Study

AB - Bayesian Analysis

Testing for non-response and sample selection bias in contingent valuation: Analysis of a combination phone/mail survey

An Empirical Assessment of Bivariate Methods for Meta-analysis of Test Accuracy

The University of North Carolina at Chapel Hill School of Social Work

Running head: VARIABILITY AS A PREDICTOR 1. Variability as a Predictor: A Bayesian Variability Model for Small Samples and Few.

TRIPODS Workshop: Models & Machine Learning for Causal I. & Decision Making

2014 Modern Modeling Methods (M 3 ) Conference, UCONN

A Latent Mixture Approach to Modeling Zero- Inflated Bivariate Ordinal Data

In this module I provide a few illustrations of options within lavaan for handling various situations.

Small Sample Bayesian Factor Analysis. PhUSE 2014 Paper SP03 Dirk Heerwegh

Multilevel IRT for group-level diagnosis. Chanho Park Daniel M. Bolt. University of Wisconsin-Madison

Introduction to Survival Analysis Procedures (Chapter)

A COMPARISON OF BAYESIAN MCMC AND MARGINAL MAXIMUM LIKELIHOOD METHODS IN ESTIMATING THE ITEM PARAMETERS FOR THE 2PL IRT MODEL

Lecture 21. RNA-seq: Advanced analysis

List of Figures. List of Tables. Preface to the Second Edition. Preface to the First Edition

Method Comparison for Interrater Reliability of an Image Processing Technique in Epilepsy Subjects

Business Statistics Probability

with Stata Bayesian Analysis John Thompson University of Leicester A Stata Press Publication StataCorp LP College Station, Texas

Markov Chain Monte Carlo Approaches to Analysis of Genetic and Environmental Components of Human Developmental Change and G E Interaction

Biostatistics II

MEA DISCUSSION PAPERS

Research and Evaluation Methodology Program, School of Human Development and Organizational Studies in Education, University of Florida

The Demand for Cigarettes in Tanzania and Implications for Tobacco Taxation Policy.

Correlation and regression

BayesRandomForest: An R

12/30/2017. PSY 5102: Advanced Statistics for Psychological and Behavioral Research 2

Introduction to Machine Learning. Katherine Heller Deep Learning Summer School 2018

Bayesian Bi-Cluster Change-Point Model for Exploring Functional Brain Dynamics

LIFE SATISFACTION ANALYSIS FOR RURUAL RESIDENTS IN JIANGSU PROVINCE

Transcription:

Journal of Social and Development Sciences Vol. 4, No. 4, pp. 93-97, Apr 203 (ISSN 222-52) Bayesian Logistic Regression Modelling via Markov Chain Monte Carlo Algorithm Henry De-Graft Acquah University of Cape Coast, Cape Coast, Ghana henrydegraftacquah@yahoo.com Abstract: This paper introduces Bayesian analysis and demonstrates its application to parameter estimation of the logistic regression via Markov Chain Monte Carlo (MCMC) algorithm. The Bayesian logistic regression estimation is compared with the classical logistic regression. Both the classical logistic regression and the Bayesian logistic regression suggest that higher per capita income is associated with free trade of countries. The results also show a reduction of standard errors associated with the coefficients obtained from the Bayesian analysis, thus bringing greater stability to the coefficients. It is concluded that Bayesian Markov Chain Monte Carlo algorithm offers an alternative framework for estimating the logistic regression model. Keywords: Logistic regression, Posterior Distribution, Markov Chain Monte Carlo, Openness of Trade, Bayesian Analysis. Introduction In applied econometrics research, non linear models are essential tools for analysing empirical data. They are used when one has discrete or non linear response. One such important model is the logistic regression model which is used to explore the effect of some covariates, discrete and/ or continuous independent variables on a discrete response. The application of the logistic regression to binary response data is simple to understand, easy to compute and widely used. This classical approach fits the logistic regression by means of an iterative procedure such as the maximum likelihood, and inferences about the model are based on asymptotic theory. In some situations, due to the assumptions of iterative procedures, there may be failure in estimation convergence. Furthermore, the maximum likelihood estimation has significant bias for small samples. These limitations in the maximum likelihood estimations can be addressed by the use of Bayesian logistic regression as an alternative approach. The Bayesian estimation is flexible and does not require compliance with demanding assumptions as suggested in the maximum likelihood estimation or as in classical techniques. The flexibility of the Bayesian methodology is further enhanced by the use of the Markov Chain Monte Carlo (MCMC) based sampling methods. Progress in Markov Chain Monte Carlo (MCMC) methods has made it possible to fit various non linear regression models. Irrespective of these developments, few studies have employed the MCMC based approach to model the logistic regression. The limited application of the MCMC based approach is due to the fact that very little is understood about the concept of Bayesian analysis and its application to the logistic regression via MCMC algorithms. Although some studies have applied the Bayesian logistic regression in other fields, no empirical research has explored the application of the Bayesian logistic regression and compared it to the classical logistic regression using economic data. This study fills the gap by investigating the simple relationship between openness of trade and per capita income using classical and Bayesian logistic regression. The aim of this study is therefore to introduce Bayesian analysis and demonstrates its application to parameter estimation of the logistic regression via Markov Chain Monte Carlo (MCMC) algorithm. Fundamentally, this study presents a comparison of the Bayesian logistic regression with the classical logistic regression. 2. Literature Review Numerous studies have applied the binary logistic regression model to study and analyse the effects of covariates on a categorical response. For example, Acquah (203) applied the logistic regression model to investigate the relationship between openness of a country to trade and its per capita income. Conclusively, Acquah (203) finds that higher per capita income is associated with free trade. Acquah (20) also 93

investigated farmers willingness to pay for climate change policy using logistic regression model. The logistic regression estimation finds age, years of farming experience, farm land owner, farm size and other income generating activity as significant predictors of the probability to pay for climate change policy. Han, Yang, Wang and Xu (200) estimated publics willingness to pay (WTP) for environment conservation and analyzed factors influencing WTP at Kanas Nature Reserve, Xinjiang, China. Logistic regression analysis was employed to compare the characteristics of those who were and were not willing to pay. Chi-square tests were administered to identify the relationships between various explanatory factors. In effect, logistic regression models have played important role in various studies. Due to the non-linearity of the logistic model, inference is made by maximum likelihood. But the maximum likelihood estimation has limitations which can be resolved by adoption of the more flexible Bayesian approach. Subsequently, some studies have estimated the Bayesian logistic regression and compared it with the classical logistic regression in other fields. For example, Mila and Michailides (2006) investigated prediction of panicle and shoot blight severity of Pistachio in California using Bayesian and classical logistic regression. They noted that the Bayesian methods gave more consistent results when used to update parameter estimates with new information and elded predictions not statistically different from observed disease severity in more cases than the non-bayesian analysis. Gordovil, Guardia, Pero & Fuente (200) presented Bayesian estimation as an alternative to classical procedures in logistic regression estimation in the study of Attention Deficit Hyperactivity Disorder (ADHD) in a Mexican sample. An important data from their comparison of the classical and Bayesian estimation is the lower standard errors of the estimated coefficients in the Bayesian logistic regression. They note that this decrease is related to high coefficient s values stability. Departing from previous study, I apply the Bayesian and classical logistic regression methodology to economic data. 3. Methodology The methodology describes Bayesian inference with emphasis on the prior distribution, likelihood function and posterior distribution for the Bayesian logistic regression. The Markov Chain Monte Carlo algorithm is also presented with emphasis on the Metropolis Hastings algorithm. Data used in the study is also described. Bayesian Logistic Regression: In the Bayesian framework, there are three key components associated with parameter estimation: the prior distribution, the likelihood function, and the posterior distribution. These three components are formally combined by Bayes rule as: Posterior distribution = Prior distribution x likelihood function () In simple terms, equation states that the information contained in the sample (reflected in the likelihood function) is combined with information from other sources (summarized by the prior distribution) to obtain the posterior distribution. The posterior distribution contains all the available knowledge about the parameters in the model. Gill (2002) details the discussion on the concept of the Bayesian analysis. Likelihood Function: The likelihood function used by Bayesians draws from frequentist inference. Given the probability of success (which in logistic regression varies from one subject to another, depending on their th covariates), the likelihood contribution from the i subject is binomial: likelihood x x ( ) i ( i) ( ( i)) (2) Where ( x i ) represents the probability of the event for subject i who has covariate vector x i, and y i indicates the presence,, or absence y 0 of the event for that subject. From the classical logistic regression, ( x i ) is given by: 94

e ( x) e 0 X... pxp 0 X... pxp (3) In effect, the likelihood contribution from the th i subject is likelihood 0 X... i i p X y ip 0 Xi... p Xip e e e e i 0 X i... p Xip 0 X i... p Xip ( ) (4) Given that individual subjects are assumed independent from each other, the likelihood function over a data set of n subjects is then likelihood ( ) n Xi p Xip Xi p X ip e e 0 X i... p X ip 0 X i... p X (5) ip i e e Prior Distribution: The set of unknown parameters are made up of 0,,..., p. Two types of prior distribution namely, informative and non-informative prior distributions can be used. Informative prior distributions are applied if something is known about the likely values of the unknown parameters. On the other hand, non-informative priors are employed if either little is known about the coefficient values or if one wishes to ensure that prior information plays very little role in the analysis. That is, the data is allowed to remain influential in the analysis. For the purpose of this study, we assume a multivariate Normal prior on. (6) 2 j ~ N( j, j ) The most common choice for is zero, and is usually chosen to be large enough to be considered as noninformative. In this case is set to 000. Posterior Distribution via Bayes Theorem: The posterior distribution is derived by multiplng the prior distribution over all parameters by the full likelihood function, so that the posterior is given by: ( ) n Xi p Xip Xi p X ip e e posterior 0 X i... p X ip 0 X i... p X ip i e e 2 p j j (7) exp j0 2 2 j j The latter part of the above expression can be recognized as normal distribution for the parameters. The above expression has no closed form expression. In this context, the Metropolis sampler is used to solve and approximate the properties of the marginal posterior distributions for each parameter. In effect, estimation of the posterior distributions of the parameters of the Bayesian logistic regression was carried out using a random walk Metropolis algorithm. Metropolis-Hastings Algorithm: Metropolis-Hasting algorithm is an iterative algorithm that produces a Markov chain and permits empirical estimation of posterior distributions. The Metropolis-Hastings algorithm (MH) generates samples from a probability distribution using full joint density function. A basic MH algorithm consists of the following steps: j 0 S. Set. Establish starting values S for the parameter: j. The starting values can be obtained via maximum likelihood estimation. 95

c 2. Draw a candidate`` parameter, from a proposal density,`` (.). The simulated value is considered a candidate because it is not automatically accepted as a draw from the distribution of interest. It must be evaluated for acceptance. c j c f ( ) ( ) 3. Compute the ratio R. (8) j c j f ( ) ( ) 4. Compare R with a U(0,) random draw u. If R u 5. Set j j 96, then set j c and return to step 2 until enough draws are obtained. A detail discussion on the Metropolis Algorithm is presented in Gill (2002).. Otherwise, set j j. Data: International data for 992 on the openness of trade and GDP per Capita for 20 countries was obtained from the World Bank Development Indicators. The dependent variable (openness of trade) takes the value of one for free trade and 0 otherwise whilst the independent variable of study is the GDP per Capita. 4. Results and Discussion A Bayesian logistic regression analysis was employed to analyze the openness of a country (Y) and its per capita income in dollars (X). Table: Classical Logit and Posterior Moments Classical Logit Posterior Variable Mean Std. Error Mean Std. Error Intercept -3.605.6800-3.508.6080 GDP per capita 0.002 0.0009 0.002 0.0005 The model specification with openness of trade as the dependent variable and per capita income as the covariate was estimated for both the Bayesian and classical logistic regression. The model estimation result reveals a positive relationship between openness of trade and countries per capita income. In effect, both the classical logistic regression and the Bayesian logistic regression suggest that higher per capita income is associated with free trade of countries. The posterior moments in the Bayesian logistic estimation was obtained after a burn in period of 50,000 iterations and a follow up period of 250,000, storing every 20th iteration. Using the posterior mean as a point estimate, Table compares the ordinary least squares estimates with the MCMC output. The estimated means and standard errors appear quite close with minimum difference between the classical logit estimate and MCMC output or posterior summary. Noticeably, the results show a reduction of standard errors associated with the coefficients obtained from the Bayesian analysis, thus bringing greater stability to the coefficients. Similarly, in a comparison of the classical and Bayesian estimation, Gordovil-Merino, Guardia-Olmos, Pero-Cebollero and Fuente-Solanas (200) find lower standard errors of the estimated coefficients in the Bayesian logistic regression. They observed that this decrease is related to high coefficient s values stability. The posterior distributions of the per capita income and its corresponding quantiles given in Table 2 indicates that this parameter is mostly around 0.002 with a 2.5% probability taking a value below 0.0005 or a value above 0.0024. Graphically, all the mass of the posterior distributions of the per capita income are in the positive as illustrated in the plots of their posterior distributions in figure in appendix I. These observations lead to the conclusion that higher per capita income is associated with free trade of countries. Table 2: Posterior Distribution Summaries of parameters from MCMC Logistic regression Posterior Standard Quantiles Of Posterior Distributions Variables Means Error 2.5% 25% 75% 97.5% Intercept -3.508.6080-5.787-4.303-2.705 -.33 GDP per 0.002 0.0005 0.0006 0.003 0.002 0.0024 capita

0.0000 0.005 0 200 400 600-8 -6-4 -2 0 0.00 0.5 0.30 5. Conclusion The classical estimation of the logistic regression model has some important limitations which can be resolved with possible alternative methods. The goal of this study was therefore to introduce Bayesian analysis as an alternative approach and demonstrate its application to parameter estimation of the logistic regression models for comparative analysis with the classical estimation. This study finds that the Bayesian Markov Chain Monte Carlo algorithm offers an alternative framework for estimating the logistic regression model. Both the classical logistic regression and the Bayesian logistic regression suggest that higher per capita income is associated with free trade of countries. A comparison of the classical and Bayesian approach to modelling the logistic regression reveals lower standard errors of the estimated coefficients in the Bayesian approach for the logistic regression model. Thus the Bayesian logistic regression is more stable. Importantly, the alternative methods lead to similar conclusions. Fundamentally, this study has demonstrated the application of the Bayesian MCMC algorithm to logistic regression estimation. Future research will investigate the Bayesian estimation of the multinomial logistic regression. References Acquah, H. D. (203). An Introduction to Quantitative Methods. Shaker Verlag. Acquah, H. D. (20). Farmers Perception and Adaptation to Climate Change: A Willingness to pay analysis. Journal of Sustainable Development in Africa, 3(5), 50-6. Gill, J. (2002). Bayesian Methods: A Social and Behavioral Science Approach. Boca Raton: Chapman and Hall/CRC. Gordovil, M., Guardia, O., Pero, C. & Fuente, S. (200). Classical and Bayesian Estimation in the Logistic Regression Model Applied To Diagnosis of Child Attention Deficit Hyperactivity Disorder. Psychological Reports, 06 (2), -5. Han, F., Yang, Z., Wang, H. & Xu, X. (200). Estimating Willingness to Pay for Environment Conservation: A Contingent Valuation Study of Kanas Nature Reserve, Xinjiang, China. Environmental Monitoring Assessment, 80(-4), 45-459. Mila, A. L. & Michailides, T. J. (2006). Use of Bayesian Methods to Improve Prediction of Panicle and Shoot Blight Severity of Pistachio in Califonia. Phytopathology, 96, 42-47. Appendix Trace of (Intercept) Density of (Intercept) 50000 50000 250000 Iterations -8-6 -4-2 0 N = 2500 Bandwidth = 0.865 Trace of GDP Density of GDP 50000 50000 250000 Iterations 0.0000 0.000 0.0020 0.0030 N = 2500 Bandwidth = 8.26e-05 97