title: Calculating partial correlation adjusted for a categorical variable
body: <p>I am trying to compute a partial correlation in R in between 2 continuous variables adjusted for a categorical variable with 3 levels.</p>
  
  <pre><code>A        B        Category
  146.0    315.71   Level 1
  66.73    301.22   Level 2
  2487.07  115.94   Level 3
  .        .        .
  .        .        .
  </code></pre>
  
  <p>The function pcor.test in package "ppcor" requires all the variables being numeric, i.e.:</p>
  
  <pre><code>pcor.test(x, y, z, method = c("pearson", "kendall", "spearman"))
  </code></pre>
  
  <p>How I can calculate partial correlation using categorical variables for adjustment?</p>