Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
sort clt_unique_id admission_date destring prior_service_turps_1 - prior_service_turps_25,gen(destrprior_service_turps_1 - destrprior_service_turps_25) foreach v of varlist destrprior_service_turps_1 - destrprior_service_turps_25 { egen missDS=rowmiss(destrprior_service_turps_1 - destrprior_service_turps_25) egen c08=anycount(`v') if `v' !=., values (8) } tab c08 list obsno patno missDS c08 destrprior_service_turps_1 - destrprior_service_turps_3 This coding produces the following values for patient no 18 , who clearly should have 3 code 8 recorded in variable c08, but has only 1 | obsno | patno | c08 | destr~_1 | prio~s_2 | destr~_2 | prio~s_3 | destr~_3 | | 68 | 18 | 1 | 8 | 008 | 8 | 008 | 8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: egen anycount problem
From
paul gross <[email protected]>
To
<[email protected]>
Subject
st: egen anycount problem
Date
Fri, 17 May 2013 10:00:16 +1000