Bookmark and Share

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: Reshape Long r(101) Error


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Reshape Long r(101) Error
Date   Sat, 25 Feb 2012 10:41:57 +0000

No more ideas, sorry. Try Stata tech support but expect questions about your dataset.

Nick

On 25 Feb 2012, at 01:20, Rebecca.Gill@unlv.edu wrote:

Dear Nick,

Thank you for your response to my question about the reshape error. Stata gives me no information except: "Long not allowed. r(101)." I have confirmed that the id variable uniquely identifies the rows (using reshape error). I have also made sure that none of the data were in string format. I have been working on Stata SE/11.2, but I've also tried this on a subset of the variables using Stata IC/7. I have checked and rechecked the variable names to be sure that the tags are correct. I just can't seem to figure out how to get this to work. Any other thoughts? I've included a brief summary of my original question below for clarification.

Thanks,
Rebecca

_____________________________________________________

I have renamed all 900+ variables such that the prefix is jXX representing each judge and the endings of the variables are _qXX representing the questions. I have attempted the following reshape command:

reshape long @_q1a @_q1b @_q2 @_q3a @_q4 @_q5 @_q6 @_q7 @_q8 @_q9 @_q10 @_q11a @_q11b @_q12 @_q13 @_q14 @_ret, i(id) j(judgeid) string

I get an r(101) error along with "Long not allowed."

_____________________________________________________

Date: Mon, 20 Feb 2012 01:44:33 +0000
From: Nick Cox <njcoxstata@gmail.com>
Subject: Re: st: Reshape Long r(101) Error

This works:

set obs 10
gen id = _n
gen j1_q1 = ceil(10 * runiform())
gen j1_q2 = ceil(10 * runiform())
gen j2_q1 = ceil(10 * runiform())
gen j2_q2 = ceil(10 * runiform())
reshape long @_q1 @_q2, i(id) j(judgeid) string

On the face of it yours is just bigger.

Is Stata telling you nothing about the error message? Have you tested

. isid id

*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index