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.
Keep with joint condition
Hi
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.
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.
0 Response to Keep with joint condition
Post a Comment