Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: MI reshape
email@example.com (Yulia Marchenko, StataCorp)
Re: st: MI reshape
Fri, 03 Feb 2012 09:54:15 -0600
Laura Gibbons (firstname.lastname@example.org) received a "variable not found" error
from -mi reshape long-:
> My reshape command dies at the "assembling results" stage:
> . mi reshape long adas12_m, i(studyid) j(month)
> reshaping m=0 data ...
> reshaping m=1 data ...
> reshaping m=2 data ...
> reshaping m=20 data ...
> assembling results ...
> variable adas12_m not found
We identified the problem.
The error occurred because the -adas12_m#- variables in the original wide data
have different -mi- registrations, such as
So how should the new variable in the long dataset be registered:
-mi reshape- got confused.
Basically, all the variables in the wide dataset need to be registered the
same way: all as imputed, or all as passive, or all as regular, although
it is okay if some are unregistered.
So that is what Laura needs to do to work around the problem: register
all the -adas12_m#- variables the same way.
We will fix -mi reshape-, but that fix may merely involve an improved error
message. Determining how a stacked imputed, passive, and regular variables
are to be registered after stacking may be something best left to the
Laura also mentioned that the -noupdate- option with -mi reshape- produces
. mi reshape long adas12_m, i(studyid) j(month) noupdate
reshaping m=0 data ...
option noupdate not allowed
Despite what the documentation says, -noupdate- is not allowed with
-mi reshape-. We will fix the help file and the documentation.
-- Yulia -- Bill
* For searches and help try: