I'd like to combine cases, but in an unusual way -- by keeping values from each.
For example, start with:
id1 id2 date amount
80072 1 7/10/2015 4500
80072 1R 2/24/2013 3600
And end up with:
id1 id2 date amount
80072 2/24/2013 4500
I care less about where I end up with the id1/id2 numbers (they'll eventually be eliminated once I get all interrelated cases down to a single row). But I need to keep the date from one case and the amount from the other, and end up with one row. Help, please? Thanks!
Related Posts with Combine cases, but keep values from each.
Analysis of rotating panel design data in StataHello everyone, I have a 9-year rotating panel design in which every year, one-ninth of the sample i…
Missing deciles with Portfolio SortHi, I have the following problem. When using the fastxtile command to sort my values into deciles, …
egen newvar=group(varlist) does not generate a variable based on all unique combinations in the varlistI have been using egen newvar=group(varname1 varname2) for a while, with the understanding that newv…
Looping through multiple strings for comparisonDear all, I would like to compare educational institutions of two workers and code a binary variabl…
zero-inflated (poisson) mediatorsHi, I am running a mediation which the mediator is zero-inflated poisson and the outcome variable is…
Subscribe to:
Post Comments (Atom)
0 Response to Combine cases, but keep values from each.
Post a Comment