title: how to run panel var regression model with categorical independent variables?
body: <p>This is my dataset:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>CUSTOMER_ID</th>
  <th>YEAR_MONTH</th>
  <th>GENDER</th>
  <th>LEGAL</th>
  <th>AGE</th>
  <th>AMOUNT_SPENT</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>202001</td>
  <td>MALE</td>
  <td>0</td>
  <td>29</td>
  <td>1500</td>
  </tr>
  <tr>
  <td>1</td>
  <td>202002</td>
  <td>MALE</td>
  <td>0</td>
  <td>29</td>
  <td>1700</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td></td>
  </tr>
  <tr>
  <td>2</td>
  <td>202001</td>
  <td>FEMALE</td>
  <td>1</td>
  <td>43</td>
  <td>75000</td>
  </tr>
  <tr>
  <td>2</td>
  <td>202002</td>
  <td>FEMALE</td>
  <td>1</td>
  <td>43</td>
  <td>745000</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td></td>
  </tr>
  <tr>
  <td>3</td>
  <td>202001</td>
  <td>MALE</td>
  <td>0</td>
  <td>50</td>
  <td>1800</td>
  </tr>
  <tr>
  <td>3</td>
  <td>202002</td>
  <td>MALE</td>
  <td>0</td>
  <td>50</td>
  <td>1950</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>gender and legal fields are categorical and it seems next month's amount spent depends on previous months' values. it seems the best model to describe my model is panel var.
  the summerized  panel var model in R package is like this:
  y(i,t) = μ(i) + ∑A(yi,t-l) + Bx(i,t) + Cs(i,t)+ ε(i,t)</p>
  <p>But all the examples are for continuous variables but all my independent variables are categorical.
  Do you know how to run this regression in R?</p>