[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: label value
> 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) ?
> 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'
Lars Korsholm asked a similar question a few days ago.
If you know a variable name and its value you
can display the value label in one step with
. di "`: label (<varname>) <value>'"
. di "`: label (is1) 6'"
However, your problem doesn't sound like one
where I would do this. Why not just -list-
the selected observations and variables?
* For searches and help try: