intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Lecture Advanced Econometrics (Part II) - Chapter 6: Models for count data

Chia sẻ: Tran Nghe | Ngày: | Loại File: PDF | Số trang:7

81
lượt xem
3
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Lecture "Advanced Econometrics (Part II) - Chapter 6: Models for count data" presentation of content: Poisson regression model, goodness of fit, overdispersion, negative binomial regression model, too many zeros data.

Chủ đề:
Lưu

Nội dung Text: Lecture Advanced Econometrics (Part II) - Chapter 6: Models for count data

  1. Advanced Econometrics - Part II Chapter 6: Models for count data Chapter 6 MODELS FOR COUNT DATA A count variable is a variable that takes on non-negative integer values: • There is no natural upper bound • The outcome will be zero for at least some members of the population Y is count variable, X is a vector of explanatory variables. It is better to model E (Y X ) directly and to choose functional forms that ensure possibility for any value of X and any parameter value. When Y has no upper bound, the most popular of these is the exponential function E (Y X ) = exp( Xβ ) I. POISSON REGRESSION MODEL: • The basic Poisson regression model assumes that Y given X = ( X 1 , X 2 ,..., X k ) has a Poisson distribution. • The Poisson regression model specifies that each Yi is drawn from a Poisson distribution with parameter λi , which is related to the regressor X i . e − λi λYii Pr ob(Y = Yi X i ) = (Yi ! = 1 × 2 × ... × Yi ) Yi ! λi and X i are related as: ln λi = X i β or λi = e X β i The expected number of events is given by: E[Yi X i ] = Var[Yi X i ] = λi = e X i β (Poisson distribution properties) ∂E[Yi X i ] So: = λi β ∂X i • With the parameter estimate in hand, this vector can be computed using any data vector desired. • In principle, the Poisson model is simply a non-linear regression, but it is easier to estimate the parameters with maximum likelihood techniques. The log-likelihood function is: Nam T. Hoang UNE Business School 1 University of New England
  2. Advanced Econometrics - Part II Chapter 6: Models for count data n n ln ∑ [-λi + Yi ( X i β ) − ln(Yi !)] = L == ∑ [-eXi β + Y ( X i β ) − ln(Yi !)] =i 1 =i 1 The likelihood equations are: ∂ ln L n = ∑ (Yi − λi ) X i = 0 ∂β i =1 n = ∑ (Yi − e X i β ) X i = 0 i =1 The Hessian is: ∂ 2 ln L n ∂β∂β ' = − ∑ i =1 λi X i X i' The Hessian is negative definite for all X and β . Newton-Raphson method is a simple  n  algorithm for this model and will converge rapidly. At convergence ∑ λˆi X i X i'  is an  i=1  estimator of the asymptotic covariance matrix for β . λˆi = exp( X i βˆ ) . λˆi is the prediction for observation i → λˆi = exp( X i βˆ ) estimated variance of λˆi will be λˆi2 X i'VX i , where V is the estimated asymptotic covariance matrix for βˆ , −1 n  V = ∑ λˆi X i X i'   i =1  II. GOODNESS OF FIT: 2  Y − λˆ  n ∑  i i i =1  λˆi  R2 = 1 −  2 n  Yi − Y  ∑  i =1  Y   This measure compares the fit of the model with a model of only one constant term. Note: Yi is integer, the prediction λˆi = e X i β is continuous. ˆ III. OVERDISPERSION: Poisson model has been criticized because of its implicit assumption that the variance of Yi equals it's mean. Many extensions of Poisson model that relax this assumption have been proposed. Test for over dispersion: Nam T. Hoang UNE Business School 2 University of New England
  3. Advanced Econometrics - Part II Chapter 6: Models for count data H o : Var[Yi ] = E[Yi ] H A : Var[Yi ] = E[Yi ] + αg ( E[Yi ]) (Yi − λˆi ) 2 − Yi Regress: Z i = λˆi 2 Most of count model with overdispersion (variance exceeds the mean) specify overdispersion to be the form: Var[Yi X i ] = E[Yi ] + αg ( E[Yi ]) Where α is unknown parameter, g(.) is a known function most commonly g ( µ ) = µ 2 , or g ( µ ) = µ . Test: Ho : α = 0 H A : α ≠ 0 (or α > 0) Can be carried out by running the regression: (Yi − λˆi ) 2 − Yi g (λˆi ) =α + ui λˆ i λˆ i Where ui is an error term. The reported t-statistic for α is asymptotically normal under H o : α = 0 (Cameron & Trivedi 1990). This test can be also used for underdispersion α < 0 , in which case the conditional variance is less than the conditional mean. Conditional mean & variance µi of the Poisson distribution, suppose now that the parameter is random rather than being a completely deterministic function of regressor Xi . Let: µi = λi ui → ln µi = ln λi + ln ui = X i β + ε i Xiβ εi  This distribution of Yi conditioned on X i and ui (ε i ) remain Poisson with conditional mean and variance µi : e − λiui (λi ui )Yi f (Yi X i , ui ) = Yi ! Prob(Y Y= = i X i , ui ) ∞ e − λiui (λi ui )Yi → Pr ob(Y = Yi X i ) = ∫ g (ui )dui 0 Yi ! Nam T. Hoang UNE Business School 3 University of New England
  4. Advanced Econometrics - Part II Chapter 6: Models for count data g (ui ) is density function of ui The choice of g (ui ) defines the unconditional distribution. For mathematical convenience, a gamma distribution is usually assumed for ui = (ε ε i ) . Assume E (ui ) = 1 (for E ( µi λi ) = λi ). θ θ −θu θ −1 → g (ui ) = e ui i Γ(θ ) This density function for Yi is then ∞ e − λi ui (λi ui )Yi θ θ uiθ −1e −θ ui Prob( = Y Y= i Xi ) f (Y= i Xi ) ∫ 0 Yi ! Γ(θ ) dui Γ(θ + Yi ) λi r Yi (1 − ri )θ where ri = Γ(Yi + 1)Γ(θ ) λi + θ IV. NEGATIVE BINOMIAL REGRESSION MODEL: • The assumed equality of the conditional mean and variance is the major shortenings of the Poisson model. • We generalize the Poisson model by introducing an individual unobserved effect into the conditional mean. • Suppose now that the conditional mean & variance µi of the Poisson distribution is random rather than being completely deterministic function of X (Because of unobserved heterogeneity different obs may have different µi . λi is an parameter of Poisson but part of this difference is due to a random (unobserved) component ui not only because of X i µi is just a parameter of distribution we want E ( µi ) = e X i β we don’t want µ i = e X i β Let: µi = λi ui Where λi = e X i β → ln µi = ln λi + ln ui = X i β + ε i The disturbance ε i reflects cross-sectional heterogeneity that normally characterizes micro-economic data.  The distribution of Yi conditional on X i and ui remain Poisson with conditional mean & variance µi : e − λi ui (λi ui )Yi Prob(Y Y= = i X i , ui ) = f (Yi X i , ui ) Yi ! Nam T. Hoang UNE Business School 4 University of New England
  5. Advanced Econometrics - Part II Chapter 6: Models for count data The unconditional distribution Pr ob(Y = Yi X i ) is the expected value over ui of f (Yi X i , ui ) . ∞ e − λi ui (λi ui )Yi Prob( = Y Y= i Xi ) ∫ 0 Yi ! g (ui )dui g (ui ) is a density function of ui  problem: the choice of g (ui ) ? For mathematical convenience, a gamma distribution is usually assumed for ui . Assume E (ui ) = 1 (for E ( µi λi ) = λi ). θ θ −θu θ −1 → g (ui ) = e ui i Γ(θ ) Then: ∞ e − λi ui (λi ui )Yi θ θ uiθ −1e −θ ui Prob( = Y Y= i Xi ) ∫0 Yi ! Γ(θ ) dui ∞ θ θ λYi i Γ(Y + 1)Γ(θ ) ∫ −( λi +θ ) ui = e uiθ +Yi −1dui i 0 θ θ λYi Γ(Yi + θ ) i = Γ(Yi + 1)Γ(θ )(λi + θ )θ +Y i Γ(Yi + θ ) = riYi (1 − ri )θi Γ(Yi + 1)Γ(θ ) λi where ri = λi + θ This is the form of the negative binomial distribution  the distribution has conditional  1  mean λi and conditional variance λi 1 +  λi   θ   → E [Yi X i ] = λi = e X i β  1  Var [Yi X i ] = λi = λi 1 +  λi   θ   ∞ ∫ t e dt P −1 − t Note: gamma function: Γ( P ) = 0 We have: Γ( P) = ( P − 1)Γ( P − 1) → Γ( P) = ( P − 1)! if P is a integer number gamma function is a generalization of the factor function for non-integer values. Nam T. Hoang UNE Business School 5 University of New England
  6. Advanced Econometrics - Part II Chapter 6: Models for count data  which is the form of the negative binomial distribution. E (Yi X i ) = λi  1  Var (Yi X i ) = λi 1 +  λi   θ   λP Note: gamma distribution: f ( x) = e −λx x P−1 Γ( P) If E ( x) = 1 → λ = P x ≥ 0, λ > 0, P > 0  because E ( x) = P P λ V ( x) = λ2 E ( µi λi ) = λi if E (ui ) = 1  the interpretation as in the Poisson model E (Yi X i ) = λi 1 V (Yi X i ) = λi (1 +  λi ) θ  This negative binomial model can be estimated by maximum likelihood without much difficulty. A test of a the Poisson distribution is often carried out of testing the hypothesis α = 1θ = 0 using the Wald test. E (Yi X i ) = λi = e X i β  1  Var (Yi X i ) = λi 1 +  λi   θ    λ  The ratio of the variance to the mean now is 1 + i  > 1 , different for different  θ  observations. The log-likelihood: n L = ln  = ∑ ln Γ(Y + θ ) − lnΓ(Y + 1) − ln Γ(θ ) + Y ln r + θ ln(1 − r ) i =1 i i i i i λi ri = ; λi = e X i β λi + θ  can be estimated by MLE easily. Application: X it = (1, Age, Education, Income, Kids, Insurance) Doctor visits: count data models Nam T. Hoang UNE Business School 6 University of New England
  7. Advanced Econometrics - Part II Chapter 6: Models for count data V. TOO MANY ZEROS DATA: In many data sets, there is large number of zero counts. Assuming Poisson or negative binomial is then a misspecification. Alternative is the zero-Inflated Poisson model. • A binary probability model determines whether a zero or a nonzero outcome occurs then. • A truncated Poisson distribution describes the positive outcomes. Prob( = X i ) e −θ Yi 0= (1 − e −θ )e − λi λi j Prob( = Yi j= Xi ) j !(1 − e − λi ) Prob( = Wi ) F (Wi , γ ) Z i 1= e − λi λi j Prob(Y= i j X i , Z= i 1)= j! E (Yi X i ) = F × 0 + (1 − F ) × E[Y * X i , Yi* > 0 = λi = (1 − F ) 1 − e −λi Where Y * denote the outcome of the Poisson process in the regime 2. Prob(Yi =0 X i ) =Prob(regime 1) + Prob(Y =0 X i , regime 2) * Prob(regime 2) Prob( = Yi j= X i ) Prob( = Yi j X i , regime 2) * Prob(regime 2) Nam T. Hoang UNE Business School 7 University of New England
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2