I would like to create a new variable that equals the minimum value out of 5 different variables for each row.
Example: For each "ID" would like to find the minimum value out of v1,v2,v3,v4,v5 and create a new variable "v6" using that value
ID v1 v2 v3 v4 v5
1 22 25 28 30 11
2 15 28 14 19 29
Update: Realized this works, sorry for the wasted post!
egen v6=rowmin( v1 v2 v3 V4 V5)
Related Posts with Finding minimum value out of 5 different variables for each row
Access the actual current date and time from computer clock to input in file nameHi, I would like to access the actual current date and time from computer clock to input in file na…
Descriptive statistics: add percentages to summary statistics (matrix)Hi Statalisters, I have a question with regards to descriptive statistics. I have been working on a…
xtpoisson fe, Hausman and Goodness of FitHi everyone! I am currently working on my Masters' thesis, I'm working with Poisson Fixed Effects b…
Standardizing longitudinal data according to a baseline reference normHello, I am examining the longitudinal trajectories of various biomarkers, and I would like to stan…
Advice on Missing DataHello, I'd just like to get some advice on how to deal with missing data. I have a set of indices t…
Subscribe to:
Post Comments (Atom)
0 Response to Finding minimum value out of 5 different variables for each row
Post a Comment