Dear Stata list,
I want to generate an error list in a dta file on different conditions for data cleaning. I have searched the command like insertto or appendto but did't find any help in this regard.
for example:
bys hhid: appendto <varlist> if _n > 1 , using errors.dta comment("Duplicates")
bys hhid: insertto <varlist> if _n > 1 , using errors.dta comment("Duplicates")
appendto <varlist> if condition , using errors.dta comment("var1 = 1 and missing(var2)")
I know this can be done via post file after marking such records or using preserve/restore. It would be helpful if this could be done with just one command.
Thanks
Rasool Bux
Related Posts with Insertto or appendto
How to merge CRSP daily with CRSP/Compustat Merged Annually data?Hello, I would like to ask how to merge CRSP Daily data with CRSP/Compustat Merged Annually data? I…
Replace Blanks within a StringHi All, I have a pretty large dataset where one of the columns has over 1200 unique observations. Ea…
gsem in stataHow can I use gsem when I have dependent binary variables? Using the example in the manual: Code: …
which variable to take as reference category?Hi all, I'm doing a research about the relationship between risk tolerance and demographic factors …
Help with replace and egenHi everyone, I have the dataset below. How can i replace the S3_Q10K with value in S1C_Q0_*? For ex…
Subscribe to:
Post Comments (Atom)
0 Response to Insertto or appendto
Post a Comment