I have a dataset and want to keep a number of variables - Soundex started with a letter, for example, those which started with "H" like H0028. The variable's name is "contractid" and I want to keep only those started with H or R or E
I used the following command but it doesn't work
keep if substr(string(contractid), 1,5) == "H" | substr(string(contractid), 1, 5) =="R" | . substr(string(contractid), 1,5 )=="E"
I would greatly appreciate your help
Related Posts with keeping soundex started with a specific letter
standard deviation xtpoissonHi all, is there a way to recover standard deviations of coefficients from xtpoisson, fe? in partic…
calculating weights for each year (panel data)Hi, I am currently writing my thesis but unfortunately ran into some problems with calculating a va…
Create a boxplot with 2 x left axis to capture difference ranges #data visualisationHi folks - been mulling over this but can't quite figure out a good solution. Wondered if anyone had…
Multivariate probit model-->constant term missing standard errorsHi, I am running a multivariate probit model to assess the music consumption habits of a sample of …
PSM and DIDCan outcomes from PSM and DID have same coefficients.. …
Subscribe to:
Post Comments (Atom)
0 Response to keeping soundex started with a specific letter
Post a Comment