Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: 回复: st: AW: 回复: st: AW: AW: 回复: AW: 回复: st: AW: do file


From   lydia huang <lydiahsh@yahoo.com.cn>
To   statalist@hsphsun2.harvard.edu
Subject   st: 回复: st: AW: 回复: st: AW: AW: 回复: AW: 回复: st: AW: do file
Date   Mon, 8 Mar 2010 21:44:30 +0800 (CST)

Dear Martin,
you know that when the entry is empty, it will show a dot, how can i change all the numerical entries with the dots into zeros, and strings into null?
Best wishes
Lydia

--- 10年3月8日,周一, Martin Weiss <martin.weiss1@gmx.de> 写道:

> 发件人: Martin Weiss <martin.weiss1@gmx.de>
> 主题: st: AW: 回复: st: AW: AW: 回复: AW: 回复: st: AW: do file
> 收件人: statalist@hsphsun2.harvard.edu
> 日期: 2010年3月8日,周一,下午8:51
> 
> <> 
> 
> " is this a right way?"
> 
> 
> 
> Maybe, maybe not, but -duplicates drop- should be more
> straightforward...
> 
> 
> 
> HTH
> Martin
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu]
> Im Auftrag von lydia huang
> Gesendet: Montag, 8. März 2010 13:46
> An: statalist@hsphsun2.harvard.edu
> Betreff: st: 回复: st: AW: AW: 回复: AW: 回复:
> st: AW: do file
> 
> Dear Maryin, and Neil,
> Thank you very much. i still don't know what's wrong with
> that merge do-file, but i identified and dropped duplicates
> by using 
> 
> sort patient_id  admission_diagnosis 
> diagnosis_desc  other_diagnosis
> quietly by patient_id  admission_diagnosis 
> diagnosis_desc  other_diagnosis: gen dup =
> cond(_N==1,0,_n)
> tabulate dup
> drop if dup>1
> 
> is this a right way?
> best wishes
> lydia
> 
> --- 10年3月8日,周一, Martin Weiss <martin.weiss1@gmx.de>
> 写道:
> 
> > 发件人: Martin Weiss <martin.weiss1@gmx.de>
> > 主题: st: AW: AW: 回复: AW: 回复: st: AW: do
> file
> > 收件人: statalist@hsphsun2.harvard.edu
> > 日期: 2010年3月8日,周一,下午8:33
> > 
> > <> 
> > 
> > " To check for uniqueness, use -isid-."
> > 
> > 
> > 
> > Neil`s suggestion to use - duplicates report
> patient_id- is
> > probably even better, given that -isid- returns only
> a
> > binary decision (yes/no) while -duplicates- shows
> more
> > details.
> > 
> > 
> > ***
> > clear*
> > inp id
> > 1
> > 2
> > 3
> > 4
> > 5
> > end
> > isid id
> > di in r _rc
> > duplicates report id
> > inp
> > 4
> > end
> > cap isid id
> > di in r _rc
> > duplicates report id 
> > ***
> > 
> > 
> > HTH
> > Martin
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: owner-statalist@hsphsun2.harvard.edu
> > [mailto:owner-statalist@hsphsun2.harvard.edu]
> > Im Auftrag von Martin Weiss
> > Gesendet: Montag, 8. März 2010 13:06
> > An: statalist@hsphsun2.harvard.edu
> > Betreff: st: AW: 回复: AW: 回复: st: AW: do
> file
> > 
> > 
> > <> 
> > 
> > Well, paste the output of -tabulate- into an email.
> > 
> > To check for uniqueness, use -isid-.
> > 
> > 
> > HTH
> > Martin
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: owner-statalist@hsphsun2.harvard.edu
> > [mailto:owner-statalist@hsphsun2.harvard.edu]
> > Im Auftrag von lydia huang
> > Gesendet: Montag, 8. März 2010 12:30
> > An: statalist@hsphsun2.harvard.edu
> > Betreff: st: 回复: AW: 回复: st: AW: do file
> > 
> > after i use the do-file, i typed -ta _merge-, then it
> come
> > out a table with the titles in the first row: _merge,
> Freq.,
> > Percent, Cum.,is this the right outcome?
> > 
> > --- 10年3月8日,周一, Martin Weiss <martin.weiss1@gmx.de>
> > 写道:
> > 
> > > 发件人: Martin Weiss <martin.weiss1@gmx.de>
> > > 主题: AW: 回复: st: AW: do file
> > > 收件人: statalist@hsphsun2.harvard.edu
> > > 日期: 2010年3月8日,周一,下午7:05
> > > 
> > > <> 
> > > 
> > > 
> > > 
> > > Just do everything the way you used to, and type
> -ta
> > > _merge- once you are done. Do not change your
> original
> > code,
> > > just append the command at the end.
> > > 
> > > 
> > > 
> > > HTH
> > > Martin
> > > 
> > > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: owner-statalist@hsphsun2.harvard.edu
> > > [mailto:owner-statalist@hsphsun2.harvard.edu]
> > > Im Auftrag von lydia huang
> > > Gesendet: Montag, 8. März 2010 12:03
> > > An: statalist@hsphsun2.harvard.edu
> > > Betreff: st: 回复: st: AW: do file
> > > 
> > > Dear Martin
> > > i mean twice present, and after i changed all
> the
> > -merge-
> > > to -ta_merge-, it writes"unrecognized command:
> > ta_merge".
> > > what's next?
> > > Best wishes 
> > > Lydia
> > > 
> > > --- 10年3月8日,周一, Martin Weiss <martin.weiss1@gmx.de>
> > > 写道:
> > > 
> > > > 发件人: Martin Weiss <martin.weiss1@gmx.de>
> > > > 主题: st: AW: do file
> > > > 收件人: statalist@hsphsun2.harvard.edu
> > > > 日期: 2010年3月8日,周一,下午6:29
> > > > 
> > > > <> 
> > > > 
> > > > 
> > > > 
> > > > What does "doubled" mean? Doubled in value
> or
> > twice
> > > present
> > > > where there was only one entry previously?
> Try to
> > find
> > > out
> > > > what happened in the -merge-r by typing -ta
> > > _merge-...
> > > > 
> > > > 
> > > > 
> > > > HTH
> > > > Martin
> > > > 
> > > > 
> > > > -----Urspr眉ngliche Nachricht-----
> > > > Von: owner-statalist@hsphsun2.harvard.edu
> > > > [mailto:owner-statalist@hsphsun2.harvard.edu]
> > > > Im Auftrag von lydia huang
> > > > Gesendet: Montag, 8. M盲rz 2010 11:25
> > > > An: statalist@hsphsun2.harvard.edu
> > > > Betreff: st: do file
> > > > 
> > > > Dear Statalist,
> > > > is there any thing wrong with the following
> > do-file:
> > > > /* sort and save the using data*/
> > > > cd H:\my\2007
> > > > use written, clear
> > > > sort patient_id
> > > > save, replace
> > > > 
> > > > /* sort the master data*/
> > > > use 13, clear
> > > > sort patient_id
> > > > 
> > > > /* merge based on "patient_id" and save*/
> > > > merge patient_id using written
> > > > save final07, replace
> > > > 
> > > > 
> > > > i don't know why, but all the observations
> in
> > the
> > > final07
> > > > have doubled.Why has this happened? what can
> i
> > do?
> > > > Best wishes
> > > > Lydia
> > > > 
> > > > 
> > > >       
> > > > 
> > > > 
> > > > *
> > > > *   For searches and help
> try:
> > > > *   http://www.stata.com/help.cgi?search
> > > > *   http://www.stata.com/support/statalist/faq
> > > > *   http://www.ats.ucla.edu/stat/stata/
> > > > 
> > > > 
> > > > *
> > > > *   For searches and help
> try:
> > > > *   http://www.stata.com/help.cgi?search
> > > > *   http://www.stata.com/support/statalist/faq
> > > > *   http://www.ats.ucla.edu/stat/stata/
> > > > 
> > > 
> > > 
> > >       
> > > 
> > > 
> > > *
> > > *   For searches and help try:
> > > *   http://www.stata.com/help.cgi?search
> > > *   http://www.stata.com/support/statalist/faq
> > > *   http://www.ats.ucla.edu/stat/stata/
> > > 
> > > 
> > > *
> > > *   For searches and help try:
> > > *   http://www.stata.com/help.cgi?search
> > > *   http://www.stata.com/support/statalist/faq
> > > *   http://www.ats.ucla.edu/stat/stata/
> > > 
> > 
> > 
> >       
> > 
> > 
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> > 
> > 
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> > 
> > 
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> > 
> 
> 
>       
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


      


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index