Hi,
I have data of rainfall for each state and year, and I am explaining it based on the size of the state (just an example). I am running
water_(state,year) = constant + \beta * size + error
I want to introduce year fixed effects, in which case I type
reg water size i.year
The previous line works fine. However, when I want to interact the variable size with the year fixed effects, typing:
reg water size i.year size#i.year
I get the following error:
factor variables may not contain noninteger values
Is there an easy way to get rid of the error, or should I just multiply the variable size with each dummy for each year?
Related Posts with Interaction terms giving error "factor variables may not contain noninteger values"
Bayesian approach: what to do when it differs from the frequentist approach?Dear Forum Members, I'm somewhat puzzled by the results given from 2 down-to-earth models, one usin…
Merging rowsHi, I am new to Stata and have a question regarding the merging of rows or cells in Stata. Basicall…
Making new variable from first letter of string variableHi Statalist, Thanks for being a great forum which already has helped a lot! I'm new here, quite f…
Different regression methods to proofHello, I have a question regarding different regression methods to proof my assumption. I want to k…
compare substrings in same var - same same, but differentHi. I have a problem with a huge list of >19,000 towns. There are > 1,200 towns with duplicat…
Subscribe to:
Post Comments (Atom)
0 Response to Interaction terms giving error "factor variables may not contain noninteger values"
Post a Comment