Hello,
for my master thesis I want to test interaction effects between different personality traits. I think I know the basic code how to do them (
).
DV = populist attitude
IV = Big Five Personality traits (additive indices (scale 1 to 10) eg.
)
My problem is this: I want to test interactions between two additive indices. If I try to do the interaction, stata tells me “factor variables may not contain noninteger values". Since my additive indices contain noninteger values, I don't know what to do to avoid the problem. I tried adding c. in front of IV1 and IV2, but I'm not sure if this is the right thing to do. If I ad i. the same error appears.
I did a lot of research, but cannot solve the problem so far. I did try to find out which type of variable my additive indices are, but if I type describe (this is what most people suggested online to find out the type of variable) it just says storage type = float. Or is the type “factor variable" because stata says so in the error message?
I thought that the problem may be that i don't add the right operator (i. or c.). I also tried (based on my research) to change the storage type from “float" to “byte", but that didn't work out either.
My questions are:
- is it possible to do interaction effects with additive indices?
- how do I know which type of variable I have (continous, factor, categorical, string) and which operator to use (i. or c.)?
I would be really greatful if anyone has tipps for me on how to do it or maybe even knows what I'm doing wrong.
Thank you all in advance!
Vera
for my master thesis I want to test interaction effects between different personality traits. I think I know the basic code how to do them (
Code:
reg DV IV1##IV2
DV = populist attitude
IV = Big Five Personality traits (additive indices (scale 1 to 10) eg.
Code:
egen extraversion=rowmean(talkative sociable notreserved)
My problem is this: I want to test interactions between two additive indices. If I try to do the interaction, stata tells me “factor variables may not contain noninteger values". Since my additive indices contain noninteger values, I don't know what to do to avoid the problem. I tried adding c. in front of IV1 and IV2, but I'm not sure if this is the right thing to do. If I ad i. the same error appears.
I did a lot of research, but cannot solve the problem so far. I did try to find out which type of variable my additive indices are, but if I type describe (this is what most people suggested online to find out the type of variable) it just says storage type = float. Or is the type “factor variable" because stata says so in the error message?
I thought that the problem may be that i don't add the right operator (i. or c.). I also tried (based on my research) to change the storage type from “float" to “byte", but that didn't work out either.
My questions are:
- is it possible to do interaction effects with additive indices?
- how do I know which type of variable I have (continous, factor, categorical, string) and which operator to use (i. or c.)?
I would be really greatful if anyone has tipps for me on how to do it or maybe even knows what I'm doing wrong.
Thank you all in advance!
Vera
Comment