Error in library(blme): there is no package called blme Jarad Niemi - - PowerPoint PPT Presentation

error in library blme there is no package called blme
SMART_READER_LITE
LIVE PREVIEW

Error in library(blme): there is no package called blme Jarad Niemi - - PowerPoint PPT Presentation

Error in library(blme): there is no package called blme Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 1 / 21 Hierarchical linear models (cont.) Random intercept, random slope Dr. Jarad Niemi STAT 544 - Iowa


slide-1
SLIDE 1

Error in library(blme): there is no package called ’blme’ Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 1 / 21

slide-2
SLIDE 2

Hierarchical linear models (cont.)

Random intercept, random slope

  • Dr. Jarad Niemi

STAT 544 - Iowa State University

May 2, 2019

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 1 / 21

slide-3
SLIDE 3

YWAR WBNU WIWR WOTH WPWA WTSP YBFL YBSA YSFL YTVI RUGR RWBL SCTA SOSP SWSP SWTH TEWA VEER VESP NOWA OSFL OVEN PIWA PUFI RBGR RBNU RCKI REVI HETH HOWR INBU LEFL MAWA MOWA MYWA NAWA NOPA EATO EAWP EVGR GCFL GCKI GRAJ GRCA GWWA HAWO CEDW CHSP CMWA CONW COYE CSWA DOWO EABL EAKI BLBW BLJA BRBL BRCR BRTH BTBW BTNW CAWA CCSP ALFL AMCR AMGO AMRE AMRO BAWW BCCH BHCO BHVI 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 0.007 0.008 0.009 0.010 0.011 0.000 0.002 0.004 0.006 0.000 0.002 0.004 0.006 0.004 0.006 0.008 0.0090 0.0095 0.0100 0.0105 0.0110 0.0160 0.0165 0.0170 0.0175 0.0180 0.0185 0.000 0.002 0.004 0.004 0.006 0.008 0.005 0.006 0.007 0.008 0.009 0.006 0.007 0.008 0.009 0.000 0.002 0.004 0.006 0.006 0.008 0.010 0.0140 0.0145 0.0150 0.0155 0.0160 0.000 0.002 0.004 0.006 0.014 0.015 0.004 0.006 0.008 0.009 0.010 0.011 0.012 0.013 0.011 0.012 0.013 0.014 0.004 0.006 0.008 0.005 0.006 0.007 0.008 0.009 0.009 0.010 0.011 0.012 0.013 0.008 0.010 0.012 0.014 0.000 0.002 0.004 0.006 0.010 0.011 0.012 0.013 0.009 0.010 0.011 0.012 0.013 0.000 0.001 0.002 0.003 0.013 0.014 0.015 0.016 0.005 0.006 0.007 0.008 0.009 0.010 0.011 0.012 0.010 0.011 0.012 0.013 0.000 0.002 0.004 0.006 0.007 0.008 0.009 0.010 0.011 0.012 0.013 0.014 0.000 0.002 0.004 0.0125 0.0130 0.0135 0.0140 0.004 0.006 0.008 0.010 0.004 0.006 0.008 0.010 0.0025 0.0050 0.0075 0.008 0.009 0.010 0.011 0.012 0.0135 0.0140 0.0145 0.0150 0.0155 0.012 0.013 0.014 0.007 0.008 0.009 0.010 0.011 0.0025 0.0050 0.0075 0.007 0.008 0.009 0.010 0.0135 0.0140 0.0145 0.0150 0.009 0.010 0.011 0.012 0.013 0.014 0.006 0.008 0.010 0.0000 0.0025 0.0050 0.0075 0.006 0.008 0.010 0.012 0.000 0.001 0.002 0.003 0.004 0.005 0.000 0.002 0.004 0.0000 0.0025 0.0050 0.0075 0.005 0.006 0.007 0.008 0.009 0.0160 0.0165 0.0170 0.0175 0.0180 0.0185 0.010 0.011 0.012 0.0000 0.0025 0.0050 0.0075 0.009 0.010 0.011 0.012 0.013 0.012 0.013 0.014 0.008 0.009 0.010 0.011 0.012 0.013 0.0116 0.0120 0.0124 0.0128 0.0132 0.000 0.002 0.004 0.006 0.002 0.004 0.006 0.008 0.004 0.006 0.008 0.010 0.011 0.012 0.006 0.007 0.008 0.009 0.010 0.009 0.010 0.011 0.012 0.0050 0.0075 0.0100 0.0125 0.000 0.002 0.004 0.006 0.0125 0.0130 0.0135 0.0140 0.0145 0.0150 0.0155 0.006 0.007 0.008 0.009 0.010 0.000 0.002 0.004 0.006 0.008 0.006 0.008 0.010 0.0000 0.0025 0.0050 0.0075 0.0100 year y

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 2 / 21

slide-4
SLIDE 4

Independent regressions

Initially, we could consider the model yst

ind

∼ N(βs,0 + xstβs,1, σ2

s)

where yst is the mean log count (+1) for species s at time t xst is the year (minus 2005) for species s at time t This model treats each species completely independently.

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 3 / 21

slide-5
SLIDE 5

YWAR WBNU WIWR WOTH WPWA WTSP YBFL YBSA YSFL YTVI RUGR RWBL SCTA SOSP SWSP SWTH TEWA VEER VESP NOWA OSFL OVEN PIWA PUFI RBGR RBNU RCKI REVI HETH HOWR INBU LEFL MAWA MOWA MYWA NAWA NOPA EATO EAWP EVGR GCFL GCKI GRAJ GRCA GWWA HAWO CEDW CHSP CMWA CONW COYE CSWA DOWO EABL EAKI BLBW BLJA BRBL BRCR BRTH BTBW BTNW CAWA CCSP ALFL AMCR AMGO AMRE AMRO BAWW BCCH BHCO BHVI 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 1995 2000 2005 2010 0.007 0.008 0.009 0.010 0.011 0.000 0.002 0.004 0.006 0.000 0.002 0.004 0.006 0.004 0.006 0.008 0.0090 0.0095 0.0100 0.0105 0.0110 0.016 0.017 0.018 0.000 0.002 0.004 0.003 0.005 0.007 0.009 0.005 0.006 0.007 0.008 0.009 0.006 0.007 0.008 0.009 0.000 0.002 0.004 0.006 0.006 0.008 0.010 0.014 0.015 0.016 0.000 0.002 0.004 0.006 0.014 0.015 0.016 0.004 0.006 0.008 0.010 0.009 0.010 0.011 0.012 0.013 0.011 0.012 0.013 0.014 0.004 0.006 0.008 0.005 0.006 0.007 0.008 0.009 0.009 0.010 0.011 0.012 0.013 0.008 0.010 0.012 0.014 0.000 0.002 0.004 0.006 0.010 0.011 0.012 0.013 0.009 0.010 0.011 0.012 0.013 −0.001 0.000 0.001 0.002 0.003 0.013 0.014 0.015 0.016 0.005 0.006 0.007 0.008 0.009 0.010 0.011 0.012 0.010 0.011 0.012 0.013 0.000 0.002 0.004 0.006 0.007 0.008 0.009 0.010 0.011 0.012 0.013 0.014 0.000 0.002 0.004 0.0125 0.0130 0.0135 0.0140 0.004 0.006 0.008 0.010 0.004 0.006 0.008 0.010 0.0025 0.0050 0.0075 0.008 0.009 0.010 0.011 0.012 0.0135 0.0140 0.0145 0.0150 0.0155 0.012 0.013 0.014 0.015 0.007 0.008 0.009 0.010 0.011 0.0025 0.0050 0.0075 0.0100 0.007 0.008 0.009 0.010 0.0135 0.0140 0.0145 0.0150 0.009 0.010 0.011 0.012 0.013 0.014 0.005 0.007 0.009 0.011 0.013 0.0000 0.0025 0.0050 0.0075 0.006 0.008 0.010 0.012 0.000 0.002 0.004 0.000 0.002 0.004 0.0000 0.0025 0.0050 0.0075 0.005 0.006 0.007 0.008 0.009 0.016 0.017 0.018 0.010 0.011 0.012 0.0000 0.0025 0.0050 0.0075 0.0100 0.009 0.010 0.011 0.012 0.013 0.014 0.012 0.013 0.014 0.008 0.009 0.010 0.011 0.012 0.013 0.0116 0.0120 0.0124 0.0128 0.0132 0.000 0.002 0.004 0.006 0.002 0.004 0.006 0.008 0.004 0.006 0.008 0.010 0.010 0.011 0.012 0.006 0.007 0.008 0.009 0.010 0.009 0.010 0.011 0.012 0.006 0.008 0.010 0.012 0.000 0.002 0.004 0.006 0.0125 0.0130 0.0135 0.0140 0.0145 0.0150 0.0155 0.006 0.007 0.008 0.009 0.010 0.000 0.002 0.004 0.006 0.008 0.006 0.008 0.010 0.0000 0.0025 0.0050 0.0075 0.0100 year y

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 4 / 21

slide-6
SLIDE 6

CONW EVGR SOSP BHCO INBU BTBW YTVI GCFL SCTA WIWR BRBL GWWA OSFL LEFL RUGR EAWP BHVI EATO COYE RWBL ALFL CHSP YBFL GRCA SWSP BRCR MOWA NOPA WTSP AMRO CSWA MAWA HETH REVI RBGR SWTH DOWO VEER EAKI BLJA YWAR GRAJ MYWA VESP AMRE OVEN EABL NAWA AMCR BLBW BTNW NOWA BCCH WPWA HAWO CAWA YBSA TEWA PIWA HOWR BRTH GCKI WBNU YSFL CCSP BAWW CMWA AMGO RCKI PUFI RBNU CEDW WOTH −4e−04 −2e−04 0e+00 2e−04 4e−04

Slopes Species abbreviation

Estimated slopes and 95% confidence intervals

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 5 / 21

slide-7
SLIDE 7

Random intercept, random slope model

A reasonable assumption is to treat these species exchangeably and put a distribution on the intercept and slope. Then a random intercept, random slope model is yst

ind

∼ N(βs,0 + xstβs,1, σ2) βs

ind

∼ N(µβ, Σβ) where βs = (βs,0, βs,1)′ and σ2, µβ, and Σβ are parameters to be estimated. Notice that there is now a common variance for all species.

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 6 / 21

slide-8
SLIDE 8

Random intercept and random slope model in R

m2 = lmer(y~I(year-2005) + (I(year-2005)|abbrev), d) Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge with max|grad| = 0.00267938 (tol = 0.002, component 1) summary(m2) Linear mixed model fit by REML ['lmerMod'] Formula: y ~ I(year - 2005) + (I(year - 2005) | abbrev) Data: d REML criterion at convergence: -13786.6 Scaled residuals: Min 1Q Median 3Q Max

  • 4.6888 -0.5157

0.0381 0.5437 3.6364 Random effects: Groups Name Variance Std.Dev. Corr abbrev (Intercept) 1.799e-05 4.242e-03 I(year - 2005) 5.996e-09 7.743e-05 0.49 Residual 2.015e-06 1.419e-03 Number of obs: 1387, groups: abbrev, 73 Fixed effects: Estimate Std. Error t value (Intercept) 8.543e-03 4.979e-04 17.157 I(year - 2005) 1.502e-05 1.143e-05 1.314 Correlation of Fixed Effects: (Intr) Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 7 / 21

slide-9
SLIDE 9

Error: coord fixed doesn’t support free scales Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 8 / 21

slide-10
SLIDE 10

Which species have significant decline?

The quantities of interest here are βs,1 and whether these quantities are negative, i.e. indicating an average decease in counts over time. But how can we calculate pvalues or confidence intervals for the random effects themselves?

EVGR CONW BTBW YTVI BRBL EATO SOSP INBU RUGR BHCO OSFL SWTH YWAR GWWA RWBL GCFL EABL EAKI MAWA CCSP VESP BHVI GRCA WPWA HOWR ALFL CHSP SCTA DOWO WIWR YBFL TEWA SWSP BRCR GRAJ BRTH HAWO EAWP WBNU MOWA LEFL GCKI COYE NOWA NOPA MYWA RBGR AMRO CMWA RCKI CSWA AMCR BLBW CAWA PUFI BCCH HETH PIWA BLJA WTSP AMRE YBSA YSFL REVI VEER BTNW AMGO NAWA OVEN WOTH BAWW CEDW RBNU −1e−04 0e+00 1e−04

Slope estimates Species abbreviation

Species slope estimates with no uncertainty

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 9 / 21

slide-11
SLIDE 11

Bayesian random intercept, random slope model

The model yst

ind

∼ N(βs,0 + xstβs,1, σ2) βs

ind

∼ N(µβ, Σβ) and a prior p(σ, µβ, Σβ) ∝ p(σ)p(µβ)p(Σβ) and σ ∼ Ca+(0, 1), p(µβ) ∝ 1, and Σβ ∼ ?

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 10 / 21

slide-12
SLIDE 12

Conjugate prior for a covariance matrix

The natural conjugate prior for a covariance matrix is the inverse-Wishart distribution, which has density p(Σ) ∝ |Σ|−(ν+d+1)/2 exp

  • −1

2tr

  • SΣ−1

with ν > d − 1 and S is a positive definite matrix. The expected value is E[Σ] = S ν − d − 1 for ν > d + 1. We write Σ ∼ IW(ν, S−1). Special cases: If ν = d + 1 and S is diagonal, then each of the correlations in Σ has a marginal uniform prior. Jeffreys prior p(Σ) = |Σ|−(d+1)/2

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 11 / 21

slide-13
SLIDE 13

Issues with the inverse-Wishart distribution

If Σ ∼ IW(ν, S), then Σii ∼ IG([ν − (d − 1)]/2, Sii/2). In particular, if ν = d + 1 and S = I (to ensure marginally uniform priors on the correlations), then Σii ∼ IG(1, 1/2). The problems although the correlations are marginally uniform, they are not independent a priori of the variances (diagonal elements of Σ), the inverse gamma distribution has a region near zero of extremely low density that can cause extreme bias toward larger values for truly small variances, this in turn causes the correlation to be shrunk toward zero.

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 12 / 21

slide-14
SLIDE 14

Deconstructing the covariance matrix

Let Σ = diag(σ)Ωdiag(σ) where σ is a vector of standard deviations Ω is a correlation matrix which results in the standard deviations and correlations being independent a priori. Now we can put whatever prior we want on σ and Ω, e.g. σi

ind

∼ Ca+(0, ?).

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 13 / 21

slide-15
SLIDE 15

LKJ correlation matrix prior

The LKJ (Lewandowski, Kurowicka, and Joe 2009) distribution is p(Ω) = |Ω|η−1 where Ω is a correlation matrix with implicit dimension d and η > 0 is the shape parameter. if η = 1, then the density is uniform over correlation matrices of dimension d if η > 1, the identity matrix is the modal correlation matrix with a sharper peak in the density for larger values of η if η < 1, the density has a trough at the identity matrix.

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 14 / 21

slide-16
SLIDE 16

model = " data { int<lower=1> n_species; int<lower=1> n_years; vector[n_years] y[n_species]; matrix[n_years,2] X; } parameters { real<lower=0> sigma; vector[2] beta[n_species]; vector[2] mu_beta; vector<lower=0>[2] sigma_beta; corr_matrix[2] L; } model { sigma ~ cauchy(0,1); sigma_beta ~ cauchy(0,1); L ~ lkj_corr(1.0); beta ~ multi_normal(mu_beta, diag_matrix(sigma_beta) * L * diag_matrix(sigma_beta)); for (s in 1:n_species) y[s] ~ normal(X*beta[s], sigma); } " Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 15 / 21

slide-17
SLIDE 17

tmp = reshape2::dcast(d[,c('year','abbrev','y')], abbrev~year, value.var='y') dat = list(n_species = nrow(tmp), n_years = ncol(tmp)-1, y = tmp[,-1], X = cbind(1, as.numeric(names(tmp)[-1])-2005), prior_scale = 0.01) m = stan_model(model_code=model) r = sampling(m, dat, refresh=0) Warning: There were 2 divergent transitions after warmup. Increasing adapt delta above 0.8 may help. See http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup Warning: There were 97 transitions after warmup that exceeded the maximum treedepth. Increase max treedepth above 10. See http://mc-stan.org/misc/warnings.html#maximum-treedepth-exceeded Warning: Examine the pairs() plot to diagnose sampling problems Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 16 / 21

slide-18
SLIDE 18

EVGR CONW YTVI BTBW SOSP EATO RUGR BRBL BHCO INBU OSFL SWTH YWAR GWWA RWBL GCFL EABL EAKI MAWA BHVI WPWA ALFL CCSP GRCA CHSP SCTA YBFL SWSP WIWR VESP DOWO BRCR HOWR TEWA GRAJ EAWP HAWO WBNU MOWA BRTH LEFL NOPA RBGR MYWA NOWA GCKI AMRO COYE CSWA AMCR BLBW CAWA BCCH PUFI RCKI CMWA PIWA HETH BLJA WTSP AMRE YSFL VEER REVI YBSA BTNW AMGO NAWA OVEN BAWW WOTH CEDW RBNU −3e−04 −2e−04 −1e−04 0e+00 1e−04 2e−04 median abbrev

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 17 / 21

slide-19
SLIDE 19

Hierarchical model for the variances

The model yst

ind

∼ N(βs,0 + xstβs,1, σ2

s)

βs

ind

∼ N(µβ, Σβ) σs

ind

∼ LN(µσ, τσ) and a prior p(µσ, τσ, µβ, Σβ) ∝ p(µσ)p(τσ)p(µβ)p(Σβ) and p(µσ) ∝ 1, τσ ∼ Ca+(0, 1), p(µβ) ∝ 1, and Σβ as before

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 18 / 21

slide-20
SLIDE 20

model2 = " data { int<lower=1> n_species; int<lower=1> n_years; vector[n_years] y[n_species]; matrix[n_years,2] X; } parameters { real<lower=0> sigma[n_species]; real mu; real<lower=0> tau; vector[2] beta[n_species]; vector[2] mu_beta; vector<lower=0>[2] sigma_beta; corr_matrix[2] L; } model { tau ~ cauchy(0,1); sigma ~ lognormal(mu,tau); sigma_beta ~ cauchy(0,1); L ~ lkj_corr(1.0); beta ~ multi_normal(mu_beta, diag_matrix(sigma_beta) * L * diag_matrix(sigma_beta)); for (s in 1:n_species) y[s] ~ normal(X*beta[s], sigma[s]); } " Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 19 / 21

slide-21
SLIDE 21

m2 = stan_model(model_code=model2) r2 = sampling(m2, dat, refresh=0) Warning: There were 3 divergent transitions after warmup. Increasing adapt delta above 0.8 may help. See http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup Warning: There were 3997 transitions after warmup that exceeded the maximum treedepth. Increase max treedepth above 10. See http://mc-stan.org/misc/warnings.html#maximum-treedepth-exceeded Warning: There were 1 chains where the estimated Bayesian Fraction of Missing Information was low. See http://mc-stan.org/misc/warnings.html#bfmi-low Warning: Examine the pairs() plot to diagnose sampling problems Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 20 / 21

slide-22
SLIDE 22

BTBW CONW BRBL BHCO INBU EVGR EATO RUGR YTVI OSFL GCFL GWWA SWTH WIWR SCTA BHVI RWBL EAKI GRCA VESP ALFL EAWP MAWA CCSP SWSP YWAR LEFL HOWR BRCR TEWA DOWO SOSP EABL COYE GRAJ WPWA CHSP MOWA YBFL BRTH HAWO NOPA AMRO RBGR CMWA WBNU NOWA GCKI RCKI MYWA WTSP HETH CSWA PUFI AMCR BLBW BLJA VEER BCCH CAWA AMRE REVI PIWA BTNW NAWA YBSA OVEN YSFL WOTH AMGO BAWW CEDW RBNU −2e−04 −1e−04 0e+00 1e−04 2e−04 median abbrev

Jarad Niemi (STAT544@ISU) Hierarchical linear models (cont.) May 2, 2019 21 / 21