ozab: Fit OZAB Model

Description Usage Arguments Value Examples

View source: R/model_functions.R

Description

Fit OZAB Model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ozab(
  df,
  presence_formula,
  abundance_formula,
  cutpoint_scheme,
  link_function = "logit",
  ...,
  prior_presence_mean = 0,
  prior_abundance_mean = 0,
  prior_presence_var = 10,
  prior_abundance_var = 10
)

Arguments

df

Tibble containing Species, Cover Class, and Covariates

presence_formula

Formula for Specifying Presence / Absence

abundance_formula

Formula for Specifying Abundance

cutpoint_scheme

Vector of Cutpoint Scheme Used

link_function

Link Function to Use; Options are logit and probit; Defaults to logit

...

Additional Parameters to be Passed to Stan

prior_presence_mean

A vector of mean values for prior presence coefficients

prior_abundance_mean

A vector of mean values for prior abundance coefficients

prior_presence_var

A vector of variance values for prior presence coefficients

prior_abundance_var

A vector of variance values for prior abundance coefficients

Value

Stan Object Fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
  sagebrush2 <-
sagebrush %>%
 filter(Species == 'Artemisia tridentata') %>%
 add_presence(cover_class_col = `Cover Class`) %>%
 mutate(
   `Dist. to Bound` = `Dist. to Bound` / 1000,
   Topography2 = Topography^2
 )
ozab(
 presence_formula = Presence ~ Topography + Fire + `Dist. to Bound`,
 abundance_formula = `Cover Class` ~ Topography + Topography2 + Fire,
 cutpoint_scheme = daubenmire(),
 chains = 1
)

## End(Not run)

EriqLaplus/OZAB documentation built on March 31, 2021, 4:35 a.m.