Get prior for occupancy model

get_flocker_prior(
  f_occ = NULL,
  f_det,
  flocker_data,
  data2 = NULL,
  multiseason = NULL,
  f_col = NULL,
  f_ex = NULL,
  multi_init = NULL,
  f_auto = NULL,
  augmented = FALSE,
  threads = NULL,
  ...
)

Arguments

f_occ

A brms-type model formula for occupancy. If provided, must begin with "~".

f_det

A brms-type model formula for detection. Must begin with "~". OR, a brmsformula object including formulas for all of the relevant distributional parameters in the desired model (det and at least one of occ, colo, ex, autologistic, and Omega). The $formula element of the brmsformula must be the detection formula, beginning with det ~. This latter option unadvisable except when necessary (e.g. when a nonlinear formula is desired), as input checking is less thorough.

flocker_data

data, generally the output of make_flocker_data().

data2

additional data (e.g. a covariance matrix for a phylogenetic effect)

multiseason

Must be NULL (the default) or one of "colex" or "autologistic". If NULL, data must be formatted for a single-season model. Otherwise, the data must be formatted for a multiseason model. If "colex", a colonization-extinction model will be fit, and `f_col` and `f_ex` must be specified. If "autologistic", an autologistic model will be fit, and `f_col` and `f_ex` must both be NULL.

f_col

A brms-type model formula for colonization in colonization-extinction dynamic models. If provided, must begin with "~".

f_ex

A brms-type model formula for extinction probabilities in colonization-extinction dynamic models. If provided, must begin with "~".

multi_init

Must be NULL unless the model is a dynamic (multiseason) model, in which case must be either "explicit" or "equilibrium". If "explicit", then `f_occ` must be provided to model occupancy probabilities in the first timestep. If "equilibrium", then `f_occ` must be `NULL` and the initial occupancy probabilities are assumed to be the (possibly site-specific) equilibrium probabilities from the colonization- extinction dynamics.

f_auto

Relevant only for autologistic models. A brms-type model formula for the autologistic offset parameter (theta). If provided, must begin with "~".

augmented

Logical. Must be TRUE if data are formatted for a data-augmented multi-species model, and FALSE otherwise.

threads

NULL or positive integer. If integer, the number of threads to use per chain in within chain parallelization. Currently available only with single-season rep-constant models, and must be set to NULL otherwise.

...

additional arguments passed to brms::brm()

Value

A dataframe summarizing the parameters on which priors can be specified and giving the default priors for those parameters. See ?brms::get_prior for further details.

Examples

sfd <- simulate_flocker_data()
fd <- make_flocker_data(
 sfd$obs, 
 sfd$unit_covs,
 sfd$event_covs
)
#> Formatting data for a single-season occupancy model. For details, see make_flocker_data_static. All warnings and error messages should be interpreted in the context of make_flocker_data_static
get_flocker_prior(
 f_occ = ~ s(uc1) + + (1|species),
 f_det = ~ uc1 + ec1 + (1|species),
 flocker_data = fd
)
#>                 prior     class      coef   group resp dpar nlpar lb ub
#>  student_t(3, 0, 2.5) Intercept                                        
#>                (flat)         b                                        
#>                (flat)         b       ec1                              
#>                (flat)         b       uc1                              
#>  student_t(3, 0, 2.5)        sd                                    0   
#>  student_t(3, 0, 2.5)        sd           species                  0   
#>  student_t(3, 0, 2.5)        sd Intercept species                  0   
#>                (flat) Intercept                         occ            
#>                (flat)         b                         occ            
#>                (flat)         b    suc1_1               occ            
#>  student_t(3, 0, 2.5)        sd                         occ        0   
#>  student_t(3, 0, 2.5)        sd           species       occ        0   
#>  student_t(3, 0, 2.5)        sd Intercept species       occ        0   
#>  student_t(3, 0, 2.5)       sds                         occ        0   
#>  student_t(3, 0, 2.5)       sds    s(uc1)               occ        0   
#>        source
#>       default
#>       default
#>  (vectorized)
#>  (vectorized)
#>       default
#>  (vectorized)
#>  (vectorized)
#>       default
#>       default
#>  (vectorized)
#>       default
#>  (vectorized)
#>  (vectorized)
#>       default
#>  (vectorized)