title: nlme fit : vcov versus summary
body: <p>I have fitted a model using <code>nlme()</code> from the <code>package nlme</code>.</p>
  
  <p>Now I wish to simulate some prediction intervals, taking into account parameter uncertainty.</p>
  
  <p>To this end, I need to extract the variance matrix for the fixed effects.</p>
  
  <p>As far as I am aware, there are two ways of doing this:</p>
  
  <pre><code>vcov(fit)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>summary(fit)$varFix
  </code></pre>
  
  <p>These two give the same matrix.</p>
  
  <p>However, if I inspect</p>
  
  <pre><code>diag(vcov(fit))^.5
  </code></pre>
  
  <p>it is NOT the same as the reported Std Error in <code>summary(fit)</code></p>
  
  <p>Am I wrong to expect these two to be the same?</p>
  
  <p>Edit: Here is a code example</p>
  
  <pre><code>require(nlme)
  
  f=expression(exp(-a*t))
  a=c(.5,1.5)
  pts=seq(0,4,by=.1)
  
  sim1=function(t) eval(f,list(a=a[1],t))+rnorm(1)*.1
  y1=sapply(pts,sim1)
  
  sim2=function(t) eval(f,list(a=a[2],t))+rnorm(1)*.1
  y2=sapply(pts,sim2)
  
  y=c(y1,y2)
  t=c(pts,pts)
  batch=factor(rep(1:2,82))
  d=data.frame(t,y,batch)
  
  nlmeFit=nlme(y~exp(-a*t),
    fixed=a~1,
    random=a~1|batch,
    start=c(a=1),
    data=d
    )
  
  vcov(nlmeFit)
  summary(nlmeFit)$varFix
  vcov(nlmeFit)^.5
  summary(nlmeFit)
  </code></pre>