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()???
SVYSET and SVY:tab helpHello, I have the following two SPSS commands. This is what I have from the SPSS codebook: CSPLAN A…
Graph bar for categorical variable, but sorted in prespecified orderThis is a stunningly simple problem and I know there is a stunningly simple answer, but I can't figu…
Treat numeric variables as factor variablesI have a dataset with 3500 companies. Each company has a unique company ID (variable name is id), wh…
STATA coefplot: plot other coefficients benchmark to one coefficientI'm using coefplot to plot the coefficients on xlag3, xlag2, xlag1, x, xlead1,xlead2,xlead3 from my …
Plotting interactions so their cumulative effects can be illustratedHi, I am trying to plot three categorical by continuous interactions on top of one another so that …
Subscribe to:
Post Comments (Atom)
0 Response to String variable- code group certain cases- regexm(); regexr(); regexs()???
Post a Comment