title: How to select starting value for covariates in NLME
body: <pre><code>library(nlme)
  Loblolly$age2 &lt;- as.factor(ifelse(Loblolly$age &lt; 12.5, 0, 1))
  </code></pre>
  
  <p>Here I define a binary covariate that I'm interested in.</p>
  
  <pre><code>model &lt;- nlme(height ~ (R0) + 1,
                 data = Loblolly,
                 fixed = list(R0 ~ 1 + (age2)),
                 random = list(Seed = pdDiag(list(R0 ~ 1))),
                 start = list(fixed = c(R0 = -8.5, age2 = 1)))
  </code></pre>
  
  <p>Running this gives me the error, </p>
  
  <pre><code>Error in nlme.formula(height ~ (R0) + 1, data = Loblolly, fixed = list(R0 ~  : 
    step halving factor reduced below minimum in PNLS step
  </code></pre>
  
  <p>After changing the starting values, it works fine.</p>
  
  <pre><code>model2 &lt;- nlme(height ~ (R0) + 1,
                 data = Loblolly,
                 fixed = list(R0 ~ 1 + (age2)),
                 random = list(Seed = pdDiag(list(R0 ~ 1))),
                 start = list(fixed = c(R0 = 0, age2 = 30)), verbose=TRUE)
  </code></pre>
  
  <p>What are some ways of selecting starting values for <code>age2</code>? I thought about fitting a nonlinear least squares model using <code>nls2</code> but that requires specifying a set of starting values as well.</p>
  
  <p>I was thinking maybe I could plot the data, <code>height ~ age2</code>, but since <code>age2</code> is binary...I'm not sure how to go about it. </p>