Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Productivity Decomposition in Stata

    Dear Statalist Members,

    I am trying to do a decomposition analysis proposed by Foster-Haltiwanger-Krizan (2001)

    I am struggling with the Between and Covariance parts of the decomposition analysis

    Code:
    ***Foster, Haltiwanger, and Krizan (2001)**********
    
    
    
    gen wvar=employment
    
    gen pvar=lp /// labour productivity
    
    
    *****firm level
    egen s_weight=sum(wvar), by(year)
    gen weight=wvar/s_weight
    
    gen product=pvar*weight
    
    egen Phi_t=sum(product), by(year)
    
    
    
    *******Industry level*****
    
    egen sj_weight=sum(wvar), by(year isic2)
    gen weight_j=wvar/sj_weight
    
    gen product_j=pvar*weight_j
    
    egen Phj_t=sum(product_j), by(year isic2)
    
    
    gen i_stayers=0
    replace i_stayers=1 if i_within!=.
    egen stayers_i= total(i_stayers), by(year isic2)
    
    
    ******Between
    
    gen i_between_w=(weight-l1.weight)*(l1.pvar-l1.Phj_t) 
    
    gen i_between_a=(weight_j-l1.weight_j)*(l1.Phj_t-l1.Phi_t)
    
    
    egen bw= total(i_between_w), by(year) 
    
    egen ba= total(i_between_a), by(year)
    
    gen between= bw + ba
    
    
    ****Covariance
    
    gen i_covariance_w=(weight-l1.weight)*[(l1.pvar-Phj_t)-(l1.pvar-l1.Phj_t)] 
     
    gen i_covariance_a=(weight_j-l1.weight_j)*(Phj_t-l1.Phj_t)*stayers_i
    
    egen cw= total(i_covariance_w), by(year)
    
    egen ca= total(i_covariance_a), by(year)
    
    egen covariance= cw + ca


    I have attached the definition of the FHK (2001), for reference. Please help in how i can code it in Stata. My code doesn't seem to add up.

    Best,
    Bridget




    Attached Files

  • #2
    I also want to know how to use Stata to calculate the proposed decomposition analysis by Foster Haliwanger Krizan (2001)

    Comment

    Working...
    X