title: Dummy coding a variable as a factor? Cannot seem to work with a package
body: <p>Trying to use a more obscure package in my field of study. I am attempting to add a matrix of predictor variables. Wording in the package is as follows:</p>
  <p>&quot;An optional matrix of predictor variables for the time-intensity
  parameters, where the columns represent the predictor variables. Cat-
  egorical predictor variables need to be dummy coded.&quot;</p>
  <p>Thus I convert into factors/characters which gives the following error which I attempt to solve in the code chunk (Xit_form being a 18x2 matrix of categorical variables)</p>
  <p>&quot;Error in crossprod(x, y) :
  requires numeric/complex matrix/vector arguments &quot;</p>
  <pre><code>xit_form[,1] &lt;- as.factor(xit_form[,1])
  xit_form[,2] &lt;- as.factor(xit_form[,2])
  mode(xit_form) &lt;- &quot;numeric&quot;
  </code></pre>
  <p>however when i run this, the package does not seem to be treating it as a factor. Any way I can solve this?</p>