Hello,
I am working on interpreting the interaction term in a logistic difference-in-differences model . For this, I am using the -logit- command followed by the -inteff- command. My logit model has several terms specified as factors variables. When I use the -inteff- command following the -logit- command, I get the "Factor variables and time-series operators not allowed" error message.
My actual model contains more than 35 variables, several of which are factor variables with more than 2 levels. I am presenting below the code for a simple model. x is binary 0/1, after is binary 0/1, treatment is coded as a categorical variable with 4 categories, year is coded as categorical with 6 categories.
Is there a way for me to convert the factor variables 'en masse' to dummy variables, or must I do it one variable at a time?
I am using Stata 13.1 MP on Unix.
Thank you,
Caroline
I am working on interpreting the interaction term in a logistic difference-in-differences model . For this, I am using the -logit- command followed by the -inteff- command. My logit model has several terms specified as factors variables. When I use the -inteff- command following the -logit- command, I get the "Factor variables and time-series operators not allowed" error message.
My actual model contains more than 35 variables, several of which are factor variables with more than 2 levels. I am presenting below the code for a simple model. x is binary 0/1, after is binary 0/1, treatment is coded as a categorical variable with 4 categories, year is coded as categorical with 6 categories.
Code:
logit x i.after##i.treatment i.year, or inteff x .after##i.treatment i.year, savedata(home/logit_inteff,replace) savegraph1(home/logit_inteff, replace) savegraph2(home/logit_inteff2, replace) Factor variables and time-series operators not allowed r(101)
I am using Stata 13.1 MP on Unix.
Thank you,
Caroline
Comment