Announcement

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

  • Variable "was int now float"

    Dear Stata users,
    I would like to know your idea on something strange to me. I'm appending some dataset (in order to create one big dataset), and after have harmonized the variables I'm interested in, I used the command "append using" for each of my dataset I want to append. Everything works, and in the end I obtain my big dataset.

    What i did not really get is why, in appending one of my dataset, Stata shows a message (not in red, so not an error which compromises the process) that states "var A was int now float": what does it mean? It happens only in one of the dataset that I appended, even if I coded and treated the variables exactly in the same way in all of them. Is it something whose I should be worried?

    Thanks a lot, G.

  • #2
    It means that a variable type was upgraded. See

    Code:
    help datatypes
    There are two reasons I can think of for using a float rather than an int. Values outside the limits [ -32767, 32,740] have been encountered or values with decimal parts have been encountered. Without any real detail on your data, I can't guess which holds in your case.

    Comment


    • #3
      Dear Nick, thanks a lot for your answer.
      I think could be the second of you hypotheses, namely that this variable assumes values with decimal parts. What it is strange is that this happens only in this dataset, while in the others (very similar to it, they are different waves of the same survey) this not happens. What kind of detail do you need to better interpret this?

      Thanks a lot, G.

      Comment


      • #4
        Code:
        tab myvar if myvar != floor(myvar)

        Comment

        Working...
        X