A Beginner's Guide to Generalised Additive Mixed Models with R
Highland Statistics Ltd (Verlag)
978-0-9571741-5-3 (ISBN)
- Keine Verlagsinformationen verfügbar
- Artikel merken
The R code to construct, fit, interpret, and comparatively evaluate models is provided at every stage (either in the book or on the website for the book).
PREFACEV ACKNOWLEDGEMENTSV DATASETS USED IN THIS BOOKVI CHAPTER 1 OF ZUUR ET AL. (2012A) AND ZUUR (2012B)VI COVER ARTVI CONTRIBUTORSXIII 1 INTRODUCTION1 1.1 GAM APPLIED ON STABLE ISOTOPE RATIOS1 1.2 GAM USING MGCV APPLIED ON THE SQUID DATA5 1.3 LINEAR SPLINE REGRESSION7 1.4 LINEAR SPLINE REGRESSION IN JAGS13 1.5 B-SPLINES IN JAGS17 1.6 LOW RANK THIN-PLATE REGRESSION SPLINES IN JAGS19 1.6.1 Using lme to estimate the low rank thin-plate regression spline22 1.6.2 Using JAGS to estimate the low rank thin-plate regression spline24 1.7 O'SULLIVAN SPLINES IN JAGS28 1.8 EFFECTIVE DEGREES OF FREEDOM OF A SMOOTHER30 2 ADDITIVE MIXED EFFECTS MODELS APPLIED ON POLAR BEAR MOVEMENT DATA35 2.1 INTRODUCTION35 2.2 THE VARIABLES36 2.3. HOUSEKEEPING37 2.4 DATA EXPLORATION37 2.4.1 Checking for outliers in the movement data38 2.4.2 Relationships between movement and the covariates38 2.4.3 Collinearity44 2.5 MODEL FORMULATION45 2.5.1 Distribution45 2.5.2 Predictor function46 2.5.3 Link function48 2.6 FREQUENTIST APPROACH48 2.6.1 Fitting the additive mixed effects model using mgcv48 2.6.2 Model validation of the additive mixed effects model52 2.6.3 Understanding $lme output from the gamm function55 2.7 MCMC AND GAUSSIAN ADDITIVE MIXED EFFECTS MODELS58 2.7.1 Data for JAGS58 2.7.2 JAGS modelling code60 2.7.3 Initial values62 2.7.4 Parameters to save62 2.7.5 Executing JAGS and obtaining results62 2.7.6 Mixing of chains63 2.7.7 Model validation63 2.7.8 Model interpretation64 2.8 MCMC AND GAMMA GAMM67 2.8.1 Data for JAGS67 2.8.2 JAGS modelling code68 2.8.3 Initial values69 2.8.4 Parameters to save70 2.8.5 Executing JAGS and obtaining results70 2.8.6 Mixing of Chains70 2.8.7 Model validation70 2.8.8 Model interpretation71 2.9 DISCUSSION71 2.10 WHAT TO PRESENT IN A PAPER72 3 ADDITIVE MIXED EFFECTS MODELS APPLIED ON CORAL REEF DATA73 3.1 INTRODUCTION73 3.1.1 Coral reefs73 3.1.2 Aim of this chapter73 3.2 THE VARIABLES74 3.3. HOUSEKEEPING74 3.4 DATA EXPLORATION75 3.4.1 Checking for outliers75 3.4.2 Relationships76 3.4.3 Collinearity78 3.5 MODEL FORMULATION79 3.6 FREQUENTIST APPROACH80 3.6.1 Linear mixed effects model using lme80 3.6.2 Additive mixed effects model using gamm82 3.6.3 Model validation of the additive mixed effects model86 3.6.4 Model interpretation86 3.7 MCMC AND GAUSSIAN ADDITIVE MIXED EFFECTS MODELS88 3.7.1 Data for JAGS89 3.7.2 JAGS modelling code90 3.7.3 Initial values92 3.7.4 Parameters to save92 3.7.5 Executing JAGS and obtaining results92 3.7.6 Mixing of Chains93 3.7.7 Model validation93 3.7.8 Model interpretation93 3.8 DISCUSSION97 3.9 WHAT TO PRESENT IN A PAPER98 4 POISSON GAMM APPLIED ON RUDDY TURNSTONE DATA99 4.1 GROUP SIZE EFFECT ON VIGILANCE IN RUDDY TURNSTONES99 4.2 THE VARIABLES100 4.3. HOUSEKEEPING100 4.4 DATA EXPLORATION101 4.5 POISSON GAMM104 4.5.1 GLMM or GAMM?105 4.5.2 GAMM formulation105 4.5.3 Fitting GAMM using gamm4106 4.5.4 Estimated smoothers109 4.5.5 Model validation110 4.6 USING FLOCK SIZE AS AN OFFSET?110 4.7 UNBALANCED RANDOM EFFECTS; SIMULATION STUDY111 4.8 DISCUSSION114 5 GAMM APPLIED ON PARASITE DATA115 5.1 INTRODUCTION115 5.2 THE VARIABLES116 5.3. HOUSEKEEPING116 5.4 DATA EXPLORATION117 5.4.1 Checking for missing values117 5.4.2 Checking for outliers117 5.4.3 Relationships118 5.4.4 Collinearity119 5.4.5 Zero inflation119 5.5 MODEL FORMULATION119 5.6 POISSON AND NEGATIVE BINOMIAL GLMM FOR TOTAL ABUNDANCE121 5.6.1 Poisson GLMM using lme4121 5.6.2 Negative binomial GAMM using JAGS125 5.6.3 Negative binomial-P GLMs and GAMMs136 5.7 GENERALISED POISSON GAMM FOR UNDERDISPERSED SPECIES RICHNESS142 5.8 BINOMIAL GAMM FOR ABSENCE/PRESENCE DATA144 6 ZERO-INFLATED SEA BIRD DATA SAMPLED AT OFFSHORE WIND FARMS145 6.1 COMMON GUILLEMOTS145 6.2 THE DATA146 6.2.1 Importing the data146 6.2.2 Recoding of variables146 6.3 LOADING THE REQUIRED PACKAGES148 6.4 DATA EXPLORATION148 6.5 BUILDING TOWARDS A MODEL153 6.5.1 Poisson GAM with a bivariate smoother153 6.5.2 Applying the Poisson GAM with a bivariate smoother155 6.5.3 Poisson GAM with multiple bivariate smoothers157 6.5.4 Poisson GAMM with multiple bivariate smoothers159 6.6 ZERO-INFLATED POISSON GAMM WITH BIVARIATE SMOOTHERS161 6.7 ZERO-INFLATED NEGATIVE BINOMIAL GAMM WITH BIVARIATE SMOOTHERS163 6.8 TECHNICAL DETAILS OF FITTING THE TWO-WAY NESTED ZIP GAMM163 6.8.1 Underlying mixed effects model163 6.8.2 MCMC code for a two-dimensional smoother for data from one survey166 6.9 MODEL SELECTION USING DATA FROM SURVEY 1176 6.10 A MODEL FOR ALL 13 SURVEYS177 6.11 MCMC RESULTS FOR ALL 13 SURVEYS179 6.12 ADDING INDICATOR FUNCTIONS182 6.13 MODEL VALIDATION182 6.14 DISCUSSION185 6.15 WHAT TO PRESENT IN A PAPER186 7 ZERO-INFLATED GAMM APPLIED ON HARBOUR PORPOISE187 7.1 HARBOUR PORPOISE187 7.2 IMPORTING THE DATA AND HOUSEKEEPING188 7.3 DATA EXPLORATION189 7.3.1 Spatial and temporal sampling positions189 7.3.2 Outliers192 7.3.3 Collinearity193 7.3.4 Relationships194 7.4 BRAINSTORMING196 7.4.1 Adding correlation to the model196 7.4.2 Specifying the fixed part of the models197 7.4.3 Mathematical formulation of the models198 7.5 ZIP GAMM USING UNIVARIATE SMOOTHERS199 7.5.1 Implementation of ZIP GAMM with univariate smoothers199 7.5.2 ZIP GAMM results208 7.5.3 ZIP GLMM results210 7.6 ZIP GAMM USING TWO-DIMENSIONAL SPATIAL SMOOTHERS210 7.6.1 Implementation of ZIP GAMM with multivariate smoother - 210 7.6.2 ZIP GAMM results211 7.7 DISCUSSION214 7.8 WHAT TO PRESENT IN A PAPER214 8 GAMMA GAMM APPLIED ON TREE GROWTH DATA217 8.1 INTRODUCTION217 8.2 THE VARIABLES218 8.3. HOUSEKEEPING218 8.4 DATA EXPLORATION219 8.5 MODEL SPECIFICATION221 8.6 FREQUENTIST APPROACH222 8.7 BAYESIAN APPROACH226 8.7.1 Schematic overview226 8.7.2 Data for JAGS226 8.7.3 JAGS modelling code228 8.7.4 Initial values and parameters to save231 8.7.5 Running JAGS232 8.7.6 Assess mixing of chains and model fit232 8.7.7 JAGS results233 8.7.8 Model validation234 8.7.9 Heterogeneous gamma GAMM237 8.8 DISCUSSION238 8.9 WHAT TO PRESENT IN A PAPER239 9 BERNOULLI GAMM APPLIED ON COWBIRD BROOD PARASITISM241 9.1 INTRODUCTION241 9.2 THE VARIABLES242 9.3. HOUSEKEEPING243 9.4 DATA EXPLORATION243 9.5 MODEL FORMULATION245 9.6 FREQUENTIST APPROACH245 9.7 BAYESIAN APPROACH247 9.7.1 Preparing the data for JAGS248 9.7.2 JAGS modelling code249 9.7.3 Running JAGS and mixing of chains251 9.7.4 Estimated smoothers and fitted values obtained by JAGS251 9.7.5 Differences between fitted values253 9.8 DISCUSSION254 10 GAMM APPLIED ON MAXIMUM COD LENGTH USING INLA255 10.1 INTRODUCTION255 10.2 THE VARIABLES256 10.3 DATA EXPLORATION256 10.4 GAM IN MGCV259 10.5 ADDING SPATIAL CORRELATION TO THE GAM261 10.6 FITTING A GAM USING INLA263 10.6.1 What is INLA?263 10.6.2 Installing INLA265 10.6.3 Applying regression models in INLA265 10.6.4 GAM in inla268 10.7 GAM WITH SPATIAL CORRELATION IN INLA270 10.7.1 Defining a mesh270 10.7.2 Projector matrix272 10.7.3 Setting up the model272 10.7.4 Executing inla273 10.7.5 Plotting the spatial random field274 10.7.6 Theoretical and estimated spatial correlation275 10.8 GAM WITH EXTREME VALUE DISTRIBUTION IN INLA278 10.8.1 Generalised extreme value distribution278 10.8.2 Applying gev models using the ismev package in R279 10.8.3 Applying gev models using inla in R282 10.9 GAM WITH EXTREME VALUE DISTRIBUTION AND SPATIAL CORRELATION IN INLA283 10.10 DISCUSSION284 10.11 WHAT TO PRESENT IN A PAPER284 11 ZERO-INFLATED AND SPATIAL CORRELATED COMMON SCOTER DATA285 11.1 INTRODUCTION285 11.2 THE VARIABLES286 11.3 DATA EXPLORATION286 11.3.1 Outliers286 11.3.2 Collinearity287 11.3.3 Relationships between response and covariates288 11.4 POISSON GLM291 11.5 ZERO-INFLATED POISSON GLM USING PSCL AND INLA295 11.6 ZERO-INFLATED POISSON GAM USING INLA298 11.7 ZIP GLM WITH SPATIAL CORRELATION USING INLA303 11.8 ZIP GAM WITH SPATIAL CORRELATION USING INLA306 11.9 NB GLM WITH SPATIAL CORRELATION USING INLA308 11.10 THE EFFECT OF A NEW EXCLUSION ZONE311 11.11 DISCUSSION317 11.12 WHAT TO PRESENT IN A PAPER318 REFERENCES319 INDEX325 BOOKS BY HIGHLAND STATISTICS329 UPCOMING BOOKS IN 2014331
Erscheint lt. Verlag | 30.1.2014 |
---|---|
Reihe/Serie | A Beginner's Guide to |
Verlagsort | Newburgh |
Sprache | englisch |
Maße | 156 x 233 mm |
Themenwelt | Mathematik / Informatik ► Mathematik ► Computerprogramme / Computeralgebra |
ISBN-10 | 0-9571741-5-2 / 0957174152 |
ISBN-13 | 978-0-9571741-5-3 / 9780957174153 |
Zustand | Neuware |
Haben Sie eine Frage zum Produkt? |
aus dem Bereich