Preface
Why this book?
About this book
How to contribute
Acknowledgments
I BASIC STATISTICS FOR ECOLOGISTS
1
Introduction to PART I
1.1
Further reading
2
Basics of statistics
2.1
Variables and observations
2.2
Displaying and summarizing data
2.2.1
Histogram
2.2.2
Location and scatter
2.2.3
Correlations
2.2.4
Principal components analyses PCA
2.3
Inferential statistics
2.3.1
Uncertainty
2.3.2
Standard error
2.4
Bayes theorem and the common aim of frequentist and Bayesian methods
2.4.1
Bayes theorem for discrete events
2.4.2
Bayes theorem for continuous parameters
2.4.3
Estimating a mean assuming that the variance is known
2.4.4
Estimating the mean and the variance
2.5
Classical frequentist tests and alternatives
2.5.1
Nullhypothesis testing
2.5.2
Comparison of a sample with a fixed value (one-sample t-test)
2.5.3
Comparison of the locations between two groups (two-sample t-test)
2.6
Comparing frequentist and Bayesian approach - an why we use Bayes
2.7
Summary
3
Data analysis step by step
3.1
Plausibility of data
3.2
Relationships
3.3
Data distribution
3.4
Preparation of explanatory variables
3.5
Data structure
3.6
Define prior distributions
3.7
Fit the model
3.8
Check model
3.9
Model uncertainty
3.10
Present model results
Further reading
4
Probability distributions
4.1
Introduction
4.2
Discrete distributions
4.2.1
Bernoulli distribution
4.2.2
Binomial distribution
4.2.3
Poisson distribution
4.2.4
Negative-binomial distribution
4.3
Continuous distributions
4.3.1
Beta distribution
4.3.2
Normal distribution
4.3.3
Gamma distribution
4.3.4
Cauchy distribution
4.3.5
t-distribution
4.3.6
F-distribution
5
Transformations
5.1
Some R-specific aspects
5.2
First-aid transformations
5.3
Log-transformation with Stahel
5.4
Centering and scaling (z-transformation)
5.5
Raw and orthogonal polynomials
5.6
Square-root transformation
5.7
Arcsinus-square-root transformation
5.8
Logit transformation
5.9
Categorizing and decategorizing
5.10
Sinus and cosinus transformation for circular variables
5.11
Cloglog, probit, inverse transformation
5.12
Identity transformation
5.13
Transformations on the outcome variable
5.14
Back-transformation
5.15
Applying the transformations to new data
6
Reproducible research
6.1
Summary
6.2
Further reading
7
Further topics
7.1
Bioacoustic analyse
7.2
Python
7.3
Some R
7.3.1
Date on x-axis
II BAYESIAN DATA ANALYSIS
8
Introduction to PART II
Further reading
9
The Bayesian paradigm and likelihood in a frequentist and Bayesian framework
9.1
Short historical overview
9.2
The Bayesian way
9.3
Likelihood
9.3.1
Theory
9.3.2
The maximum likelihood method
9.4
The log pointwise predictive density
9.5
Further reading
10
Prior distributions and prior sensitivity analyses
10.1
Introduction
10.2
How to choose a prior
10.2.1
Priors for variance parameters
10.3
Prior sensitivity
11
Normal Linear Models
11.1
Linear regression
11.1.1
Background
11.1.2
Fitting a linear regression in R
11.1.3
Presenting the results
11.1.4
Interpretation of the R summary output
11.2
Linear model with one categorical predictor (one-way ANOVA)
11.3
Other variants of normal linear models
11.3.1
Linear model with two categorical predictors (two-way ANOVA)
11.3.2
A linear model with a categorical and a numeric predictor (ANCOVA)
11.4
Partial coefficients and some comments on collinearity
11.5
Ordered factors and contrasts
11.6
Quadratic and higher polynomial terms
12
Assessing model assumptions
12.1
Model assumptions
12.2
Independent and identically distributed
12.3
The QQ-plot
12.4
Temporal autocorrelation
12.5
Spatial autocorrelation
12.6
Heteroscedasticity
13
Linear mixed effect models
13.1
Background
13.1.1
Why mixed effects models?
13.1.2
Random factors and partial pooling
13.2
Fitting a normal linear mixed model in R
13.2.1
Background
13.2.2
Fitting a normal linear mixed model using lmer, then use sim
13.2.3
Fitting a normal linear model using rstanarm
13.2.4
Fitting a normal linear model using brm
13.3
Presenting the results
13.3.1
Presenting the results: from sim
13.3.2
Presenting the results: from rstanarm
13.3.3
Presenting the results: from brms
13.4
Random intercept and slope
13.5
Nested and crossed random effects
13.6
Model selection in mixed models
13.7
Further reading
14
Generalized linear models
14.1
Introduction
14.2
Bernoulli model
14.2.1
Background
14.2.2
Fitting a Bernoulli model in R
14.2.3
Assessing model assumptions in a Bernoulli model
14.2.4
Visualising the results
14.2.5
Some remarks
14.3
Binomial model
14.3.1
Background
14.3.2
Fitting a binomial model in R
14.3.3
Assessing assumptions in a binomial model
14.3.4
Visualising the results
14.4
Poisson model
14.4.1
Background
14.4.2
Fitting a Poisson model in R
14.4.3
Assessing model assumptions
14.4.4
Visualising results
14.4.5
Modeling rates and densities: Poisson model with an offset
15
Generalized linear mixed models
15.1
Background
15.2
Binomial mixed model
15.2.1
Background
15.2.2
Fitting a binomial mixed model in R
15.2.3
Presenting the results
15.3
Poisson mixed model
15.4
Summary
16
Posterior predictive model checking
17
Model comparison and multimodel inference
17.1
When and why we compare models and why model selection is difficult
17.2
Methods for model commparison
17.2.1
Cross-validation
17.2.2
Information criteria: Akaike information criterion and widely applicable information criterion
17.2.3
Other information criteria
17.2.4
Bayes factors and posterior model probabilities
17.2.5
Model-based methods to obtain posterior model probabilities and inclusion probabilities
17.2.6
Least absolute shrinkage and selection operator (LASSO) and ridge regression
17.3
Multimodel inference
17.4
Which method to choose and which strategy to follow?
17.5
Further reading
18
MCMC using Stan via rstanarm, brms or rstan
18.1
Background
18.2
Assessing convergence of the Markov chains and trouble shooting warnings of Stan
18.3
Using Stan via rstan
18.3.1
Writing a Stan model
18.3.2
Run Stan from R using rstan
Further reading
19
Ridge Regression
20
Structural equation models
20.1
Introduction
21
Modeling spatial data using GLMM
21.1
Introduction
21.2
Summary
III ECOLOGICAL MODELS
22
Introduction to PART III
22.1
Model notations
23
Zero-inflated Poisson mixed model
23.1
Introduction
23.2
Example data
23.3
Model
23.4
Further packages and readings
24
Daily nest survival
24.1
Background
24.2
Models for estimating daily nest survival
24.3
Known fate model
24.4
The Stan model
24.5
Prepare data and run Stan
24.6
Check convergence
24.7
Look at results
24.8
Known fate model for irregular nest controls
Further reading
25
Capture-mark recapture model with a mixture structure to account for missing sex-variable for parts of the individuals
25.1
Introduction
25.2
Data description
25.3
Model description
25.4
The Stan code
25.5
Call Stan from R, check convergence and look at results
26
What sample size?
26.1
Introduction
IV APPENDICES
Referenzen
Bayesian Data Analysis in Ecology with R and Stan
21
Modeling spatial data using GLMM
THIS CHAPTER IS UNDER CONSTRUCTION!!!
21.1
Introduction
21.2
Summary
xxx