scispace - formally typeset
Search or ask a question
Journal ArticleDOI

Fitting Linear Mixed-Effects Models Using lme4

07 Oct 2015-Journal of Statistical Software (Foundation for Open Access Statistics)-Vol. 67, Iss: 1, pp 1-48
TL;DR: In this article, a model is described in an lmer call by a formula, in this case including both fixed-and random-effects terms, and the formula and data together determine a numerical representation of the model from which the profiled deviance or the profeatured REML criterion can be evaluated as a function of some of model parameters.
Abstract: Maximum likelihood or restricted maximum likelihood (REML) estimates of the parameters in linear mixed-effects models can be determined using the lmer function in the lme4 package for R. As for most model-fitting functions in R, the model is described in an lmer call by a formula, in this case including both fixed- and random-effects terms. The formula and data together determine a numerical representation of the model from which the profiled deviance or the profiled REML criterion can be evaluated as a function of some of the model parameters. The appropriate criterion is optimized, using one of the constrained optimization functions in R, to provide the parameter estimates. We describe the structure of the model, the steps in evaluating the profiled deviance or REML criterion, and the structure of classes or types that represents such a model. Sufficient detail is included to allow specialization of these structures by users who wish to write functions to fit specialized linear mixed models, such as models incorporating pedigrees or smoothing splines, that are not easily expressible in the formula language used by lmer.

Content maybe subject to copyright    Report

Citations
More filters
Journal ArticleDOI
TL;DR: The influence of level of processing on conscious perception may be mediated by attentional modulation of activity in regions representing features of consciously experienced stimuli in regions of insulo-fronto-parietal regions.

16 citations

Proceedings ArticleDOI
16 Mar 2015
TL;DR: Approaches to ability estimation with respect to missing data and ability estimation are considered using data from a large-enrollment electrical engineering MOOC, with attention to different populations of course participants.
Abstract: Scoring of student item response data from online courses and especially massively open online courses (MOOCs) is complicated by two challenges, potentially large amounts of missing data and allowances for multiple attempts to answer. Approaches to ability estimation with respect to both of these issues are considered using data from a large-enrollment electrical engineering MOOC. The allowance of unlimited multiple attempts sets up a range of observed score and latent-variable approaches to scoring the constructed response homework. With respect to missing data, two classical approaches are discussed, treating omitted items as incorrect or missing at random (MAR). These treatments turn out to have slightly different interpretations depending on the scoring model. In all, twelve different homework scores are proposed based on combinations of scoring model and missing data handling. The scores are computed and correlations between each score and the final exam score are compared, with attention to different populations of course participants.

16 citations

01 Oct 2019
TL;DR: In this paper, the authors conducted a secondary analysis of a randomized trial of malaria prevention in pregnancy conducted in Malawi from July 21, 2011 to March 18, 2013, and found that women with malaria before 24 weeks gestation had a higher risk of preterm birth (24% vs 18%, p=0.005; adjusted relative risk (aRR) 1.30, 95% CI 1.04-1.63, p= 0.02; with an aRR of 1.20-2.
Abstract: Background: Malaria in pregnancy is associated with adverse birth outcomes. However, the underlying mechanisms remain poorly understood. Tight regulation of angiogenic, metabolic and inflammatory pathways are essential for healthy pregnancies. We hypothesized that malaria disrupts these pathways leading to preterm birth (PTB). Methods and Findings: We conducted a secondary analysis of a randomized trial of malaria prevention in pregnancy conducted in Malawi from July 21, 2011 to March 18, 2013. We longitudinally assessed circulating mediators of angiogenic, metabolic and inflammatory pathways during pregnancy in a cohort of HIV negative women (n=1628), with a median age of 21 years [18, 25] and 562 (35%) were primigravid. Pregnancies were ultrasound dated and samples were analyzed at 13-23 weeks (Visit 1), 28-33 weeks (Visit 2), and/or 34-36 weeks (Visit 3). Malaria prevalence was high; 70% (n=1138) had PCR-positive Plasmodium falciparum infection at least once over the course of pregnancy and/or positive placental histology. The risk of delivering preterm in the entire cohort was 20% (n=304/1506). Women with malaria before 24 weeks gestation had a higher risk of PTB (24% vs 18%, p=0.005; adjusted relative risk (aRR) 1.30, 95% CI 1.04-1.63, p=0.021); and those who were malaria positive only before week 24 had an even greater risk of PTB (28% vs 17%, p=0.02; with an aRR of 1.67, 95% CI 1.20-2.30, p=0.002). Using linear mixed effects modeling, malaria before 24 weeks gestation was associated with altered kinetics of inflammatory (CRP, CHI3L1, IL-18BP sTNFRII,), angiogenic (sICAM-1, sEndoglin), and metabolic mediators (Leptin, Angptl3) over the course of pregnancy (χ2 >13.0, p≤0.001 for each). Limitations include being underpowered to assess the impact on non-viable births, being unable to assess women who had not received any anti-malarials, and due to the exposure to antimalarials in the second trimester there were limited numbers of malaria infections late in pregnancy. Conclusions: Current interventions for the prevention of malaria in pregnancy are initiated at the first antenatal visit, usually in the second trimester. In this study, we found that many women are already malaria-infected by their first visit. Malaria infection before 24 weeks gestation was associated with dysregulation of essential regulators of angiogenesis, metabolism and inflammation, and an increased risk of PTB. Preventing malaria earlier in pregnancy may reduce placental dysfunction and thereby improve birth outcomes in malaria-endemic settings.

16 citations

Journal ArticleDOI
TL;DR: All three species have rapidly differentiated between wild and ex situ origins and that effects of relaxed selection, genetic drift, inbreeding depression and adaptation to cultivation conditions in the botanic garden may have played a role in population differentiation, which may be unfavourable for reintroduction into nature.
Abstract: Many botanic gardens keep ex situ collections of rare species to prevent their extinction and to enable their reintroduction into the wild. A potential problem with ex situ collections is that relaxed selection, genetic drift, novel selection and inbreeding may cause rapid loss of adaptation to natural conditions and therefore may hamper success of reintroductions. Here, we investigated whether cultivation in ex situ collections of three threatened species—Trifolium spadiceum, Sisymbrium austriacum and Bromus grossus—influenced trait differentiation. Using plant material from the original source populations and from the ex situ collections, we compared germination characteristics, growth and phenology under different environmental treatments. Trifolium spadiceum showed reduced seed dormancy in the ex situ collection compared to the wild population, whereas germination temperature requirements changed for S. austriacum. Trifolium spadiceum also showed reduced seed viability in the ex situ collection compared to the wild population. All species showed differences in plant growth between the plants from nature and from the botanic garden. Additionally, B. grossus showed advanced flowering time in plants from the botanic garden. These differences may reflect reduced performance or changes in life-history strategies. We conclude that all three species have rapidly differentiated between wild and ex situ origins and that effects of relaxed selection, genetic drift, inbreeding depression and adaptation to cultivation conditions in the botanic garden may have played a role in population differentiation, which may be unfavourable for reintroduction into nature. To explore this further we suggest broader studies across more species, populations and gardens, involving common garden, reciprocal transplant and molecular studies.

16 citations

Journal ArticleDOI
TL;DR: Promoting membership in sport and exercise groups may be a beneficial strategy for supporting sustained physical activity and health among older people.
Abstract: Background: Physical activity tends to decline in older age, despite being key to health and longevity. Previous investigations have focused on demographic and individual factors that predict sustained physical activity. Purpose: To examine whether engaging in physical activity in the context of sport or exercise group membership can protect against age-related physical activity decline. Methods: Drawn from the English Longitudinal Study of Ageing, participants were members of sport or exercise groups aged 50 and over (N = 2015) as well as nonmember controls, who were matched at baseline for age, sex, and physical activity levels (N = 1881). Longitudinal mixed effects models were used to assess the effect of sport or exercise group membership on physical activity and longevity across a 14-year follow-up. Results: Members of sport or exercise groups experienced an attenuated decline in both moderate and vigorous physical activity over a 14-year follow-up compared to physically active matched controls. Sport or exercise group members were also less likely to have died at follow-up, an effect that was mediated through sustained physical activity. Conclusions: Promoting membership in sport and exercise groups may be a beneficial strategy for supporting sustained physical activity and health among older people.

16 citations

References
More filters
Journal Article
TL;DR: Copyright (©) 1999–2012 R Foundation for Statistical Computing; permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and permission notice are preserved on all copies.
Abstract: Copyright (©) 1999–2012 R Foundation for Statistical Computing. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team.

272,030 citations


"Fitting Linear Mixed-Effects Models..." refers background or methods in this paper

  • ...Pinheiro J, Bates D, DebRoy S, Sarkar D, R Core Team (2014). nlme: Linear and Nonlinear Mixed Effects Models....

    [...]

  • ...The lme4 package (Bates, Maechler, Bolker, and Walker 2014a) for R (R Core Team 2015) provides functions to fit and analyze linear mixed models, generalized linear mixed models and nonlinear mixed models....

    [...]

  • ...At present, the main alternative to lme4 for mixed modeling in R is the nlme package (Pinheiro, Bates, DebRoy, Sarkar, and R Core Team 2014)....

    [...]

  • ...R Core Team (2015)....

    [...]

Book
01 Jan 1995
TL;DR: Detailed notes on Bayesian Computation Basics of Markov Chain Simulation, Regression Models, and Asymptotic Theorems are provided.
Abstract: FUNDAMENTALS OF BAYESIAN INFERENCE Probability and Inference Single-Parameter Models Introduction to Multiparameter Models Asymptotics and Connections to Non-Bayesian Approaches Hierarchical Models FUNDAMENTALS OF BAYESIAN DATA ANALYSIS Model Checking Evaluating, Comparing, and Expanding Models Modeling Accounting for Data Collection Decision Analysis ADVANCED COMPUTATION Introduction to Bayesian Computation Basics of Markov Chain Simulation Computationally Efficient Markov Chain Simulation Modal and Distributional Approximations REGRESSION MODELS Introduction to Regression Models Hierarchical Linear Models Generalized Linear Models Models for Robust Inference Models for Missing Data NONLINEAR AND NONPARAMETRIC MODELS Parametric Nonlinear Models Basic Function Models Gaussian Process Models Finite Mixture Models Dirichlet Process Models APPENDICES A: Standard Probability Distributions B: Outline of Proofs of Asymptotic Theorems C: Computation in R and Stan Bibliographic Notes and Exercises appear at the end of each chapter.

16,079 citations

Book
29 Mar 2013
TL;DR: Linear Mixed-Effects and Nonlinear Mixed-effects (NLME) models have been studied in the literature as mentioned in this paper, where the structure of grouped data has been used for fitting LME models.
Abstract: Linear Mixed-Effects * Theory and Computational Methods for LME Models * Structure of Grouped Data * Fitting LME Models * Extending the Basic LME Model * Nonlinear Mixed-Effects * Theory and Computational Methods for NLME Models * Fitting NLME Models

10,715 citations

Book
01 Jan 2006
TL;DR: Data Analysis Using Regression and Multilevel/Hierarchical Models is a comprehensive manual for the applied researcher who wants to perform data analysis using linear and nonlinear regression and multilevel models.
Abstract: Data Analysis Using Regression and Multilevel/Hierarchical Models is a comprehensive manual for the applied researcher who wants to perform data analysis using linear and nonlinear regression and multilevel models. The book introduces a wide variety of models, whilst at the same time instructing the reader in how to fit these models using available software packages. The book illustrates the concepts by working through scores of real data examples that have arisen from the authors' own applied research, with programming codes provided for each one. Topics covered include causal inference, including regression, poststratification, matching, regression discontinuity, and instrumental variables, as well as multilevel logistic regression and missing-data imputation. Practical tips regarding building, fitting, and understanding are provided throughout.

9,098 citations