title: Multiplying a categorical variable with a dummy in regression
body: <p>I am trying to run a regression that has scores regressed with a female dummy ( taking a value of 0 or 1) and I also have country for that female. I am trying to create a fixed effect on the regression where I have female interacted with country, but every method I try does not work since I am multiplying numeric with a factor</p>
  
  <p>I have tried using fastdummies, but that did not work. I also tried using country-1 method, and trying to multiply with female with no success. </p>
  
  <pre><code>#first wrong
  olss1= lm(pv1math ~ female + I(ggi*female) + factor(country) +  factor(year) + I(female * factor(country)), data = f1)
  # second wrong
  olss1= lm(pv1math ~ female + I(ggi*female) + factor(country) +  factor(year) + factor( female * country ), data = f1)
  
  </code></pre>
  
  <p>Error messages are that I cannot multiply factor with numeric</p>