FitBLSP_spring: Fit a Bayesian mixed hierarchical land surface phenology...

FitBLSP_springR Documentation

Fit a Bayesian mixed hierarchical land surface phenology model. Spring only! Note that the result CANNOT be used to plot the fit.

Description

This function fits a Bayesian mixed hierarchical land surface phenology model to the supplied data (can be sparse), and returns phenometrics for the entire time frame. For further explanation, please see the vignette.

Usage

FitBLSP_spring(
  date_vec,
  vi_vec,
  weights_vec = NULL,
  initValues = NULL,
  cred_int_level = 0.9,
  verbose = FALSE
)

Arguments

date_vec

The date vector, be sure to convert the vector to "Date" format or use "yyyy-mm-dd" format string.

vi_vec

The vegetation index vector.

weights_vec

A numeric vector of same length as vi_vec specifying the weights for the supplied observations. Must be between 0 and 1, inclusive.

initValues

Initial values for MCMC sampling. By default, it is assgined NULL. It could also be an object returned from the FitAvgModel() function that fits an averaged model or a numeric vector provided by the user.

cred_int_level

A scalar value from 0 to 1 (exclusive) that specifies the level for equal-tailed credible intervals of the estimated phenometrics. The default level is 0.9, generating ⁠90%⁠ credible intervals. The end points of these intervals define the upper and lower bounds for the estimated phenometrics.

verbose

logical. If TRUE, the progress will be reported.

Value

An object of class BlspFit will be returned. The object contains the estimated spring and autumn phenometrics for each year, the generated model parameter samples, and the input data.

Examples

## Not run: 
data(landsatEVI2)
blsp_fit <- FitBLSP(date_vec = landsatEVI2$date, vi_vec = landsatEVI2$evi2)

## End(Not run)

MrJGao/Bayesian_LSP documentation built on Feb. 11, 2025, 9:36 a.m.