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
returnsyh command donwloads historical data for any ticker with historical data in Yahoo - ErrorHi, I am getting the following error with returnsyh command donwloads historical data for any ticke…
Suppress input prompt for pauseFantastic people of Statalist, I am running a batch of do files that contain -pause- commands and w…
Hausman test has suggested Random effects model but I want to use Fixed effectsHello everyone, I am using EU dataset for 27 countries for 5 different years. My goal is to determi…
Repeated observations in panel data Dear all, I am trying to build a long database. I have data from 2004 to 2018 where, during four y…
Maximizing Sharpe Ratio - Portfolio optimizationHi, I would like to maximize the Sharpe ratio (=Historical Return (portfolio)/Standard deviation(po…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values in multiple string variable
Post a Comment