A general and simple method for obtaining <i>R</i><sup>2</sup> from generalized linear mixed‐effects models Tập 4 Số 2 - Trang 133-142 - 2013
Shinichi Nakagawa, Holger Schielzeth
Summary
The use of both linear and generalized linear mixed‐effects models (LMMs and GLMMs) has become popular not only in social and medical sciences, but also in biological sciences, especially in the field of ecology and evolution. Information criteria, such as Akaike Information Criterion (AIC), are usually presented as model comparison tools for mixed‐effects models.
The presentation of ‘variance explained’ (R2) as a relevant summarizing statistic of mixed‐effects models, however, is rare, even though R2 is routinely reported for linear models (LMs) and also generalized linear models (GLMs). R2 has the extremely useful property of providing an absolute value for the goodness‐of‐fit of a model, which cannot be given by the information criteria. As a summary statistic that describes the amount of variance explained, R2 can also be a quantity of biological interest.
One reason for the under‐appreciation of R2 for mixed‐effects models lies in the fact that R2 can be defined in a number of ways. Furthermore, most definitions of R2 for mixed‐effects have theoretical problems (e.g. decreased or negative R2 values in larger models) and/or their use is hindered by practical difficulties (e.g. implementation).
Here, we make a case for the importance of reporting R2 for mixed‐effects models. We first provide the common definitions of R2 for LMs and GLMs and discuss the key problems associated with calculating R2 for mixed‐effects models. We then recommend a general and simple method for calculating two types of R2 (marginal and conditional R2) for both LMMs and GLMMs, which are less susceptible to common problems.
This method is illustrated by examples and can be widely employed by researchers in any fields of research, regardless of software packages used for fitting mixed‐effects models. The proposed method has the potential to facilitate the presentation of R2 for a wide range of circumstances.
phytools: an R package for phylogenetic comparative biology (and other things) Tập 3 Số 2 - Trang 217-223 - 2012
Liam J. Revell
Summary1. Here, I present a new, multifunctional phylogenetics package, phytools, for the R statistical computing environment.2. The focus of the package is on methods for phylogenetic comparative biology; however, it also includes tools for tree inference, phylogeny input/output, plotting, manipulation and several other tasks.3. I describe and tabulate the major methods implemented in phytools, and in addition provide some demonstration of its use in the form of two illustrative examples.4. Finally, I conclude by briefly describing an active web‐log that I use to document present and future developments for phytools. I also note other web resources for phylogenetics in the R computational environment.
<scp>ggtree</scp>: an <scp>r</scp> package for visualization and annotation of phylogenetic trees with their covariates and other associated data Tập 8 Số 1 - Trang 28-36 - 2017
Guangchuang Yu, David K. Smith, Huachen Zhu, Yi Guan, Tommy Tsan‐Yuk Lam
Summary
We present an r package, ggtree, which provides programmable visualization and annotation of phylogenetic trees.
ggtree can read more tree file formats than other softwares, including newick, nexus, NHX, phylip and jplace formats, and support visualization of phylo, multiphylo, phylo4, phylo4d, obkdata and phyloseq tree objects defined in other r packages. It can also extract the tree/branch/node‐specific and other data from the analysis outputs of beast, epa, hyphy, paml, phylodog, pplacer, r8s, raxml and revbayes software, and allows using these data to annotate the tree.
The package allows colouring and annotation of a tree by numerical/categorical node attributes, manipulating a tree by rotating, collapsing and zooming out clades, highlighting user selected clades or operational taxonomic units and exploration of a large tree by zooming into a selected portion.
A two‐dimensional tree can be drawn by scaling the tree width based on an attribute of the nodes. A tree can be annotated with an associated numerical matrix (as a heat map), multiple sequence alignment, subplots or silhouette images.
The package ggtree is released under the artistic‐2.0 license. The source code and documents are freely available through bioconductor (http://www.bioconductor.org/packages/ggtree).
Simple means to improve the interpretability of regression coefficients Tập 1 Số 2 - Trang 103-113 - 2010
Holger Schielzeth
Summary 1. Linear regression models are an important statistical tool in evolutionary and ecological studies. Unfortunately, these models often yield some uninterpretable estimates and hypothesis tests, especially when models contain interactions or polynomial terms. Furthermore, the standard errors for treatment groups, although often of interest for including in a publication, are not directly available in a standard linear model. 2. Centring and standardization of input variables are simple means to improve the interpretability of regression coefficients. Further, refitting the model with a slightly modified model structure allows extracting the appropriate standard errors for treatment groups directly from the model. 3. Centring will make main effects biologically interpretable even when involved in interactions and thus avoids the potential misinterpretation of main effects. This also applies to the estimation of linear effects in the presence of polynomials. Categorical input variables can also be centred and this sometimes assists interpretation. 4. Standardization (z‐transformation) of input variables results in the estimation of standardized slopes or standardized partial regression coefficients. Standardized slopes are comparable in magnitude within models as well as between studies. They have some advantages over partial correlation coefficients and are often the more interesting standardized effect size. 5. The thoughtful removal of intercepts or main effects allows extracting treatment means or treatment slopes and their appropriate standard errors directly from a linear model. This provides a simple alternative to the more complicated calculation of standard errors from contrasts and main effects. 6. The simple methods presented here put the focus on parameter estimation (point estimates as well as confidence intervals) rather than on significance thresholds. They allow fitting complex, but meaningful models that can be concisely presented and interpreted. The presented methods can also be applied to generalised linear models (GLM) and linear mixed models.
<scp>BORIS</scp>: phần mềm ghi nhật ký sự kiện đa năng, mã nguồn mở miễn phí cho việc mã hóa video/âm thanh và quan sát trực tiếp Tập 7 Số 11 - Trang 1325-1330 - 2016
Olivier Friard, Marco Gamba
Tóm tắt Các khía cạnh định lượng trong nghiên cứu hành vi của động vật và con người ngày càng trở nên quan trọng để kiểm tra các giả thuyết và tìm kiếm sự hỗ trợ thực nghiệm cho chúng. Đồng thời, máy ảnh và máy quay video có thể lưu trữ một số lượng lớn các bản ghi video và thường được sử dụng để giám sát đối tượng từ xa. Các nhà nghiên cứu thường gặp phải nhu cầu mã hóa một lượng lớn các bản ghi video với phần mềm tương đối linh hoạt, thường bị giới hạn bởi các tùy chọn cụ thể của từng loài hoặc các cài đặt chính xác. BORIS là một chương trình miễn phí, mã nguồn mở và đa nền tảng cho phép thiết lập một môi trường mã hóa phù hợp với người dùng để xem lại video đã ghi hoặc quan sát trực tiếp dựa trên máy tính. Chương trình này cho phép người dùng thiết lập một sơ đồ dự án dựa trên tập hợp hành vi có thể được chia sẻ với các cộng tác viên, hoặc có thể được nhập khẩu hoặc chỉnh sửa. Các dự án được tạo trong BORIS có thể bao gồm một danh sách các quan sát, và mỗi quan sát có thể bao gồm một hoặc hai video (ví dụ: theo dõi đồng thời kích thích thị giác và đối tượng được kiểm tra; ghi âm từ các phía khác nhau của một bể cá). Một khi người sử dụng đã thiết lập sơ đồ hành vi, bao gồm sự kiện trạng thái hoặc điểm, hoặc cả hai, mã hóa có thể được thực hiện bằng các phím đã được chỉ định trước trên bàn phím máy tính. BORIS cho phép định nghĩa số lượng không giới hạn các sự kiện (trạng thái/sự kiện điểm) và đối tượng. Sau khi quá trình mã hóa hoàn thành, chương trình có thể trích xuất ngân sách thời gian hoặc các quan sát đơn hoặc nhóm tự động và trình bày tóm tắt sơ lược về các đặc điểm hành vi chính. Dữ liệu quan sát và phân tích ngân sách thời gian có thể được xuất ra nhiều định dạng thông thường (TSV, CSV, ODF, XLS, SQL và JSON). Các sự kiện đã quan sát có thể được vẽ và xuất ra dưới nhiều định dạng đồ họa khác nhau (SVG, PNG, JPG, TIFF, EPS và PDF).
#BORIS #mã nguồn mở #quan sát hành vi #mã hóa video #phần mềm đa nền tảng #phân tích ngân sách thời gian
betapart: an R package for the study of beta diversity Tập 3 Số 5 - Trang 808-812 - 2012
Andrés Baselga, C. David L. Orme
Summary1. Beta diversity, that is, the variation in species composition among sites, can be the result of species replacement between sites (turnover) and species loss from site to site (nestedness).2. We present betapart, an R package for computing total dissimilarity as Sørensen or Jaccard indices, as well as their respective turnover and nestedness components.3. betapart allows the assessment of spatial patterns of beta diversity using multiple‐site dissimilarity measures accounting for compositional heterogeneity across several sites or pairwise measures providing distance matrices accounting for the multivariate structure of dissimilarity.4. betapart also allows computing patterns of temporal difference in assemblage composition, and its turnover and nestedness components.5. Several example analyses are shown, using the data included in the package, to illustrate the relevance of separating the turnover and nestedness components of beta diversity to infer different mechanisms behind biodiversity patterns.
geomorph: an<scp>r</scp>package for the collection and analysis of geometric morphometric shape data Tập 4 Số 4 - Trang 393-399 - 2013
Dean C. Adams, Erik Otárola‐Castillo
SummaryMany ecological and evolutionary studies seek to explain patterns of shape variation and its covariation with other variables. Geometric morphometrics is often used for this purpose, where a set of shape variables are obtained from landmark coordinates following aProcrustes superimposition.We introduce geomorph: a software package for performing geometric morphometric shape analysis in therstatistical computing environment.Geomorph provides routines for all stages of landmark‐based geometric morphometric analyses in two and three‐dimensions. It is an open source package to read, manipulate, and digitize landmark data, generate shape variables viaProcrustes analysis for points, curves and surfaces, perform statistical analyses of shape variation and covariation, and to provide graphical depictions of shapes and patterns of shape variation. An important contribution of geomorph is the ability to performProcrustes superimposition on landmark points, as well as semilandmarks from curves and surfaces.A wide range of statistical methods germane to testing ecological and evolutionary hypotheses of shape variation are provided. These include standard multivariate methods such as principal components analysis, and approaches for multivariate regression and group comparison. Methods for more specialized analyses, such as for assessing shape allometry, comparing shape trajectories, examining morphological integration, and for assessing phylogenetic signal, are also included.Several functions are provided to graphically visualize results, including routines for examining variation in shape space, visualizing allometric trajectories, comparing specific shapes to one another and for plotting phylogenetic changes in morphospace.Finally, geomorph participates to make available advanced geometric morphometric analyses through therstatistical computing platform.
<scp>ENM</scp>eval: An R package for conducting spatially independent evaluations and estimating optimal model complexity for <scp>Maxent</scp> ecological niche models Tập 5 Số 11 - Trang 1198-1205 - 2014
Robert Muscarella, Peter J. Galante, Mariano Soley‐Guardia, Robert A. Boria, Jamie M. Kass, María Uriarte, Robert P. Anderson
Summary
Recent studies have demonstrated a need for increased rigour in building and evaluating ecological niche models (ENMs) based on presence‐only occurrence data. Two major goals are to balance goodness‐of‐fit with model complexity (e.g. by ‘tuning’ model settings) and to evaluate models with spatially independent data. These issues are especially critical for data sets suffering from sampling bias, and for studies that require transferring models across space or time (e.g. responses to climate change or spread of invasive species). Efficient implementation of procedures to accomplish these goals, however, requires automation.
We developed ENMeval, an R package that: (i) creates data sets for k‐fold cross‐validation using one of several methods for partitioning occurrence data (including options for spatially independent partitions), (ii) builds a series of candidate models using Maxent with a variety of user‐defined settings and (iii) provides multiple evaluation metrics to aid in selecting optimal model settings. The six methods for partitioning data are n−1 jackknife, random k‐folds ( = bins), user‐specified folds and three methods of masked geographically structured folds. ENMeval quantifies six evaluation metrics: the area under the curve of the receiver‐operating characteristic plot for test localities (AUCTEST), the difference between training and testing AUC (AUCDIFF), two different threshold‐based omission rates for test localities and the Akaike information criterion corrected for small sample sizes (AICc).
We demonstrate ENMeval by tuning model settings for eight tree species of the genus Coccoloba in Puerto Rico based on AICc. Evaluation metrics varied substantially across model settings, and models selected with AICc differed from default ones.
In summary, ENMeval facilitates the production of better ENMs and should promote future methodological research on many outstanding issues.