I have data in string as shown below
data1 data2
NA NA
NA NA
NA NA
NA 8415739
NA 10024002
N 12057882
N 10759322
N 11305650
N 10937087
N 11463371
N 11287917
N 12720750
N 14849447
N 15542380
N 17368642
N 20738561
I want to replace NA observation to missing(.)
I tried this command
replace data1=. if data1==NA stata return error "NA not found"
Can anybody help me on this please
Related Posts with Removing NA Across var
Calculating Systematic Coronary Risk Evaluation in stataHello, I am calculating the Systematic Coronary Risk Evaluation in Stata, described in this article…
Creating super tables of proportions in STATAHi, I have 12 variables labeled treat1 - treat12. All the responses are coded as Y/N. I would like t…
Using 'cgmwildboot' _ Standard errors "Null"Dear all, I need some help with running the 'cgmwildboot' command. I intend to utilize a Control Fun…
How to write the objective function in optimize command?Hi Statalist, I am trying to minimize the below objective function in Stata using optimize command …
Error using readreplace in Stata17 versionHi All, I'm now using the command: readreplace in Stata 17 version. I got the following error, pleas…
Subscribe to:
Post Comments (Atom)
0 Response to Removing NA Across var
Post a Comment