Logistic regression (continued)

Similar documents
The number of observed cases The number of parameters. ith case of the dichotomous dependent variable. the ith case of the jth parameter

UNIVERSITY OF OSLO DEPARTMENT OF ECONOMICS

Chapter 14 Logistic Regression Models

9.1 Introduction to the probit and logit models

Lecture Notes Types of economic variables

å 1 13 Practice Final Examination Solutions - = CS109 Dec 5, 2018

Special Instructions / Useful Data

Bayes (Naïve or not) Classifiers: Generative Approach

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

UNIVERSITY OF OSLO DEPARTMENT OF ECONOMICS

Functions of Random Variables

Chapter 13, Part A Analysis of Variance and Experimental Design. Introduction to Analysis of Variance. Introduction to Analysis of Variance

ECONOMETRIC THEORY. MODULE VIII Lecture - 26 Heteroskedasticity

STA302/1001-Fall 2008 Midterm Test October 21, 2008

Chapter 3 Sampling For Proportions and Percentages

Qualifying Exam Statistical Theory Problem Solutions August 2005

Lecture 7. Confidence Intervals and Hypothesis Tests in the Simple CLR Model

Bounds on the expected entropy and KL-divergence of sampled multinomial distributions. Brandon C. Roy

Multivariate Transformation of Variables and Maximum Likelihood Estimation

LINEAR REGRESSION ANALYSIS

Lecture Notes 2. The ability to manipulate matrices is critical in economics.

X ε ) = 0, or equivalently, lim

Chapter 4 Multiple Random Variables

Example: Multiple linear regression. Least squares regression. Repetition: Simple linear regression. Tron Anders Moger

CHAPTER VI Statistical Analysis of Experimental Data

THE ROYAL STATISTICAL SOCIETY 2016 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE MODULE 5

STK4011 and STK9011 Autumn 2016

Point Estimation: definition of estimators

Multiple Regression. More than 2 variables! Grade on Final. Multiple Regression 11/21/2012. Exam 2 Grades. Exam 2 Re-grades

Lecture Note to Rice Chapter 8

{ }{ ( )} (, ) = ( ) ( ) ( ) Chapter 14 Exercises in Sampling Theory. Exercise 1 (Simple random sampling): Solution:

Ordinary Least Squares Regression. Simple Regression. Algebra and Assumptions.

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand DIS 10b

1. The weight of six Golden Retrievers is 66, 61, 70, 67, 92 and 66 pounds. The weight of six Labrador Retrievers is 54, 60, 72, 78, 84 and 67.

Simple Linear Regression - Scalar Form

Lecture 3 Probability review (cont d)

Likelihood Ratio, Wald, and Lagrange Multiplier (Score) Tests. Soccer Goals in European Premier Leagues

Continuous Distributions

THE ROYAL STATISTICAL SOCIETY GRADUATE DIPLOMA

b. There appears to be a positive relationship between X and Y; that is, as X increases, so does Y.

Summary of the lecture in Biostatistics

TESTS BASED ON MAXIMUM LIKELIHOOD

Chapter 5 Properties of a Random Sample

ε. Therefore, the estimate

ESS Line Fitting

Wu-Hausman Test: But if X and ε are independent, βˆ. ECON 324 Page 1

UNIT 2 SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS

2SLS Estimates ECON In this case, begin with the assumption that E[ i

Maximum Likelihood Estimation

STK3100 and STK4100 Autumn 2018

STK3100 and STK4100 Autumn 2017

CIS 800/002 The Algorithmic Foundations of Data Privacy October 13, Lecture 9. Database Update Algorithms: Multiplicative Weights

ENGI 4421 Joint Probability Distributions Page Joint Probability Distributions [Navidi sections 2.5 and 2.6; Devore sections

Lecture Notes Forecasting the process of estimating or predicting unknown situations

ECON 5360 Class Notes GMM

Mean is only appropriate for interval or ratio scales, not ordinal or nominal.

Lecture 3. Sampling, sampling distributions, and parameter estimation

ENGI 3423 Simple Linear Regression Page 12-01

Simple Linear Regression

Chapter 4 (Part 1): Non-Parametric Classification (Sections ) Pattern Classification 4.3) Announcements

Lecture 8: Linear Regression

Statistics: Unlocking the Power of Data Lock 5

2.28 The Wall Street Journal is probably referring to the average number of cubes used per glass measured for some population that they have chosen.

12.2 Estimating Model parameters Assumptions: ox and y are related according to the simple linear regression model

Third handout: On the Gini Index

2006 Jamie Trahan, Autar Kaw, Kevin Martin University of South Florida United States of America

Probability and. Lecture 13: and Correlation

Answer key to problem set # 2 ECON 342 J. Marcelo Ochoa Spring, 2009

CLASS NOTES. for. PBAF 528: Quantitative Methods II SPRING Instructor: Jean Swanson. Daniel J. Evans School of Public Affairs

L(θ X) s 0 (1 θ 0) m s. (s/m) s (1 s/m) m s

Simulation Output Analysis

STATISTICAL PROPERTIES OF LEAST SQUARES ESTIMATORS. x, where. = y - ˆ " 1

: At least two means differ SST

Random Variables and Probability Distributions

ECON 482 / WH Hong The Simple Regression Model 1. Definition of the Simple Regression Model

Estimation of Stress- Strength Reliability model using finite mixture of exponential distributions

Lecture 2 - What are component and system reliability and how it can be improved?

Feature Selection: Part 2. 1 Greedy Algorithms (continued from the last lecture)

5 Short Proofs of Simplified Stirling s Approximation

1 Solution to Problem 6.40

CHAPTER 4 RADICAL EXPRESSIONS

Econometric Methods. Review of Estimation

Module 7: Probability and Statistics

Introduction to local (nonparametric) density estimation. methods

Part I: Background on the Binomial Distribution

Lecture 2: Linear Least Squares Regression

Median as a Weighted Arithmetic Mean of All Sample Observations

ENGI 4421 Propagation of Error Page 8-01

STATISTICAL INFERENCE

Chapter 11 The Analysis of Variance

Comparing Different Estimators of three Parameters for Transmuted Weibull Distribution

Statistics MINITAB - Lab 5

PTAS for Bin-Packing

Statistics Descriptive and Inferential Statistics. Instructor: Daisuke Nagakura

STA 108 Applied Linear Models: Regression Analysis Spring Solution for Homework #1

We have already referred to a certain reaction, which takes place at high temperature after rich combustion.

NATIONAL SENIOR CERTIFICATE GRADE 11

THE ROYAL STATISTICAL SOCIETY 2010 EXAMINATIONS SOLUTIONS GRADUATE DIPLOMA MODULE 2 STATISTICAL INFERENCE

G S Power Flow Solution

22 Nonparametric Methods.

Transcription:

STAT562 page 138 Logstc regresso (cotued) Suppose we ow cosder more complex models to descrbe the relatoshp betwee a categorcal respose varable (Y) that takes o two (2) possble outcomes ad a set of p explaatory varables where the explaatory varables are a mxture of cotuous ad dscrete varables. For the th observato where 1,...,, let x be a vector that represets the values the explaatory varables assume...e. Let Y x 1,x,x 2,...,x p 1 f the observato has the respose of terest otherwse Lke before we wrte that PY 1 x ad the vector of parameters s, 1,..., p We model the probablty of success usg a multple logstc regresso model volvg the p explaatory varables, where x e 1 1 x 2 x 2... px p 1e 1 1 x 2 x 2... px p e x 1e x Equvaletly we ca wrte the logt or log odds as x log logtx 1 x 2 x 2... p x p 1x x To derve maxmum lkelhood estmates(m.l.e. s) for ths multple logstc regresso model, we frst cosder the lkelhood of the data whch s

STAT562 page 139 y 1 1y ad use the fact that x e 1 1 x 2 x 2... px p 1e 1 1 x 2 x 2... px p e x 1e x We the wrte the log lkelhood of the data as L y log 1y log1 the maxmum lkelhood equatos are as follows: L y L j x j y x j, for j 1,...,p We eed to get a estmate for ; we employ the Newto-Raphso algorthm to solve these equatos. We ca wrte the vector of frst partal dervatves as: q L, L 1,..., L p y, x y x,..., x p y x p p ad the matrx of secod partal dervatves as:

STAT562 page 14 H 2 1 1 1 2 p 1 p p 1 p p 2 so that we have 1 x 1 x p 1 x 1 x 2 1 x x p 1 H x p 1 x x p 1 x 2 p 1 (RECALL: The matrx H s called the formato matrx. ) To estmate we beg wth a tal guess, say ad the perform a teratve process. At the t th step of ths process we obta estmate t1 usg t1 t H t 1 q t where q t ad H t are equvalet to vector q ad matrx H evaluated at t, the t th guess for. If the algorthm coverges at terato t T, the T s the M.L.E. for ; we ca the use t to determe estmates for x usg x e 1 x 2 x 2... px p 1e 1 x 2 x 2... px p e x 1e x NOTE:The egatve of the verse of the estmated formato matrx,.e. H 1, whe evaluated at, s the estmated asymptotc covarace matrx. for the estmated parameters.

STAT562 page 141 Example. The data o 189 brths were collected at Baystate Medcal Ceter, Sprgfeld, Mass. durg 1986. The dataset cotas a dcator of low fat brth weght as a respose ad several rsk factors assocated wth low brth weght. The actual brth weght s also cluded the dataset. Data descrpto: The dataset cossts of the followg 1 varables: low: dcator of brth weght less tha 2.5kg age: mother s age years lwt: mother s weght pouds at last mestrual perod race: mother s race ( whte, black, other ) smoke: smokg status durg pregacy ht: hstory of hyperteso u: presece of utere rrtablty ftv: umber of physca vsts durg the frst trmester ptl: umber of prevous premature labours bwt: brth weght grams A tal study was coducted order to detfy some of the rsk factors assocated wth gvg brth to a low weght baby (a baby weghg less tha 25 grams). Four varables whch were thought to be of mportace were age ad weght of the subject at her last mestrual perod, race, ad the umber of physca vsts durg the frst trmester of pregacy. I the sample of 189 brths, t was dscovered that 59 of these resulted a low brth weght baby. A detaled explaato of the varables ad a porto of the data are as follows: Varable Abbrevato LOW AGE LWT RACE FTV Let Descrpto Low Brth Weght (1 f brth weght less tha 25 grams; otherwse Age of the Mother Years Weght Pouds at the Last Mestrual Perod Whte1;Black2;Other3 Number of Physca Vsts Durg the Frst Trmester LOW AGE LWT RACE FTV 19 182 2 33 155 3 3 2 15 1 1 21 18 1 2 1 21 13 1 3

STAT562 page 142 Y 1 f the th mother gves brth to a low brth weght baby otherwse where X Age of the th mother X 2 Weght of the th mother at the last mestrual perod X 3 1 f the th mother s black; otherwse X 4 1 f the th mother s of a race other tha whte or black; otherwse X 5 Number of physca vsts by the th mother durg the frst trmerster SAS code: data brthwt; fle :/215-16/STAT562/data/wleybrth.txt ; put d low age lwt race smoke ptl ht u ftv bwt; f race2 the raced11; else raced1; f race3 the raced21; else raced2; proc logstc descedg; model lowage lwt raced1 raced2 ftv / covb; ru; From the SAS output, the maxmum lkelhood estmates are: 1.295, 1.24, 2.14, 3 1.4, 4.433,ad 5.49. Wth these values we ca wrte the estmated model for : e 1.295.24x.14x 2 1.4x 3.433x 4.49x 5 1e 1.295.24x.14x 2 1.4x 3.433x 4.49x 5 To determe the overall ft of the model, we eed to test the hypothess H o : 1 2 3 4 5 versus H a : At least oe H s ot zero We ca test ths hypothess usg a lkelhood rato Ch-square statstc. The LRT requres us to maxmze the lkelhood uder H o (.e. wthout all the varables the model ) ad also uder H o H a (.e. wth all the varables cluded ) ad to form, the rato of the frst of these to the secod of these. The we compute

STAT562 page 143 G 2 2 log whch s the test statstc that s asymptotcally dstrbuted as Ch-squared. The lkelhood wth all explaatory varables the model (.e.uder H o H a ) s y 1 1y ad s maxmzed for e 1.295.24x.14x 2 1.4x 3.433x 4.49x 5 1e 1.295.24x.14x 2 1.4x 3.433x 4.49x 5 Computg ths for our data, the maxmzed lkelhood wth all explaatory varables the model (.e.uder H o H a ) s y 1 1y 4.67x1 49 Now we eed to cosder the maxmzed lkelhood wthout all the explaatory varables the model.(.e. uder H o ) The sample lkelhood ca aga be wrtte as L y 1 1y but ow x e 1e Thus the log lkelhood ths case becomes but ow recall y log 1y log1 e 1e To maxmze L L, we ow oly requre a maxmum lkelhood estmator for. obta ths we compute the frst partal dervatve of L w.r.t. ad equate t to zero: Usg L y To

STAT562 page 144 e 1e we fd ad hece log y y e 1e y For our example, 59.312. Usg ths value, the maxmzed lkelhood wth all the 189 explaatory varables removed from our model yelds y 1 1y 59 189 59 1.1x1 51 1 59 189 13 Formg 1.1x151 4.67x1 49 we the obta or G 2 2 log 2 log 1.1x151 4.67x1 49 G 2 2log1.1x1 51 log4.67x1 49 2117.34 111.29 234.672 222.573 12.99 Now G 2 follows a Ch-square dstrbuto wth df 5 (.e. the umber of parameters dfferet betwee the model uder H ad uder H a ). The p-value assocated wth ths value of the test statstc (.e. PG 2 12.99 s approxmately.335. Ths s farly strog evdece that the ull hypothess ca be rejected (.e. we caot elmate all 5 explaatory varables) ad therefore suggests that there s evdece that the model wth the 5 explaatory varables fts the data.