title: Adding covariates to nlme model in R
body: <p>I've recently started learning to fit data using the <code>nlme</code> model. I was wondering if there was a more logical way of generating all possible combinations of covariates (for the variables <code>asy</code> and <code>int</code>) in the nlme model below:</p>
  
  <pre><code>fmzeta.nlme &lt;- nlme(
                 z ~ asy - (asy - int)*exp(-c*t), 
                 fixed = list(asy ~ age + wfa + vl,
                              int ~ age + wfa + vl, c ~ 1),
                 random = int + asy ~ 1,
                 start = c(-1, 0, -2, 0, 0, 0, 0, 0, 0.03),
                 data = DATA)
  </code></pre>
  
  <p>As you can see there are three covariates for the two variables asy and int. I would like to generate all possible combinations of covariates and then look for the model that has the best fit. I haven't found any topic related to this so far so I would appreciate any helpful ideas.
  Could someone also tell me how to make the r code appear properly in a post?</p>
  
  <p>Thanks</p>