Announcement

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

  • i: operator is invalid

    Hi Statalisters,

    I am using an old version of STATA/SE 10. I am trying to include an interaction term between two categorical variables in a negative regression model.
    The first variable is age with four categories such as: (<5, 5-19, 20-64, 65+) and the second variable is season, another categorical variable with categorise like (2014-2015, 2015-2016, 2016-2017, 2017-2018,2018-2019).
    Whenever, I run the code gen ageseason=i.age*i.season I get two different messages:
    First, season may not use time-series operators on string variables. So I thought I could transform season to a variable with 5 categorise like 1,2,3,4,5 (still as a categorical variable).
    I get the message i: operator is invalid r(109);
    I have a feeling that this might be related to the old version of stata . However, I would kindly ask anyone to help me make this work.
    Thank you very much,

    Adriana Peci

Working...
X