recode string variable stata

How to Convert String variable into numeric in Stata

There are different kinds of variables that can be observed in the data, including numeric, non-numeric, binary, and so on. Stata usually deals with numeric variables having discrete or continuous numbers in them. However, sometimes we have to deal with data where observations are non-numeric and contain some characteristics. These kinds of variables, having characteristics …

How to Convert String variable into numeric in Stata Read More »

Using the Encode Command In Stata to Convert String Variable

Often times, we have to work with categorical variables when doing statistical analysis. Categorical variables are those variables that have two or more categories or groups. For example, a variable representing sectors in a stock market could have categories like tech, automobiles, pharmaceuticals, cement, banks etc. These categories of string type may also be needed …

Using the Encode Command In Stata to Convert String Variable Read More »