Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • destring when numerical values with < or > signs

    Hello,

    I am working on epidemiological data and I have a couple of variable from biomarkers for which I have values such as > 1.50 etc.
    I cannot use the destring command as I have done with others because it says I have characters in my data.
    How can I solve this issue?

    Thank you in advance.

  • #2
    Clearly -- meaning clearly, once you read the help -- you can just specify

    Code:
    destring whatever, ignore(><) 
    and >1.50 will just get recorded as 1.50 and <666 as 666, and so on and so forth. But that just solves one problem to create another. How are going to treat these data? What justifies throwing away the inequalities?

    In some situations, creating flags such as

    Code:
    gen gt = strpos(whatever, ">") > 0 
    
    gen lt = strpos(whatever, "<") > 0
    may allow you to carry data forward to special-flavour regressions.

    Comment

    Working...
    X