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]
st: RE: RE: reshape command error
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: RE: reshape command error
Date
Wed, 17 Nov 2010 16:16:55 +0000
I agree with Jason that checking different machines, installations, etc., is most unlikely to illuminate the problem here, and I agree with him agreeing with me that the issue is the data.
The assumption appears to be that the triples -Id probnum obs- are all distinct (some say unique). If so, -isid- or -duplicates- provides a one-line test.
Nick
[email protected]
Jason Becker
Might I recommend a few troubleshooting tips before switching machines?
First, use Sergiy's code to produce a simplified data set and see if the
command works then as written (pasted below for convenience):
. clear
. input Id probnum obs
Id probnum obs
1. 1 1 1
2. 1 12 2
3. 1 14 3
4. 1 39 4
5. 1 40 5
6. 1 49 6
7. end
.
. reshape wide probnum, i(Id) j(obs)
If that works, then it is almost certain that your install, computer,
etc are not at issue and Nick is almost certainly right-- there is a
peculiar observation or structure in your data which does not fit the
simplified view you're presenting. At this stage, I might split my data
set into say, 10, 50, or 100 observation chunks and try running the
reshape on several of those. I suspect that it will execute perfectly
on most but occasional get caught. When you get tossed back the same
error again, look at the structure of those observations and if you
can't figure out what's wrong, repost data that looks closer to that
form and we can help out better.
Selameab, Tehout
Thank you for your response Sergiy. Obviously, it worked for you! Still
can't get it to work on my laptop. Will try another PC, although that
shouldn't make a difference. I'm using Stata11/Windows on both laptop
and desktop.
*
* 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/