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.
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
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)
If so, does anyone know how to include it, or any suggestions


Comment