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. For instance; in each quarter for a bank Total assets: I want to keep those are within a certain range. So here is what I have done Gen available =0, replace available =1 if total assets >=40000. But it is possible that in quarter 1 for the year 2000 total assets are> 40000 and in quarter 2 < 40,000, if I say keep if available ==1, it will delete that of quarter 2 in 2000. But I want to keep it if it =0&1 in any period and delete if all through the quarter only equals to 0. Do you have an idea of how to drop only for those that do not meet my criteria of 0 &1 throughout the period (i.e 0 only based on my criteria)?
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