Hello! I'd like to ask how to drop observations in such follwing dataset.
See the pic below for dataset.
ID is the identifier of participants, visit is the visit namely visit 1 or visit 2.
Some participants are missing at visit 1 and some are at visit 2, and some values for Blood and urine are missing.
I want to drop all participants if they have missing value both for Blood and urine at visit 1.
I'd like to know if there can be some straightforward and simple method in doing that.
And I can only use the simple code to list the ID by : list ID if Blood==. & urine==.
But since it's a large dataset, it is not practical and also not clever to delete them one after one, like drop if ID==512125 and so on... also with more than 100 variables also not possible for reshaping.
Thanks for help!!!
Array
Related Posts with Questions for "drop" participants in long data format for repeated mesurements.
Set title for the second y-axis in scatter chart with by()Dear Statalisters, I plot the chart as below Code: twoway (scatter var1 rev, sort) (scatter var2…
marginsplot with custom labelsHi, I saw a discussion about this topic here: https://www.statalist.org/forums/for...-custom-labels…
Is it possible to destring a variable which starts with a letter?Hello, I am using Parliamentary Constituency codes (variable name _pcon) in my dataset which begin w…
generate variable time to event. Several measures in time.Please, I need to create a variable event and time to event. But I have different measures. The vari…
displaying the contents of a macroHi all: I am using "macro list" to display the contents of all the macros I have created (locals and…
Subscribe to:
Post Comments (Atom)
0 Response to Questions for "drop" participants in long data format for repeated mesurements.
Post a Comment