Hot answers tagged

20

Q1 Ecologists talk of gradients all the time. There are lots of kinds of gradients, but it may be best to think of them as some combination of whatever variable(s) you want or are important for the response. So a gradient could be time, or space, or soil acidity, or nutrients, or something more complex such as a linear combination of a range of variables ...


19

As @amoeba mentioned in the comments, PCA will only look at one set of data and it will show you the major (linear) patterns of variation in those variables, the correlations or covariances between those variables, and the relationships between samples (the rows) in your data set. What one normally does with a species data set and a suite of potential ...


12

While getting an analogue of "proportion variance explained by each effect" is in principle possible for GLMMs, there are several complicating factors (which levels of the model do you consider "total variance", and how do you quantify the sampling variation due to the lowest-level [Binomial in this case] sampling distribution)? Nakagawa and Schielzeth (doi:...


11

First off, methods such as ANOVA and Kruskal-Wallis pay no attention to the circular nature of data such as yours. It's not clear how you imagine applying either, but if you intend to regard direction as a categorical predictor, you would be ignoring any structure to the measurement scale other than the directions being different. More generally, note that ...


11

Can I test for correlation between variables before standardize them? I am not quite sure what should I do first. Correlation will be the same regardless whether you calculate it before or after standardization. To see this, it is enough to know that correlation is invariant to scale. Take $b \in \mathbb{R}$ and $a>0$, then $$ \begin{aligned} \text{Corr}...


10

I think what you probably want is (Shannon's) entropy. It is calculated like this: $$ H(x) = -\sum_{x_i} p(x_i)\log_2 p(x_i) $$ This represents a way of thinking about the amount of information in a categorical variable. In R, we can calculate this as follows: City = c("Moscow", "Moscow", "Paris", "London", "London", "London", "NYC", "...


9

You can "fit" the model to different data and then simulate: m2 <- Arima(z,model=m1) simulate.Arima(m2,future=TRUE,bootstrap=TRUE) m2 will have the same parameters as m1 (they are not re-estimated), but the residuals, etc., are computed on the new data. However, I am concerned with your model. Seasonal models are for when the seasonality is fixed and ...


9

The sum of the squares of the fractions (to let your text align with your arithmetic) is indeed a much re-discovered or re-invented measure of the concentration of distributions divided into distinct categories. It is now in its second century at least, allowing a little latitude to include under the same umbrella its complement and its reciprocal: all ...


8

Some good books that I would personally recommend are: Hilborn & Mangel (1997) The Ecological Detective: confronting models with data. Princeton University Press. This one is more about statistics with ecological examples, but there is nothing wrong about that. This would give a good flavour of how statistics could be used in ecology. Note the date; it ...


8

No book is going to tell you which variable to include and which to exclude. You should have done necessary background research before doing your fieldwork to get an idea of which variables to measure. You could have based those variables on the species life history and/or previous research. Once variables were selected, it is good practice to do a lot of ...


7

The function MuMIn::dredge simply returns a list of models with every possible combination of predictor variable. As for your results, allow me to disagree with what you said: I understand that model 2 is the best model and shows lND to have a negative effect on diversity. that's partially right, 1ND indeed has a negative effect on diversity, but from ...


6

This is actually an extremely sophisticated problem and a tough ask from your lecturer! In terms of how you organise your data, a 1070 x 10 rectangle is fine. For example, in R: > conflict.data <- data.frame( + confl = sample(0:1, 1070, replace=T), + country = factor(rep(1:107,10)), + period = factor(rep(1:10, rep(107,10))), + landdeg = sample(c("...


6

It is almost never a good idea to use a Poisson distribution (or any other single parameter distribution) for modelling --- this distribution fixes the variance in relation to the mean, which means that the model does not allow the estimated variability to conform to the data. For this type of data, you should use a negative binomial model instead. This is ...


6

Function glmer() uses by default the Laplace approximation, which is not optimal for dichotomous data. A better alternative is the adaptive Gaussian quadrature. You can use this method by setting argument nAGQ of glmer() to a higher number (e.g., 11 or 15) or alternatively using the GLMMadaptive package. In your example, it gives: library("GLMMadaptive") ...


5

For multivariate techniques and many examples on Ecology you can have a look at: Numerical Ecology By Pierre Legendre, Louis Legendre Numerical Ecology with R Data Analysis in Community and Landscape Ecology By R. H. G. Jongman, C. J. F. Ter Braak, O. F. R. van Tongeren You can run all procedures on r, but also a nice software for multivariate analysis ...


5

You will first need to get a working similarity measure. You can't just throw these attributes together and hope that Euclidean distance on the vector will work. It won't. K-means is only appropriate for Euclidean distance. It relies on the means to minimize variance, otherwise it may not converge. Plus, it doesn't work well with many attributes (dimensions)...


5

The Hellinger transformation is defined as $$ y^{\prime}_{ij} = \sqrt{\frac{y_{ij}}{y_{i.}}} $$ Where $j$ indexes the species, $i$ the site/sample, and $i.$ is the row sum for the $i$th sample. If your data are already of the form $\frac{y_{ij}}{y_{i.}}$, but you've only taken a subset of the species, then yes, you can just apply a square root ...


5

The Gamma distribution has support on non-negative real numbers, i.e. it is for continuous data between 0 and $+\infty$. The Poisson has support on the the non-negative integer numbers. We normally record abundance as numbers of individuals, a count, and therefore a discrete distribution like the Poisson would be a reasonable starting point for modelling. ...


5

Yes, verifying the correlations between your explanatory variables is part of the data exploration as suggested in Zuur et al. (2010) A protocol for data exploration to avoid common statistical problems. This should be done before you standardize them and construct your GLMMs. However, I'm not sure how it would affect the correlations if you standardized ...


4

Yes If they are on different scales you logically cannot compare them. Had the transformations all been the same you could since the power transform is monotonic. However the sample variance changes because of the transformation and that would need to be accounted for. But in your situation you cannot compare them.


4

Jack Weiss (may he rest in peace) was an excellent trained statistician that also really had a good grasp on ecological/environmental principles. He served as an invaluable statistics consultant to ecological/environmental scientists throughout the US and even globally. Although he doesn't have any books that I'm aware of, his course notes are still ...


4

Some good ecology books based in Bayesian statistics are: Kery, M. 2010. Introduction to WinBUGS for Ecologists: Bayesian approach to regression, ANOVA, mixed models and related analyses. Academic Press. Kery, M., and M. Schaub. 2011. Bayesian Population Analysis using WinBUGS: A hierarchical perspective. Academic Press. Royle, J.A. and R.M. Dorazio. ...


4

There is recent work showing that collinearity becomes a more serious problem (inflating the variance of estimated regression coefficients, and therefore not necessarily finding the 'significant' ones correctly) at r>0.7; Dormann, C. F., J. Elith, S. Bacher, et al. 2013. Collinearity: a review of methods to deal with it and a simulation study evaluating ...


4

+1 to both answers but just to state the obvious: Linear correlation is defined as the scaled version of the covariance between two variables. The scaling itself is simply the product of the standard deviations of the two variables. Therefore, standardising (or any linear transformation of the variables examined for that matter) will not change the ...


4

If I understand correctly, it depends on whether a twin's score is similar to their co-twin's score. If this is the case, you have violated the independence assumption, and your p-value will not be correct. Think of an extreme example: Twins always have the same score as their co-twin. If this is the case, you don't have a sample where n = 88, your sample ...


3

The best books for approaching model selection issues like this are by Zuur et al: #1) Analyzing ecological data (Zuur et al 2007) #2) Mixed models and extension in R (Zuur et al 2009) Book #1 Contains many case studies, including some on birds, and discusses choosing an appropriate model, model selection with AIC and AICc, and model validation. Book #2 ...


3

Perhaps I misunderstand, but the paper you link to has an R package that implements CPCA in R as used in the paper. Ben Bolker contributes here but IIRC he has moved from Florida now so the web link in the paper is dead. Ben is now at McMaster and you can find the latest version of that package here: http://www.math.mcmaster.ca/~bolker/R/ look for the /bin ...


3

As Michael Chernick pointed out, the scaled beta distribution makes the best sense for this. However, for all practical purposes, and expecting that you will NEVER get the model perfectly right, you would be better off just modeling the mean via nonlinear regression according to your logistic growth equation and wrapping this up with standard errors that are ...


3

You wrote I would thus like to create the ratios: sum(spj)/sum(spj), where spj refers to one of the species. Here, both the numerator and denominator can be any possible combination of all species. No. You don't want to do this. 15 species may be combined in $2^{15}$ ways. That is in your numerator and denominator. You will then have $2^{30}$ ratios ...


3

I think the most appropriate summary for this application is just to simply state that the years were 15% different, ± some uncertainty. Here's why: first, the concept of statistical significance per se doesn't fit naturally into the Bayesian framework; second, in this application it's not really plausible that the parameter takes the exact same value in the ...


Only top voted, non community-wiki answers of a minimum length are eligible