Hello
I have a dataset in which each identifier (ID) has multiple rows of observations, ranging from 2 to 15.
I have a variable (main), the answer to which determines whether or not the row will be considered in all analysis (1 means "Yes"). This could be 1 or multiple rows per ID.
I have one row of observation per ID, which has answers to variables different from the rest. I want to merge this row of observation with row(s) which has "Yes" for the variable main.
I don´t seem to get any command work for that so far. I would appreciate any help. Let me know if further clarification is required.
Thank you.
Related Posts with Merging one of the rows with another within multiple rows of observation
Bootstraping the CPS from IPUMS using bsampleHello, I'm working with the basic CPS as provided by IPUMS. I need to bootstrap the data to comput…
Iterations in ARDL modelsDear Stata users, I am conducting a study using a panel of 48 countries over 1981-2018. The followi…
How to generate cubic turning points?Esteemed Statalisters, Please I use Stata 16 and need your assistance with deriving cubic turning p…
Difference between dates in monthI have dates %tdD_m_Y format and I want to create an indicator if they are exactly one month apart, …
How can I get difference between two dates in daysHello, I want to get the difference between these two dates (Fenddt - Rptdt) in days at a new variab…
Subscribe to:
Post Comments (Atom)
0 Response to Merging one of the rows with another within multiple rows of observation
Post a Comment