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"
Merge mulitple .csv filesI am using Stata 16.1 MP to merge six .csv files on neonatal, infant, and child mortality. I would l…
Finding and plotting the trend of the weighted average of variable Code: * Example generated by -dataex-. To install: ssc install dataex clear input double total_asse…
Creating categorical summary values for cities annually, weighted/unweightedHi guys. New to running Stata for large groups. I'm working with IPUMs American Community Survey Da…
Remove part of a Text in observationHi guys, Below is a sample of my data. I would like to remove the "-TOT RETURN IND" in all the obser…
xtivreg2 export first and second stage resultsAs the description of xtivreg2 says, it is the wrapper of ivreg2. But the "savefirst“ option of ivre…
Subscribe to:
Post Comments (Atom)
0 Response to Interaction terms giving error "factor variables may not contain noninteger values"
Post a Comment