I have another issue in relation to keeping variables with a joint condition. I am trying to select banks with particular criteria Total assets greater 40B for example for each quarter. But of cause, Bank A may have >40b in quarter one and quarter two of the same year it does not meets the criteria. However, I will like to keep the bank irrespective of the quarter and year as long as it meets the criteria. I have done the following but unable to link the two conditions. 1) by BANKID generate available =0, replace available=1 if Totalassets >=40B, based on the condition those with zero may at some time have 1; so using keep if available ==1 will not work. can you help me with how to specify the condition of =1 & 0 so it will capture both lines? Simply put, to keep banks with total assets >=40B at any period and remove those <40B all through the years.
Bankid | date | net income | interest expense | Total assets |
102223 | 1991Q1 | 54034 | 235890 | 45000 |
102223 | 1991Q2 | 45000 | 7067 | 45000 |
102223 | 1991Q3 | 54034 | 80004 | 45000 |
102223 | 1991Q4 | 23700 | 345000 | 45000 |
102223 | 1992Q1 | . | 7800 | . |
102223 | 1992Q2 | 120000 | 6000 | . |
102223 | 1993Q2 | 85000 | . | . |
102223 | 1993Q3 | 85000 | . | . |
102223 | 1993Q4 | 85000 | . | . |
102224 | 1994Q1 | 85000 | . | 75000 |
102224 | 1994Q2 | 85000 | . | 75000 |
102224 | 1994Q3 | . | . | 75000 |
102224 | 1994Q4 | . | . | 75000 |
102224 | 1995Q1 | . | . | 68000 |
102224 | 1995Q2 | . | . | 68000 |
102224 | 1995Q3 | . | . | 68000 |
102224 | 1995Q4 | . | . | 68000 |
0 Response to Keep with joint condition
Post a Comment