Chapter 2 HMSC As A Tool To Perform Variance Partitioning Analysis

The aim of a variance partitioning analysis where the response variables are pollinator abundances and the explanatory variables include spatial, temporal, and environmental factors is to understand the relative contributions of these factors to the variation in pollinator community composition. This provides insights into the ecological processes driving pollinator abundance and diversity patterns. The overarching goal is to untangle the complex ecological processes driving pollinator community composition and abundance, enabling a better understanding of the interplay between environmental conditions, spatial dynamics, and temporal changes.

Specific Aims

  1. Quantify Drivers of Pollinator Abundance: Determine how much of the variation in pollinator abundance is explained by environmental variables (e.g. floral resource availability, temperature, land-use type), spatial structure (e.g. geographic location, sampling site variation), and temporal factors (e.g. seasonality, year-to-year variation).

  2. Distinguish Between Factors: Separate the effects of spatial, temporal, and environmental variables to understand which factors are most important in shaping pollinator communities and how these factors interact.

  3. Understand Species-Specific Responses: Assess how different pollinator species respond to the same factors, helping to identify generalist versus specialist behaviors or species-specific sensitivities.

Key Outputs

  1. Variance Explained: Proportion of variance in pollinator abundance attributed to environmental, spatial, and temporal factors, often visualized using bar plots or pie charts.

  2. Species-Specific Results: The relative contribution of each factor may vary across pollinator species (e.g. bumblebees might respond more strongly to floral resources, while butterflies might show stronger spatial structuring).

2.1 Load Packages

library(readr)
library(dplyr)
library(Hmsc)

2.2 Load Data for Pollinator Assemblages

The data was recorded through observational field surveys conducted across distinct sampling sites in southern Sweden. The data represents the abundance of pollinator functional groups that interacted with Viscaria vulgaris. Pollinators were observed at each sampling site during separate 10-minute censuses, where the number of flower visits by distinct pollinator functional groups was recorded. Each row in the data represents a unique 10-minute census (i.e. sampling unit), with the corresponding number of flower visits by each identified pollinator functional group.

To perform variance partitioning analysis with HMSC, the data must have the following general structure:

  1. Response Variables: Pollinator abundances for different species or functional groups (e.g. number of flower visits by bumblebees, flies, butterflies, etc.). Data may come from multiple sites, across different time periods (e.g. months, seasons, years).

  2. Explanatory Variables: Environmental factors: abiotic or biotic variables (e.g. temperature, floral resource availability, land-use type, soil type, vegetation cover, etc.). Spatial factors: represent geographic location or spatial autocorrelation (e.g. latitude/longitude, distance to certain habitats, sampling site variation, etc.). Temporal factors: represent time-related variation (e.g. time of day, seasonality, year-to-year variation, etc.).

data_pollinator_variance_partitioning <- readxl::read_excel(paste0(here::here("Pollinator_Observations_HMSC_Workshop.xlsx")),
                                                            sheet = "Pollinator_Observations")
data_pollinator_variance_partitioning
## # A tibble: 140 × 25
##    Unique_Observation_ID         Population            Year  Date   Bombus_Queen
##    <chr>                         <chr>                 <chr> <chr>         <dbl>
##  1 Baskemölla_2023_41            Baskemölla            2023  07-06…            0
##  2 Baskemölla_2023_42            Baskemölla            2023  07-06…            6
##  3 Baskemölla_2023_54            Baskemölla            2023  04-06…            0
##  4 Baskemölla_2023_88            Baskemölla            2023  07-06…            0
##  5 Brösarps_Norra_Backar_2023_94 Brösarps_Norra_Backar 2023  04-06…            0
##  6 Brösarps_Norra_Backar_2023_95 Brösarps_Norra_Backar 2023  04-06…            0
##  7 Brösarps_Norra_Backar_2023_96 Brösarps_Norra_Backar 2023  04-06…            0
##  8 Brösarps_Norra_Backar_2023_97 Brösarps_Norra_Backar 2023  11-06…            0
##  9 Brösarps_Norra_Backar_2023_98 Brösarps_Norra_Backar 2023  11-06…            0
## 10 Fish_Pond_2023_13             Fish_Pond             2023  13-06…            0
## # ℹ 130 more rows
## # ℹ 20 more variables: Bombus_terrestris_Worker <dbl>, Bombus_Worker <dbl>,
## #   Bombyliidae <dbl>, Coleoptera <dbl>, Diurnal_Lepidoptera <dbl>,
## #   Honeybee <dbl>, Large_Solitary_Bee <dbl>, Noctuidae <dbl>,
## #   Non_Syrphid_Diptera <dbl>, Other <dbl>, Small_Solitary_Bee <dbl>,
## #   Sphingidae <dbl>, Syrphidae <dbl>, Total_Visits <dbl>, Observer <chr>,
## #   Time_Start <chr>, Sky <chr>, Temperature <chr>, Wind <chr>, …

2.3 Prepare Data for Pollinator Assemblages

Here, we select the set of response variables for the variance partitioning analysis in HMSC. That is, we create a new data frame with the number of flower visits by the pollinator functional groups. In this new data frame, each row will correspond to a unique 10-minute census (i.e. the sampling unit) and each column will contain the number of flower visits by a particular pollinator functional group.

VP_info_flower_visits_abundance <- data_pollinator_variance_partitioning %>% 
  ungroup() %>% 
  select(Bombus_Queen:Syrphidae)
VP_info_flower_visits_abundance
## # A tibble: 140 × 14
##    Bombus_Queen Bombus_terrestris_Worker Bombus_Worker Bombyliidae Coleoptera
##           <dbl>                    <dbl>         <dbl>       <dbl>      <dbl>
##  1            0                        0             0           0          0
##  2            6                       14             0           0          0
##  3            0                        3            55           0          5
##  4            0                        0            15           0          0
##  5            0                        5             8           0          0
##  6            0                        0             3           0          0
##  7            0                        0             3           0          0
##  8            0                        0             0           0          0
##  9            0                        8             0           0          0
## 10            0                        0             5           0          0
## # ℹ 130 more rows
## # ℹ 9 more variables: Diurnal_Lepidoptera <dbl>, Honeybee <dbl>,
## #   Large_Solitary_Bee <dbl>, Noctuidae <dbl>, Non_Syrphid_Diptera <dbl>,
## #   Other <dbl>, Small_Solitary_Bee <dbl>, Sphingidae <dbl>, Syrphidae <dbl>

2.3.1 Mean-Standardize Number of Flower Visits

Before conducting the variance partitioning analysis and defining the HMSC model, it is important to standardize the set of response variables (i.e. number of flower visits by pollinator functional groups). Variance partitioning focuses on how much variance different predictors explain. If the set of response variables are not standardized, the total variance of each variable will differ due to scaling, making it difficult to partition or compare explained variance across variables. By centering (subtracting the mean) and scaling (dividing by the standard deviation), the standardized response variables have a mean of zero and a standard deviation of one. This makes the variance partitioning results dimensionless and easier to compare across datasets or studies. This is particularly important when the set of response variables have very large or very small values (e.g. wide range of variation in number of flower visits by distinct pollinator functional groups).

VP_info_flower_visits_abundance_mean_standard <- VP_info_flower_visits_abundance %>% 
  mutate(across(everything(), ~ (. - mean(.)) / sd(.)))
# each value in the column (.) has the column mean subtracted (mean(.)) and then divided by the column standard deviation (sd(.))
# mean of zero and standard deviation of one
VP_info_flower_visits_abundance_mean_standard
## # A tibble: 140 × 14
##    Bombus_Queen Bombus_terrestris_Worker Bombus_Worker Bombyliidae Coleoptera
##           <dbl>                    <dbl>         <dbl>       <dbl>      <dbl>
##  1       -0.522                   -0.502        -0.496      -0.112     -0.195
##  2       -0.368                   -0.372        -0.496      -0.112     -0.195
##  3       -0.522                   -0.474         0.159      -0.112      3.71 
##  4       -0.522                   -0.502        -0.317      -0.112     -0.195
##  5       -0.522                   -0.456        -0.400      -0.112     -0.195
##  6       -0.522                   -0.502        -0.460      -0.112     -0.195
##  7       -0.522                   -0.502        -0.460      -0.112     -0.195
##  8       -0.522                   -0.502        -0.496      -0.112     -0.195
##  9       -0.522                   -0.428        -0.496      -0.112     -0.195
## 10       -0.522                   -0.502        -0.436      -0.112     -0.195
## # ℹ 130 more rows
## # ℹ 9 more variables: Diurnal_Lepidoptera <dbl>, Honeybee <dbl>,
## #   Large_Solitary_Bee <dbl>, Noctuidae <dbl>, Non_Syrphid_Diptera <dbl>,
## #   Other <dbl>, Small_Solitary_Bee <dbl>, Sphingidae <dbl>, Syrphidae <dbl>

2.4 Basic Data Information for Variance Partitioning

2.4.1 Define Fixed Effects

In variance partitioning analysis in HMSC, fixed effects allow you to quantify how much of the variance in the response variables is uniquely attributable to each predictor or group of predictors. Fixed effects are not allowed to vary randomly across levels of the hierarchy, such as sites, species, or time. Fixed effects typically correspond to covariates like:

  1. Environmental variables (e.g. temperature, precipitation, etc).

  2. Spatial predictors (e.g. elevation, distance to resources, sampling site variation, etc).

  3. Temporal predictors (e.g. season, year, etc).

Here, we define four fixed effects that correspond to:

  1. Environmental factors (e.g. temperature, wind, cloud coverage).

  2. Spatial factors (e.g. sampling site variation).

  3. Temporal factors (e.g. year-to-year variation).

VP_info_fixed_effects <- data_pollinator_variance_partitioning %>% 
  select(Unique_Observation_ID, Observer, Time_Start, Time_Start_Decimal, Sky, Temperature, Wind)
VP_info_fixed_effects <- VP_info_fixed_effects %>% 
  ungroup() %>% 
  select(Observer, Time_Start_Decimal, Sky, Temperature, Wind) %>% 
  mutate_at(vars(Observer, Sky, Temperature, Wind),
            as.factor)
VP_info_fixed_effects
## # A tibble: 140 × 5
##    Observer Time_Start_Decimal Sky   Temperature Wind 
##    <fct>                 <dbl> <fct> <fct>       <fct>
##  1 VB                     12.5 Clear Hot         Low  
##  2 VB                     11.8 Clear Hot         Low  
##  3 FTV                    14.2 Clear Warm        Low  
##  4 VB                     12.1 Clear Hot         Windy
##  5 FTV                    10.7 Clear Warm        Low  
##  6 FTV                    10.9 Clear Warm        Low  
##  7 FTV                    10.9 Clear Warm        Low  
##  8 FTV                    13.8 Clear Warm        Windy
##  9 FTV                    13.8 Clear Warm        Windy
## 10 FTV                    12.4 Clear Warm        Windy
## # ℹ 130 more rows

2.4.2 Define Model Formula

The XFormula argument:

  1. Specifies the environmental covariates or predictors that are included as fixed effects (e.g. temperature, precipitation, habitat type).

  2. Defines the mathematical relationship between predictors (e.g. linear, interaction terms, polynomial terms).

Here, the model formula includes three fixed effects.

VP_info_model_formula_time_weather = ~ Time_Start_Decimal + Sky + Temperature + Wind

2.4.3 Define Study Design

Here, we specify the hierarchical structure of the data, which is critical for modeling random effects. We define how the data is grouped across different levels of the study, such as sampling sites, plots, years, species, etc. This enables the model to account for non-independence of observations and partitions variance appropriately across hierarchical levels. The studyDesign argument is used in combination with the randomLevel argument to model random effects. Each grouping factor in the studyDesign is associated with a random effect in the HMSC model. The studyDesign argument is a data frame where:

  1. Rows correspond to observations (i.e. the sampling units).

  2. Columns correspond to grouping factors, which represent hierarchical levels in the study design.

Here, we define three grouping factors:

  1. Spatial factor (e.g. sampling site variation).

  2. Temporal factor (e.g. year-to-year variation).

  3. Sampling unit factor (e.g. 10-minute census variation).

VP_info_study_design <- data.frame(Population = data_pollinator_variance_partitioning$Population,
                                   Year = data_pollinator_variance_partitioning$Year,
                                   Sample = sprintf("Sample_%.3d",
                                                    1:nrow(data_pollinator_variance_partitioning)),
                                   stringsAsFactors = TRUE)
VP_info_study_design
##                Population Year     Sample
## 1              Baskemölla 2023 Sample_001
## 2              Baskemölla 2023 Sample_002
## 3              Baskemölla 2023 Sample_003
## 4              Baskemölla 2023 Sample_004
## 5   Brösarps_Norra_Backar 2023 Sample_005
## 6   Brösarps_Norra_Backar 2023 Sample_006
## 7   Brösarps_Norra_Backar 2023 Sample_007
## 8   Brösarps_Norra_Backar 2023 Sample_008
## 9   Brösarps_Norra_Backar 2023 Sample_009
## 10              Fish_Pond 2023 Sample_010
## 11              Fish_Pond 2023 Sample_011
## 12              Fish_Pond 2023 Sample_012
## 13              Fish_Pond 2023 Sample_013
## 14             Hallamölla 2023 Sample_014
## 15             Hallamölla 2023 Sample_015
## 16             Hallamölla 2023 Sample_016
## 17             Hallamölla 2023 Sample_017
## 18             Hallamölla 2023 Sample_018
## 19             Hardeberga 2023 Sample_019
## 20             Hardeberga 2023 Sample_020
## 21             Hardeberga 2023 Sample_021
## 22             Hardeberga 2023 Sample_022
## 23             Hardeberga 2023 Sample_023
## 24             Hardeberga 2023 Sample_024
## 25             Klingstorp 2023 Sample_025
## 26             Klingstorp 2023 Sample_026
## 27             Klingstorp 2023 Sample_027
## 28             Klingstorp 2023 Sample_028
## 29              Knivsåsen 2023 Sample_029
## 30              Knivsåsen 2023 Sample_030
## 31              Knivsåsen 2023 Sample_031
## 32              Knivsåsen 2023 Sample_032
## 33              Knivsåsen 2023 Sample_033
## 34              Knivsåsen 2023 Sample_034
## 35              Knivsåsen 2023 Sample_035
## 36              Knivsåsen 2023 Sample_036
## 37             Kullamölla 2023 Sample_037
## 38             Kullamölla 2023 Sample_038
## 39             Kullamölla 2023 Sample_039
## 40             Kullamölla 2023 Sample_040
## 41             Kullamölla 2023 Sample_041
## 42             Petersborg 2023 Sample_042
## 43             Petersborg 2023 Sample_043
## 44             Petersborg 2023 Sample_044
## 45             Petersborg 2023 Sample_045
## 46             Petersborg 2023 Sample_046
## 47                  Quary 2023 Sample_047
## 48                  Quary 2023 Sample_048
## 49                  Quary 2023 Sample_049
## 50                  Quary 2023 Sample_050
## 51                  Quary 2023 Sample_051
## 52                  Rörum 2023 Sample_052
## 53                  Rörum 2023 Sample_053
## 54                  Rörum 2023 Sample_054
## 55                  Rörum 2023 Sample_055
## 56            Södra_Rörum 2023 Sample_056
## 57            Södra_Rörum 2023 Sample_057
## 58            Södra_Rörum 2023 Sample_058
## 59            Södra_Rörum 2023 Sample_059
## 60                Veberöd 2023 Sample_060
## 61                Veberöd 2023 Sample_061
## 62                Veberöd 2023 Sample_062
## 63                Veberöd 2023 Sample_063
## 64             Baskemölla 2024 Sample_064
## 65             Baskemölla 2024 Sample_065
## 66             Baskemölla 2024 Sample_066
## 67             Baskemölla 2024 Sample_067
## 68             Baskemölla 2024 Sample_068
## 69             Baskemölla 2024 Sample_069
## 70             Baskemölla 2024 Sample_070
## 71  Brösarps_Norra_Backar 2024 Sample_071
## 72  Brösarps_Norra_Backar 2024 Sample_072
## 73              Fish_Pond 2024 Sample_073
## 74              Fish_Pond 2024 Sample_074
## 75              Fish_Pond 2024 Sample_075
## 76              Fish_Pond 2024 Sample_076
## 77              Fish_Pond 2024 Sample_077
## 78              Fish_Pond 2024 Sample_078
## 79             Hallamölla 2024 Sample_079
## 80             Hallamölla 2024 Sample_080
## 81             Hallamölla 2024 Sample_081
## 82             Hallamölla 2024 Sample_082
## 83             Hallamölla 2024 Sample_083
## 84             Hardeberga 2024 Sample_084
## 85             Hardeberga 2024 Sample_085
## 86             Hardeberga 2024 Sample_086
## 87             Hardeberga 2024 Sample_087
## 88             Hardeberga 2024 Sample_088
## 89             Hardeberga 2024 Sample_089
## 90             Klingstorp 2024 Sample_090
## 91             Klingstorp 2024 Sample_091
## 92             Klingstorp 2024 Sample_092
## 93             Klingstorp 2024 Sample_093
## 94              Knivsåsen 2024 Sample_094
## 95              Knivsåsen 2024 Sample_095
## 96              Knivsåsen 2024 Sample_096
## 97              Knivsåsen 2024 Sample_097
## 98              Knivsåsen 2024 Sample_098
## 99              Knivsåsen 2024 Sample_099
## 100             Knivsåsen 2024 Sample_100
## 101             Knivsåsen 2024 Sample_101
## 102             Knivsåsen 2024 Sample_102
## 103             Knivsåsen 2024 Sample_103
## 104             Knivsåsen 2024 Sample_104
## 105             Knivsåsen 2024 Sample_105
## 106             Knivsåsen 2024 Sample_106
## 107            Kullamölla 2024 Sample_107
## 108            Kullamölla 2024 Sample_108
## 109            Kullamölla 2024 Sample_109
## 110            Kullamölla 2024 Sample_110
## 111            Kullamölla 2024 Sample_111
## 112            Kullamölla 2024 Sample_112
## 113            Petersborg 2024 Sample_113
## 114            Petersborg 2024 Sample_114
## 115            Petersborg 2024 Sample_115
## 116            Petersborg 2024 Sample_116
## 117            Petersborg 2024 Sample_117
## 118            Petersborg 2024 Sample_118
## 119                 Quary 2024 Sample_119
## 120                 Quary 2024 Sample_120
## 121                 Quary 2024 Sample_121
## 122                 Quary 2024 Sample_122
## 123                 Rörum 2024 Sample_123
## 124                 Rörum 2024 Sample_124
## 125                 Rörum 2024 Sample_125
## 126                 Rörum 2024 Sample_126
## 127                 Rörum 2024 Sample_127
## 128                 Rörum 2024 Sample_128
## 129           Södra_Rörum 2024 Sample_129
## 130           Södra_Rörum 2024 Sample_130
## 131           Södra_Rörum 2024 Sample_131
## 132           Södra_Rörum 2024 Sample_132
## 133               Veberöd 2024 Sample_133
## 134               Veberöd 2024 Sample_134
## 135               Veberöd 2024 Sample_135
## 136               Veberöd 2024 Sample_136
## 137               Veberöd 2024 Sample_137
## 138               Veberöd 2024 Sample_138
## 139               Veberöd 2024 Sample_139
## 140               Veberöd 2024 Sample_140

2.4.4 Define Random Levels

Random effects capture hierarchical or context-specific variability that cannot be explained by fixed effects. These random effects model hierarchical or structured variation in ecological systems, such as differences among sampling sites or temporal units. Random effects are critical in hierarchical models like HMSC because they account for context-specific variation and non-independence in the data. By modeling both fixed and random effects, HMSC allows you to partition the variance into components attributable to fixed predictors (e.g. temperature, habitat type) and hierarchical structure (e.g. spatial or temporal variability). Random effects account for structure in the data, such as:

  1. Site-specific effects (e.g. differences among sampling locations).

  2. Temporal variation (e.g. year-to-year differences).

Here, we define three random effects that represent:

  1. Spatial variation (e.g. differences among sampling locations).

  2. Temporal variation (e.g. year-to-year variation).

  3. Sampling unit variation (e.g. differences among 10-minutes censuses).

VP_info_random_level_population <- HmscRandomLevel(units = unique(VP_info_study_design$Population))
VP_info_random_level_year <- HmscRandomLevel(units = unique(VP_info_study_design$Year))
VP_info_random_level_sample <- HmscRandomLevel(units = unique(VP_info_study_design$Sample))

2.5 Define HMSC Model

Several key arguments in the Hmsc function must be specified to properly define the model. Each argument plays a role in structuring the data, accounting for fixed and random effects, and ensuring the hierarchical nature of ecological data is appropriately modeled.

  1. Y = A matrix with the response variables . Represents the community data (e.g. species abundance or composition). Rows correspond to sampling units, and columns correspond to species.

  2. XData = A data frame containing environmental variables (predictors) for each sampling site or sampling unit. Variance partitioning evaluates how much of the variance in Y is explained by these predictors.

  3. XFormula = A formula that specifies the fixed effects in the model. Defines which predictors from XData are included in the model and how they interact.

  4. distr = Specifies the distribution used for the response variables in the model. Here, response variables are assumed to follow a normal distribution.

  5. studyDesign = A data frame specifying the hierarchical structure of the study (e.g. sampling sites, plots, years). Accounts for non-independence in the data and models variation attributable to random effects.

  6. ranLevels = A list specifying the random effects to be modeled. Accounts for variability at specific hierarchical levels (e.g. sampling sites, years). Variance partitioning evaluates how much variance in the response variables is attributable to these random effects.

model_HMSC_data_flower_visits_abundance <- Hmsc(Y = VP_info_flower_visits_abundance_mean_standard,
                                                XData = VP_info_fixed_effects %>% 
                                                  select(Time_Start_Decimal, Sky, Temperature, Wind),
                                                XFormula = VP_info_model_formula_time_weather,
                                                distr = "normal",
                                                studyDesign = VP_info_study_design,
                                                ranLevels = list(Population = VP_info_random_level_population,
                                                                 Year = VP_info_random_level_year,
                                                                 Sample = VP_info_random_level_sample))

2.6 Sample MCMC

The sampleMcmc function is used to run the Markov Chain Monte Carlo (MCMC) algorithm on a HMSC model after it has been specified. It draws samples from the posterior distribution of the model and generates MCMC chains for each parameter.

model_HMSC_samples <- 1000
model_HMSC_thin <- 10
model_HMSC_adaptNf <- ceiling(0.4 * model_HMSC_samples  * model_HMSC_thin)
model_HMSC_transient <- ceiling(0.5 * model_HMSC_samples * model_HMSC_thin)

The main arguments of the sampleMcmc include:

  1. samples = Specifies the number of posterior samples to be drawn after the burn-in period (i.e. the number of MCMC samples that are kept). A higher number of samples increases the precision of your estimates but also increases computational time.

  2. thin = A method for reducing autocorrelation in MCMC chains by keeping only every thin-th sample. Helps reduce the computational burden and the storage of highly correlated samples.

  3. adaptNf = Sets the number of iterations for the adaptation process, during which the MCMC algorithm adjusts the proposal distribution.

  4. transient = Defines the number of transient iterations to discard at the beginning of the MCMC chain. These early iterations are discarded, and only later iterations (after the chain has burned in) are kept.

  5. nChains = The number of MCMC chains to run.

  6. nParallel = Specifies the number of parallel processes to use when running MCMC chains.

model_HMSC_data_flower_visits_abundance <- sampleMcmc(model_HMSC_data_flower_visits_abundance,
                                                      samples = model_HMSC_samples,
                                                      thin = model_HMSC_thin,
                                                      adaptNf = rep(model_HMSC_adaptNf, 3),
                                                      transient = model_HMSC_transient,
                                                      nChains = 2,
                                                      nParallel = 1)
## Computing chain 1
## Chain 1, iteration 200 of 15000 (transient)
## Chain 1, iteration 400 of 15000 (transient)
## Chain 1, iteration 600 of 15000 (transient)
## Chain 1, iteration 800 of 15000 (transient)
## Chain 1, iteration 1000 of 15000 (transient)
## Chain 1, iteration 1200 of 15000 (transient)
## Chain 1, iteration 1400 of 15000 (transient)
## Chain 1, iteration 1600 of 15000 (transient)
## Chain 1, iteration 1800 of 15000 (transient)
## Chain 1, iteration 2000 of 15000 (transient)
## Chain 1, iteration 2200 of 15000 (transient)
## Chain 1, iteration 2400 of 15000 (transient)
## Chain 1, iteration 2600 of 15000 (transient)
## Chain 1, iteration 2800 of 15000 (transient)
## Chain 1, iteration 3000 of 15000 (transient)
## Chain 1, iteration 3200 of 15000 (transient)
## Chain 1, iteration 3400 of 15000 (transient)
## Chain 1, iteration 3600 of 15000 (transient)
## Chain 1, iteration 3800 of 15000 (transient)
## Chain 1, iteration 4000 of 15000 (transient)
## Chain 1, iteration 4200 of 15000 (transient)
## Chain 1, iteration 4400 of 15000 (transient)
## Chain 1, iteration 4600 of 15000 (transient)
## Chain 1, iteration 4800 of 15000 (transient)
## Chain 1, iteration 5000 of 15000 (transient)
## Chain 1, iteration 5200 of 15000 (sampling)
## Chain 1, iteration 5400 of 15000 (sampling)
## Chain 1, iteration 5600 of 15000 (sampling)
## Chain 1, iteration 5800 of 15000 (sampling)
## Chain 1, iteration 6000 of 15000 (sampling)
## Chain 1, iteration 6200 of 15000 (sampling)
## Chain 1, iteration 6400 of 15000 (sampling)
## Chain 1, iteration 6600 of 15000 (sampling)
## Chain 1, iteration 6800 of 15000 (sampling)
## Chain 1, iteration 7000 of 15000 (sampling)
## Chain 1, iteration 7200 of 15000 (sampling)
## Chain 1, iteration 7400 of 15000 (sampling)
## Chain 1, iteration 7600 of 15000 (sampling)
## Chain 1, iteration 7800 of 15000 (sampling)
## Chain 1, iteration 8000 of 15000 (sampling)
## Chain 1, iteration 8200 of 15000 (sampling)
## Chain 1, iteration 8400 of 15000 (sampling)
## Chain 1, iteration 8600 of 15000 (sampling)
## Chain 1, iteration 8800 of 15000 (sampling)
## Chain 1, iteration 9000 of 15000 (sampling)
## Chain 1, iteration 9200 of 15000 (sampling)
## Chain 1, iteration 9400 of 15000 (sampling)
## Chain 1, iteration 9600 of 15000 (sampling)
## Chain 1, iteration 9800 of 15000 (sampling)
## Chain 1, iteration 10000 of 15000 (sampling)
## Chain 1, iteration 10200 of 15000 (sampling)
## Chain 1, iteration 10400 of 15000 (sampling)
## Chain 1, iteration 10600 of 15000 (sampling)
## Chain 1, iteration 10800 of 15000 (sampling)
## Chain 1, iteration 11000 of 15000 (sampling)
## Chain 1, iteration 11200 of 15000 (sampling)
## Chain 1, iteration 11400 of 15000 (sampling)
## Chain 1, iteration 11600 of 15000 (sampling)
## Chain 1, iteration 11800 of 15000 (sampling)
## Chain 1, iteration 12000 of 15000 (sampling)
## Chain 1, iteration 12200 of 15000 (sampling)
## Chain 1, iteration 12400 of 15000 (sampling)
## Chain 1, iteration 12600 of 15000 (sampling)
## Chain 1, iteration 12800 of 15000 (sampling)
## Chain 1, iteration 13000 of 15000 (sampling)
## Chain 1, iteration 13200 of 15000 (sampling)
## Chain 1, iteration 13400 of 15000 (sampling)
## Chain 1, iteration 13600 of 15000 (sampling)
## Chain 1, iteration 13800 of 15000 (sampling)
## Chain 1, iteration 14000 of 15000 (sampling)
## Chain 1, iteration 14200 of 15000 (sampling)
## Chain 1, iteration 14400 of 15000 (sampling)
## Chain 1, iteration 14600 of 15000 (sampling)
## Chain 1, iteration 14800 of 15000 (sampling)
## Chain 1, iteration 15000 of 15000 (sampling)
## Computing chain 2
## Chain 2, iteration 200 of 15000 (transient)
## Chain 2, iteration 400 of 15000 (transient)
## Chain 2, iteration 600 of 15000 (transient)
## Chain 2, iteration 800 of 15000 (transient)
## Chain 2, iteration 1000 of 15000 (transient)
## Chain 2, iteration 1200 of 15000 (transient)
## Chain 2, iteration 1400 of 15000 (transient)
## Chain 2, iteration 1600 of 15000 (transient)
## Chain 2, iteration 1800 of 15000 (transient)
## Chain 2, iteration 2000 of 15000 (transient)
## Chain 2, iteration 2200 of 15000 (transient)
## Chain 2, iteration 2400 of 15000 (transient)
## Chain 2, iteration 2600 of 15000 (transient)
## Chain 2, iteration 2800 of 15000 (transient)
## Chain 2, iteration 3000 of 15000 (transient)
## Chain 2, iteration 3200 of 15000 (transient)
## Chain 2, iteration 3400 of 15000 (transient)
## Chain 2, iteration 3600 of 15000 (transient)
## Chain 2, iteration 3800 of 15000 (transient)
## Chain 2, iteration 4000 of 15000 (transient)
## Chain 2, iteration 4200 of 15000 (transient)
## Chain 2, iteration 4400 of 15000 (transient)
## Chain 2, iteration 4600 of 15000 (transient)
## Chain 2, iteration 4800 of 15000 (transient)
## Chain 2, iteration 5000 of 15000 (transient)
## Chain 2, iteration 5200 of 15000 (sampling)
## Chain 2, iteration 5400 of 15000 (sampling)
## Chain 2, iteration 5600 of 15000 (sampling)
## Chain 2, iteration 5800 of 15000 (sampling)
## Chain 2, iteration 6000 of 15000 (sampling)
## Chain 2, iteration 6200 of 15000 (sampling)
## Chain 2, iteration 6400 of 15000 (sampling)
## Chain 2, iteration 6600 of 15000 (sampling)
## Chain 2, iteration 6800 of 15000 (sampling)
## Chain 2, iteration 7000 of 15000 (sampling)
## Chain 2, iteration 7200 of 15000 (sampling)
## Chain 2, iteration 7400 of 15000 (sampling)
## Chain 2, iteration 7600 of 15000 (sampling)
## Chain 2, iteration 7800 of 15000 (sampling)
## Chain 2, iteration 8000 of 15000 (sampling)
## Chain 2, iteration 8200 of 15000 (sampling)
## Chain 2, iteration 8400 of 15000 (sampling)
## Chain 2, iteration 8600 of 15000 (sampling)
## Chain 2, iteration 8800 of 15000 (sampling)
## Chain 2, iteration 9000 of 15000 (sampling)
## Chain 2, iteration 9200 of 15000 (sampling)
## Chain 2, iteration 9400 of 15000 (sampling)
## Chain 2, iteration 9600 of 15000 (sampling)
## Chain 2, iteration 9800 of 15000 (sampling)
## Chain 2, iteration 10000 of 15000 (sampling)
## Chain 2, iteration 10200 of 15000 (sampling)
## Chain 2, iteration 10400 of 15000 (sampling)
## Chain 2, iteration 10600 of 15000 (sampling)
## Chain 2, iteration 10800 of 15000 (sampling)
## Chain 2, iteration 11000 of 15000 (sampling)
## Chain 2, iteration 11200 of 15000 (sampling)
## Chain 2, iteration 11400 of 15000 (sampling)
## Chain 2, iteration 11600 of 15000 (sampling)
## Chain 2, iteration 11800 of 15000 (sampling)
## Chain 2, iteration 12000 of 15000 (sampling)
## Chain 2, iteration 12200 of 15000 (sampling)
## Chain 2, iteration 12400 of 15000 (sampling)
## Chain 2, iteration 12600 of 15000 (sampling)
## Chain 2, iteration 12800 of 15000 (sampling)
## Chain 2, iteration 13000 of 15000 (sampling)
## Chain 2, iteration 13200 of 15000 (sampling)
## Chain 2, iteration 13400 of 15000 (sampling)
## Chain 2, iteration 13600 of 15000 (sampling)
## Chain 2, iteration 13800 of 15000 (sampling)
## Chain 2, iteration 14000 of 15000 (sampling)
## Chain 2, iteration 14200 of 15000 (sampling)
## Chain 2, iteration 14400 of 15000 (sampling)
## Chain 2, iteration 14600 of 15000 (sampling)
## Chain 2, iteration 14800 of 15000 (sampling)
## Chain 2, iteration 15000 of 15000 (sampling)
saveRDS(model_HMSC_data_flower_visits_abundance, 
        file = paste0(here::here("Pollinator_Observations_HMSC_Workshop.rds")))