title: Wald Chi-Squared Test between two variable in one mixed effect model in r
body: <p>I tried to finish a homework in longitudinal data analysis. 
  the question is to compare the difference in the cross-sectional and longitudinal effects of age (baseline cross-sectional:baseage, longtitudinal age: agechange) within a model. </p>
  
  <p>the model I code like:
  fit&lt;-lme(logfev1~baseage+agechange+height,random = ~1|id,correlation=corAR1(form=~visit|id),logfev1)</p>
  
  <p>In Stata we just need to code like : test baseage=agechange, then the answer will shows:
   test baseage = change_age</p>
  
  <pre><code>[logfev1]baseage - [logfev1]change_age = 0
  
         chi2(  1) =    0.41
       Prob &gt; chi2 =    0.5244
  </code></pre>
  
  <p>but in R I really don't know how to do the test (wald test).</p>