Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gen xx1=.
- gen xx2=.
- forvalues i = 1/12{
- bys state year month: replace xx1= 1 if month==`i' & no_monthsreport>=`i'
- bys state year month: replace xx2= sum(!missing(xx1))
- bys state year month: egen tot_xx3 =max(xx2)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement