Dear Statalist,
I would like to be able to select only those cases in "subp" variable whose value ends with "-1" at the end. Because the variable "subp" is a string variable, I could not find an efficient code. I would really appreciate if you could help me with a suitable code to solve this problem. Thanks. Ramu
. tab subp
subp | Freq. Percent Cum.
------------+-----------------------------------
15-0394-1 | 1 0.91 0.91
15-0394-2 | 1 0.91 1.82
15-0394-3 | 1 0.91 2.73
15-0453-1 | 1 0.91 3.64
15-0453-2 | 1 0.91 4.55
Related Posts with String variable- code group certain cases- regexm(); regexr(); regexs()???
repeated time values within panelDear Statalisters! I have problems with my time variable. I tried to use this commando: xtset impo…
using "spmap"Hi guys, I am trying to map the result by using "spmap" command, yet keep having troubles with the …
GEE and distributional assumptionsHello all, I am using GEE to estimate my dependent variable. The dependent variable has a lower bou…
How to present vignettes in a tabular formatHello everyone, Could you please help me to present vignettes in a tabular format rather than a run…
The base year for finding yearly effects of the shock in DIDI wanted to estimate a difference-in-differences model using Stata looking at the effects of a trade…
Subscribe to:
Post Comments (Atom)
0 Response to String variable- code group certain cases- regexm(); regexr(); regexs()???
Post a Comment