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()???
2 period balanced panel with continuous and numeric dependent variables --> Which estimator to use?Dear Forum, I hope you are all doing well. I am really struggling with some content of my econometr…
Identifying variables that serve as unique identifiersHello everyone I want to write a program that accepts numeric and string variables as input, that …
Pooled Panel or Cross Sectional DataGood Morning I have a query regarding a data set I am handling. I am trying to see the out migration…
Multiple catplot graphs in oneDear all, I have two categorical variables, which have exactly the same categories. I want to graph…
Calculate cumulative abnormal announcement return (CAR)Dear all, I am a Stata learner and have some problems related to the calculation of CAR. My data in…
Subscribe to:
Post Comments (Atom)
0 Response to String variable- code group certain cases- regexm(); regexr(); regexs()???
Post a Comment