Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Question Regdarding Scatter Plot
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Question Regdarding Scatter Plot
Date
Tue, 19 Jun 2012 09:59:45 +0100
On a second look, you probably need something more like this
replace date1 = date2 if missing(date1)
destring value score , replace
collapse value score , by(patient date1)
Nick
On Tue, Jun 19, 2012 at 9:04 AM, Nick Cox <[email protected]> wrote:
> You need to fill in gaps in your data first. See
>
> FAQ . . . . . . . . . . . . . . . . . . . . . . . Replacing missing values
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
> 2/03 How can I replace missing values with previous or
> following nonmissing values?
> http://www.stata.com/support/faqs/data/missing.html
>
> By the way, the expression "a data" is in my view not yet idiomatic in
> English. I recommend "a data set" or "a dataset".
>
> Nick
>
> On Tue, Jun 19, 2012 at 4:28 AM, Dudekula, Anwar <[email protected]> wrote:
>
>> I am here posting a de-identified data (values are also completely changed , only data format is retained for clarification of question)
>>
>> QUESTION: how can I draw a scatter plot between VALUE and SCORE when DATE-1=DATE-2 (from following data)
>>
>> +----------------------------------------------------------------------+
>> | PATIENT ID DATE-1 VALUE DATE-2 SCORE |
>> |---------------------------------------------------------------------|
>> 1. | Patient-1 10/6/2009 97 |
>> 2. | Patient-1 11/21/2011 22 |
>> 3. | Patient-1 11/21/2009 8.15 |
>> 4. | Patient-1 3/24/2011 33 |
>> 5. | Patient-1 4/12/2010 25 |
>> 6. | Patient-1 7/14/2009 6.44 |
>> 7. | Patient-1 7/16/2009 0.35 |
>> 8. | Patient-1 7/16/2009 85 |
>> 9. | Patient-1 10/6/2009 85 |
>> |------------------------------------------------------------------|
>> 10. | Patient-2 11/30/2006 8.12 |
>> 11. | Patient-2 11/30/2006 1.54 |
>> |------------------------------------------------------------------|
>> 12. | Patient-3 10/27/2011 88 |
>> 13. | Patient-3 12/9/2008 2.36 |
>> 14. | Patient-3 12/9/2008 93 |
>> 15. | Patient-3 6/10/2010 44 |
>> 16. | Patient-3 6/10/2010 44 |
>> |------------------------------------------------------------------|
>> 17. | Patient-4 11/28/2011 58 |
>> 18. | Patient-4 2/6/2012 15 |
>> 19. | Patient-4 2/6/2012 45 |
>> 20. | Patient-4 11/28/2011 58 |
>> +-----------------------------------------------------------------+
>>
*
* 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/