Hi, When executing a linear regression with an interaction term, I’m getting an unexpected error message from Stata: factor variables may not contain noninteger values.
I'm using Stata 17.0 for Windows.
I know that this question has been asked before on this forum, however, when I tried all the answers, the error remains.
In a normal regression, Stata runs without problems. It is only when I add the interaction term that I keep getting this error.
The fact is; the variables that I am trying to test for their interaction term are containing noninteger values.
Is there a possibility to keep the numbers with decimals or should I create new variables containing only whole numbers?
And if so, how do I create a new variable in Stata containing no decimals?
Thanks in advance,
I'm using Stata 17.0 for Windows.
I know that this question has been asked before on this forum, however, when I tried all the answers, the error remains.
In a normal regression, Stata runs without problems. It is only when I add the interaction term that I keep getting this error.
The fact is; the variables that I am trying to test for their interaction term are containing noninteger values.
Is there a possibility to keep the numbers with decimals or should I create new variables containing only whole numbers?
And if so, how do I create a new variable in Stata containing no decimals?
Thanks in advance,
Comment