Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: st: Reshape Long r(101) Error

Subject   re: st: Reshape Long r(101) Error
Date   Fri, 24 Feb 2012 17:20:46 -0800

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.



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 <>
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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index