Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Reshape from wide to long with some missing observations


From   "Sarah A. Mustillo" <[email protected]>
To   [email protected]
Subject   Re: st: Reshape from wide to long with some missing observations
Date   Mon, 30 Sep 2002 21:04:24 -0400

Bryan -

I encounter this problem frequently, but know of nothing specific with
-reshape- that deals with this issue. I usually reshape the entire dataset and then drop those inconsiderate cases that are missing on the exam variable.

So:

reshape long, i(id) j(exam)
drop if exam==.

I know this isn't the brilliant solution you were looking for, but it works!

Sarah
--On Monday, September 30, 2002 4:52 PM -0400 "Sayer, Bryan" <[email protected]> wrote:


I have a wide dateset of individual subjects with up to six exams.  I am
reshaping to long form, but I only want to include those exams with actual
data (it seems that some inconsiderate subjects died before the end of the
study...).  Anyway, is there an option to only include in the output
observations that have data for varlist that I am missing?  If not, what
is a good solution for dropping the observations with missing data?

Thanks!

Bryan Sayer
Statistician, SSS Inc.
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index