Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: using reshape


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: using reshape
Date   Tue, 12 Sep 2006 13:13:44 -0400

Maybe I don't understand the problem, but if ir2 is the number of injuries reported and injnum is number for each injury created by reshape, why can't you just:

drop if injnum>ir2

immediately after the reshape?

Michael Blasnik
[email protected]

----- Original Message ----- From: <[email protected]>
To: <[email protected]>
Sent: Tuesday, September 12, 2006 12:52 PM
Subject: Re: st: using reshape



Svend,

Thanks again for your suggestions.

You're right that I could create a set of -drop- statements to remove all
null records (where all reshaped variables are missing) so that -reshape-
would create the unbalanced data set I need.  Despite my general aversion
to using SPSS, I took a look at their version of -reshape-, called
-restructure-.  There is a handy option to drop all null records, which
easily creates unbalanced data sets.  It would be nice if Stata's
-reshape- command had such an option.  Given the likelihood of adding new
variables as the data analysis progresses, I will likely use SPSS to
reshape my data.

Mike Frone

****************************************************************
Michael R. Frone, Ph.D.
Senior Research Scientist
Research Institute on Addictions
State University of New York at Buffalo
1021 Main Street
Buffalo, New York 14203
*
*   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