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 ?
count group var if a condition is metHello, I am using Stata 15.1 to analyse household survey data. I want to simply count the number of…
IVQREG2: module to estimare structural quantile functions now available in SSCDear All: Thanks to Kit Baum, ivqreg2 is now available in SSC. This module estimates the structura…
Help to import from ExcelHi. I am trying to import an excel file into Stata. However, when I use the option firstrow, Stata …
Timeseries - cumulative impactI have been using Regression with Newey-West standard errors Code: newey for time-series regressi…
How to create a dummy variable from two variablesHi! I have a dataset with two variables for test scores: scores in 2002 and scores in 2013. I want n…
Subscribe to:
Post Comments (Atom)
0 Response to How to get the first 3 digit of a variable ?
Post a Comment