Many thanks Martin.
It worked.
Nick
--- On Sat, 1/2/10, Martin Weiss <[email protected]> wrote:
> From: Martin Weiss <[email protected]>
> Subject: st: RE: generate composite variable with select values
> To: [email protected]
> Date: Saturday, January 2, 2010, 10:58 PM
>
> <>
>
> *************
> clear*
>
> set obs 100
>
> gen byte BlindParticipants = irecode(runiform(),0,.2,.3,1)
> gen byte BlindProviders =
> irecode(runiform(),0,.2,.3,1)
> gen byte BlindAssessors =
> irecode(runiform(),0,.2,.3,1)
> gen byte BlindAnalysts =
> irecode(runiform(),0,.2,.3,1)
> gen byte BlindSuccess =
> irecode(runiform(),0,.2,.3,1)
>
> egen byte threes = anycount(Blind*), values(3)
> gen byte all=threes==5
> *************
>
>
> HTH
> Martin
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> On Behalf Of Nikolaos Pandis
> Sent: Samstag, 2. Januar 2010 18:51
> To: [email protected]
> Cc: [email protected]
> Subject: st: generate composite variable with select
> values
>
> Hi to all and Happy New Year.
>
> I have 5 variables referring to blinding, all with 3 levels
> (1, 2, 3):
>
> BlindParticipants
> BlindProviders
> BlindAssessors
> BlindAnalysts
> BlindSuccess
>
> I would like to generate a composite variable that includes
> all 5 variables
> that are ==3.
>
> Many thanks in advance.
>
> Nick
>
>
>
> *
> * 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/
>
> *
> * 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/
>
*
* 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/