Announcement

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

  • Factor variables may not contain noninteger values (r452)

    Dear all,

    I have a longitudinal panel dataset and I am trying to add individual fixed effects to my specification with i.idd. idd identifies unique individuals throughout the years.

    When I add i.idd to the specification, Stata gives me error message "idd: factor variables may not contain noninteger values". I've looked through the forum but can't find a solution as it seems that I have integers (whole numbers) as idd. What am I missing here?

    Thanks a lot!

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double idd
    1101010002700002
    1101010012010001
    1101010014210001
    1101020000700001
    1101020001000001
    1101020001700001
    1101020003300002
    1101020003800001
    1101020004100001
    1101020005300002
    1101020006000001
    1101030000700001
    1101030000700001
    1101030003800001
    1101030004000001
    1101030004000001
    1101030006100001
    1102010000400001
    1102010000400001
    1102010000400001
    1102010001300001
    1102010001500001
    1102010001500001
    1102010001500001
    1102010001700001
    1102010001700001
    1102010001800001
    1102010001800001
    1102010001800003
    1102010002000001
    1102010002100001
    1102010002100001
    1102010002100001
    1102010002200003
    1102010002200003
    1102010002200003
    1102010002500001
    1102010002500001
    1102010002500001
    1102010002600001
    1102010002600001
    1102010002700001
    1102010002700001
    end

  • #2
    if you look at the help file for fvvarlist, you will see the following:
    Categorical variables to which factor-variable operators are applied
    must contain nonnegative integers with values in the range 0 to 32,740,
    inclusive.
    your values are too large; I don't know how many distinct individuals you have, but I suggest:
    Code:
    egen individual=group(idd)
    and then using the new variable (do you really want a fixed effect for each person in the data?)

    Comment


    • #3
      Rich-

      I didn't know about the specific range for factor-variable operators, thank you. I've followed your suggestion and it works great.

      I'm trying to look at the impact of a policy (individuals have to get a specific labor contract) on outcome variables and I want to use individual fixed effects to remove any possible unobserved characteristic that might influence obtaining that contract.

      Comment

      Working...
      X