Announcement

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

  • Question about ridge regression

    Hi,

    I am trying to run a ridge regression model which includes categorical variables, numerical variables, and dummy variables. However, when I run the code below, Stata says "factor-variable and time-series operators not allowed". i.x1 and i.x2 are the categorical variables. x3~x8 are dummy variables, and x9 and x10 are numerical variables. I know factor-variable equals categorical variable.

    Code:
    ridgereg y i.x1 i.x2 x3 x4 x5 x6 x7 x8 x9 x10, model(orr) kr(0.1) diag lmcol mfx(lin)
    So this literally means I can not run a ridge regression model which contains categorical variables?

    If so, does anyone know how to include it, or any suggestions

  • #2
    it appears that this command does not allow factor variable notation; however, it does work with -xi-; see
    Code:
    help xi

    Comment

    Working...
    X