I have a variable receiving 3 types of results: 4-digit number, 3-digit number, and NA
For example
4412
4564
334
NA
7677
What I want is to get the first 3 digit as below
441
456
334
.
767
Could you please let me know how to make it? I think of generate a new variable but I am not sure how to make it.
Warm regards.
Related Posts with How to get the first 3 digit of a variable ?
Question About Multilevel Model with Repeated DVs and Sample Weights (using MIXED command in STATA)Hi All I am conducting an MLM and am unsure if I have specified my analysis correctly and whether I…
Type mismatch when trying to get substringHi, I'm working with trade data and I want to get a substring from a numeric code that includes the …
How to do a histogram? - surveyHello, I have an example of the dataset below (survey). I would like to do a histogram with the ans…
What is the meaning of adding an non-binary interaction variable to a regression?When examining whether the impact of laws on Y differently in developed countries is to add an inter…
Hausman test with xtpoissonHello everyone, I am using a xtpoisson model, because I have a dependent count variable. I want to …
Subscribe to:
Post Comments (Atom)
0 Response to How to get the first 3 digit of a variable ?
Post a Comment