Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. gen xx1=.
  2. gen xx2=.
  3.  
  4. forvalues i = 1/12{
  5. bys state year month: replace xx1= 1 if month==`i' & no_monthsreport>=`i'
  6. bys state year month: replace xx2= sum(!missing(xx1))
  7. bys state year month: egen tot_xx3 =max(xx2)
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement