I have a dataset with some firms identified as "targets." I would like to select firms that are within +/- 30% of two parameters (size and ROA) of the targets and somehow flag these firms (other targets can be included in the flagged firms). Ultimately I would like to take the average size of these flagged firms relative to the respective target. Does this make sense? I do not know where to start!
Thank you for your response! The only issue I see with that solution is that it is only good for one target at a time - I have about 100 targets within the dataset (and targets can be in the list of matches for other targets). Is there a way to loop that logic so that I do not have to separately identify the matches? Thanks!!
target_size = 123;
target_ROA = 456;
flag_size = (abs(size - target_size)/target_size LE 0.3);
flag_ROA = (abs(ROA - target_ROA)/target_ROA LE 0.3);
This program will flag as many "targets" as there are rows in your input data - hundreds or more. Each of your rows will have two flags, one for size and one for ROA. To select rows meeting your size target: