Statalist The Stata Listserver


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

Re: st: use of *OR* | in 'replace'


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: use of *OR* | in 'replace'
Date   Thu, 2 Mar 2006 12:58:10 +0100

Steffen wrote:

whenever I try to use an OR-statement in relation to the replace command
I encounter an error.

E.g.
- Variable Temp can take values of 40.5, 41.5 and 42.5
- Variable Dose_Group can take values from 1 -- 14
...
replace Include=1 if Temp==42.5 | Dose_Group<3
returns:
Dose_Group invalid name
r(198)
----------------------------------------------------

Are you absolutely certain that you have a variable with the name
Dose_Group (with uppercase and lowercase characters as shown)? If not,
it explains everything. Try, e.g.,
    summarize Dose_Group


Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [email protected]
__________________________________________

*
*   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