An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20090609/94ac5fc7/attachment.pl>
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:
I fitted a mixed-effects model with a Variance Structure in nlme (because Variance Structures are not yet implemented in lme4). After several model fittings (with method="ML"), I found the optimal fixed structure of my explanatory variables. I understood from this mailing list that the p-values of the fixed effects, given by summary(namemodel) are not trustable and thus I want to use a Monte Carlo simulation in order to estimate the significance of the fixed terms. This command doesn't exist in nlme, and I can't fit my model in lme4. Is there a way to overcome this problem? Or another function in nlme that gives comparable results?
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:
I fitted a mixed-effects model with a Variance Structure in nlme (because Variance Structures are not yet implemented in lme4). After several model fittings (with method="ML"), I found the optimal fixed structure of my explanatory variables. I understood from this mailing list that the p-values of the fixed effects, given by summary(namemodel) are not trustable and thus I want to use a Monte Carlo simulation in order to estimate the significance of the fixed terms. This command doesn't exist in nlme, and I can't fit my model in lme4. Is there a way to overcome this problem? Or another function in nlme that gives comparable results? Thanks a lot, Sebastiaan Sebastiaan De Smedt Research assistant UA - Department of Bioscience Engineering Groenenborgerlaan 171 - V6.16 B-2020 Antwerpen, Belgium +32 (0)3 265 34 51 [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Ben Bolker Associate professor, Biology Dep't, Univ. of Florida bolker at ufl.edu / www.zoology.ufl.edu/bolker GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20090610/18bc6004/attachment.pl>