Skip to content

Weird problem with trying to change a variable

2 messages · Peter Flom, Peter Dalgaard

#
Thanks for the responses.  Several people suggested I check that the
numbers are exactly what I think they are (ie. that 5360 is not
5360.00001.  I don't think this is the case (the data were entered in
SAS, then I used DBMS copy to get them to SPSS, and then read.spss to
move them to R), but I will check when I get back to the office (not til
Tuesday)

In addition, Dr. Ripley replied


I wrote
I
Brian Ripley replied
<<<
`The level'?  You said they were numeric, and it is factors which have 
levels.
Sorry, I misspoke - I didn't create the data set.  ACTUP is, really, a
two level variable, but was coded (originally in SAS) as 0 1.  when I
did mode(ACTUP) I found that it was numeric.
Me
Dr Ripley
So presumably cvar$MSA == 5360 is entirely false, but I would check, and
I 
would also check the class of cvar$MSA.
when I did mode(MSA) I got that it was numeric


Thanks again

Peter

Peter L. Flom, PhD
Assistant Director, Statistics and Data Analysis Core
Center for Drug Use and HIV Research
National Development and Research Institutes
71 W. 23rd St
www.peterflom.com
New York, NY 10010
(212) 845-4485 (voice)
(917) 438-0894 (fax)
#
"Peter Flom" <flom at ndri.org> writes:
Don't think, check! Calculate min(abs(x-5360)) for instance.