Hello everyone,
I have a variable named "diversity" (and a bunch of other variables) and I would like to drop the values of the variable "diversity" if the value of diversify is less than 0 (without dropping the values of other variables).
I tried the below command but I get "invalid syntax" error.
command:
drop diversity if diversity<0
Could someone please advise on how to perform this?
Thanks,
Ama
Related Posts with Drop the values of a variable with if condition
Replacing missing values within a variable with true value based on an ID - Seeking efficient solution.Apologies in advance for a somewhat convoluted title for the post. I have already solved the problem…
How to do the calculation of matrix mutiplying databaseHi Stata users, I have some problems with the calculation of matrix with database. For example, I h…
How to round date variables to the nearest Monday?Hi everyone, I have a dataset with student test scores and test dates for the years 2008-2019. I ha…
How to do the calculation of matrix mutiplying databaseHi Stata users, I have some problems with the calculation of matrix with database. For example, I h…
Does a dofile have meta-data (like a word document) that says something about it's creator?I will upload a dofile for an anonymous submission to a journal. However, I cannot seem to find out …
Subscribe to:
Post Comments (Atom)
0 Response to Drop the values of a variable with if condition
Post a Comment