Statalist The Stata Listserver


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

Re: st: flagging a specific pattern of values within observations


From   "Sergiy Radyakin" <[email protected]>
To   <[email protected]>
Subject   Re: st: flagging a specific pattern of values within observations
Date   Tue, 24 Apr 2007 19:36:56 +0200

No, this will not work(2-2-2):

----------------------------
fid q11a q11b q11c
55 2 3 1
21 1 2 1
22 2 2 2
----------------------------

Prime numbers seem to be a better idea.

Best,
Sergiy


----- Original Message ----- From: "Alan Neustadtl" <[email protected]>
To: <[email protected]>
Sent: Tuesday, April 24, 2007 7:30 PM
Subject: Re: st: flagging a specific pattern of values within observations



How about something like this:

clear
input fid q11a q11b q11c
55  2 3 1
21  1 2 1
end

tempvar checkit
egen `checkit'=rowtotal(q11a q11b q11c)
generate byte flag=1 if `checkit' !=6
list if flag==1

Best,
Alan


On 4/24/07, Anirudh V. S. Ruhil <[email protected]> wrote:
A colleague is trying to accomplish something in a different stats package
and asked if STATA could effect the solution. "Of course", said I. Now I am
scratching my head for the code. Individuals were asked to rank-order 3
choices. Person 55 did fine, but not Person 21. How can I generate a flag
for such respondent-errors?

----------------------------
fid q11a q11b q11c
55 2 3 1
21 1 2 1
----------------------------

thanks in advance

Ani

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

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