Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am attempting to fit a regression model in Stata. My variables are are all continuous variables of type float.
regress _gdp all_indexn_c 90_days consistent _incpc all_indexn_c#90_days
all_indexn_c: factor variables may not contain noninteger values
r(452);
How do I fix this issue? I don't have factor variables and I'd like to use float variables in the model.
–
The problem arises because you're asking for an interaction term and if you do that Stata requires you to flag that a variable with non-integer values is continuous. See for example help fvvarlist
.
Running this reproducible example shows a similar problem and its fix.
sysuse auto, clear
regress price mpg headroom mpg#headroom
regress price mpg headroom mpg#c.headroom
P.S. Regressions with GDP pc as outcome usually work better on a logarithmic scale.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.