title: Linear regression with interaction fails in the rms-package
body: <p>I'm playing around with interaction in the formula. I wondered if it's possible to do a regression with interaction for one of the two dummy variables. This seems to work in regular linear regression using the lm() function but with the ols() function in the rms package the same formula fails. Anyone know why?</p>
  
  <p><strong>Here's my example</strong></p>
  
  <pre><code>data(mtcars)
  
  mtcars$gear &lt;- factor(mtcars$gear)
  regular_lm &lt;- lm(mpg ~ wt + cyl + gear + cyl:gear, data=mtcars)
  summary(regular_lm)
  
  regular_lm &lt;- lm(mpg ~ wt + cyl + gear + cyl:I(gear == "4"), data=mtcars)
  summary(regular_lm)
  </code></pre>
  
  <p>And now the rms example</p>
  
  <pre><code>library(rms)
  
  dd &lt;- datadist(mtcars)
  options(datadist = "dd")
  
  regular_ols &lt;- ols(mpg ~ wt + cyl + gear + cyl:gear, data=mtcars)
  regular_ols
  
  # Fails with:
  #     Error in if (!length(fname) || !any(fname == zname)) { : 
  #         missing value where TRUE/FALSE needed
  regular_ols &lt;- ols(mpg ~ wt + cyl + gear + cyl:I(gear == "4"), data=mtcars)
  </code></pre>
  
  <p>This experiment might not be the wisest statistic to do as it seems that the estimates change significantly but I'm a little curious to why ols() fails since it should do the "same fitting routines used by lm"</p>