I have string variables asset1-asset25. For each variable, I want to change NA to missing values
This code does not work:
foreach `v' of varlist asset* {
replace `v' = "" if `v' == "NA"
}
Thank you!
Related Posts with Replacing values in multiple string variable
How to drop some observations based on tab results ? Hi Everyone, I would like to drop some countries with percent value <0.10. I dont know how to …
Difference in Difference Regression using xtdidregress comandHi all, I am doing a diff- in diff regression model and currently use the xtdidregress command. Whi…
How to split variable that does not have spacesHi Everyone, I would like to split (eg. Italy2019) into two variables (eg.country= Italy and year =…
Panel specific ar vs common arHello everyone, what are the tests/ criteria that specify which type of options should I choose when…
Combining two time variables (Year & Period of year (month)) into one time variable which could be used as tsset for graphsHello Stata community; I have this dataset: Code: * Example generated by -dataex-. To install: ssc…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values in multiple string variable
Post a Comment