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
Out of Sample/Scope Prediction with CII need some help to get more details for Examples 2&3 to work (page 7 in regress postestimation …
ppml: Number of regressors excludedHi, I am using the PPML estimator but I am not really sure what does it mean?: "Number of regresso…
Syntax of cross-classified multilevel modelDear Statalist, I need to analyze data with complex structures. My data set consists of individuals…
Adding time variablesHi, I am currently working with time data. The following is the time each person spends alone on ea…
Smoothing Kaplan Meier CurvesHello STATA Community, I am a new STATA user and I am trying to compute smooth Kaplan Meier curves.…
Subscribe to:
Post Comments (Atom)
0 Response to Insertto or appendto
Post a Comment