Bayesian inference for the combined Type 1 and Type 2 moult model

uz12_linpred(
  moult_index_column,
  moult_cat_column,
  date_column,
  start_formula = ~1,
  duration_formula = ~1,
  sigma_formula = ~1,
  data,
  init = "auto",
  log_lik = TRUE,
  ...
)

Arguments

moult_index_column

the name the column in data containing moult indices, i.e. a numeric vector of (linearized) moult scores (0 = old plumage,1 = new plumage).

moult_cat_column

the name the column in data containing moult categories, i.e. a numeric vector of categorical moult codes (1 = old plumage,2 = moulting,3 = new plumage)

date_column

the name the column in data containing sampling dates, encoded as days since an arbitrary reference date, i.e. a numeric vector

start_formula

model formula for start date

duration_formula

model formula for duration

sigma_formula

model formula for start date sigma

data

Input data frame must contain a numeric column "date" and a column "moult_cat" which is a numeric vector of categorical moult codes (1 = old plumage,2 = moulting,3 = new plumage).

init

Specification of initial values for all or some parameters. Can be the string "auto" for an automatic guess based on the data, or any of the permitted rstan options: the digit 0, the strings "0" or "random", or a function. See the detailed documentation for the init argument in ?rstan::stan.

log_lik

boolean retain pointwise log-likelihood in output? This enables model assessment and selection via the loo package. Defaults to true, can lead to very large output arrays if sample size is large.

...

Arguments passed to rstan::sampling (e.g. iter, chains).

Value

An object of class stanfit returned by rstan::sampling