To convert from string to numeric data in Stata, you have your choice between . destring stringvar, generate(numvar) or . generate numvar = real(stringvar) Which you choose is mostly a matter of personal preference. destring returns an error if it encounters nonnumeric values. generate with ...
不是numeric
Option sortby() returns error, both for numeric and string variables #12 Closed rolandhosner opened this issue Apr 13, 2023· 4 comments Commentsrolandhosner commented Apr 13, 2023 status_t1 is a string, status_t1_num is a long; in both cases, the sortby() option returns the same e...
fillmissing program provides the convenience of filling missing values in numeric or string variables with the variable's previous value, forward value, first or last value, or with some calculated values such as mean, median, minimum, maximum, etc. in numeric variables. The program can work wit...