Statalist


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

RE: st: RE: condensing varlist non-categorical contents to a newvar


From   "b. water" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: condensing varlist non-categorical contents to a newvar
Date   Thu, 6 Mar 2008 23:13:05 +0000

ok, it was a string Philipp. ...if injurytype==""... worked. thank you.

regards,
bw


> Date: Thu, 6 Mar 2008 18:03:19 -0500
> From: [email protected]
> To: [email protected]
> Subject: Re: st: RE: condensing varlist non-categorical contents to a newvar
>
> .
> Your variable injurytype seems to be a string variable.
> I haven't looked at how you want to recode it, but if it is a string
> variable, you will need to use quotation marks ("):
>
> replace injurytype="minimal" if injurytype=="."
> or
> replace injurytype="minimal" if injurytype==""
>
> It depends on how your missing values are coded.
>
> HTH,
> Philipp
>
>
>
> b. water wrote:
>> i tried -replace- to without success e.g.:
>>
>> . replace injurytype=minimal if injurytype>=.
>> minimal not found
>> r(111);
>>
>> or
>>
>> . replace injurytype="minimal" if injurytype>=.
>> type mismatch
>> r(109);
>>
>> i have also tried -encode- and -recode- without luck. further advice/help would be appreciated.
>>
>> regards,
>> bw
>>

_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail�-get your "fix".
http://www.msnmobilefix.com/Default.aspx
*
*   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