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
Change every observations for an ID conditioning on only 1 year criteriaHello, I am currently trying to transform a panel data into a cross-section. I have something like …
Multi nominal regression using maximum likelihoodHi everyone, I've checked the forum and I can't seem to find an answer to my question. Due to the …
multiple plots after marginsHi, I created, separately, two of the attached plots. In each plot, this is generated from the marg…
Stripplot; using different symbols when using ,over(group)Dear Listers I have been working with stripplot (SCC) all day, and like how it has turned out. For …
Next Birth After AbortionHi All, I am using the women file from the Demographic and Health Survey (NFHS-4) India. In that fi…
Subscribe to:
Post Comments (Atom)
0 Response to Finding minimum value out of 5 different variables for each row
Post a Comment