Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: label value


From   Jean Bouyer <[email protected]>
To   [email protected]
Subject   st: label value
Date   Fri, 26 Sep 2003 12:03:16 +0200

In a .do file, I would like to display the value of some variables for certain subjects (those with an error) using label value rather than initial coding.
I succeed with the following code that applies for the the subject #6 and the variable is1 (that have the label value outp).
Is there a more simple way to do this (I mean with less local macro l and ll) ?

Thanks

local nn=6
local i=1
local ll=is`i'[`nn']
local l : label outp `ll'
display as err "pregnancy outcome " `i' " : " "`l'" " c_ident = " `nn'

--



------------------------------------------------------------------------------------
Jean BOUYER
INSERM U 569, HOPITAL DE BICETRE, 82 RUE DU GENERAL LECLERC
94276 LE KREMLIN-BICETRE CEDEX - FRANCE
-------------------------------------------------------------------------------------
*
* 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