Dear all,

i want to create a marginsplot of the variables returnoninvestment and pat_yr but I got two types of errors. Trying this code:

Code:
margins returnoninvestment#pat_yr
I got the error "factor variables may not contain noninteger values'' (gives the error for both variables) so I tried to solve it using this code:

Code:
margins c.returnoninvestment#c.pat_yr
I got the error "only factor variables and their interactions are allowed"

Could someone help me how to fix these errors?