Skip to content

mcmcsamp in lme4

4 messages · De Smedt Sebastiaan, Robert A LaBudde, Ben Bolker +1 more

#
At 10:55 AM 6/9/2009, De Smedt Sebastiaan wrote:
Try intervals(fit) in 'nlme'.

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ral at lcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"
#
There is indeed a simulate.lme() function in nlme:
can you use this to construct a Monte Carlo simulation?
i.e. (pseudocode)

 fit full model (model1)
 fit appropriate reduced model (model0)

 N times (using replicate() or a for loop) {
     simulate from reduced model, using simulate.lme(model0);
         pack it back into a copy of the original data frame
     fit full model [in lme4 there is a "refit" method that is
        more efficient, but apparently not in nlme]
            to simulated (null data)
     fit reduced model (minus one or more fixed terms), ditto
     compute/save deviance difference between full and reduced model
       as results[i]
}

compare observed deviance difference to simulated distribution:

 mean(c(results,obsdev)>=obsdev)

  cheers
    Ben
De Smedt Sebastiaan wrote: