
persephone Model classes
ProgressModel-class.RdPackage persephone defines a number of model classes. The main functions
of the package receive a model object and edit its slots.
Details
ProgressBM is based on
glm().ProgressBMM is based on
lme4::glmer().ProgressCLM is based on
ordinal::clm().ProgressCLMm is based on
ordinal::clm2().
Slots
labelcharacter. The object's label.
regionan object of class Region, defined in package
cronus. A region of interest.dataan object of class
Progress, defined in packagecronus. The data on which the model will be fitted.modelANY. An object holding information about the fitting. Filled by function
fit().fittedan object of class
Progress, defined in packagecronus. The fitted data. Filled by functionfit().metricsan object of class
ProgressMetrics. The model performance metrics. Filled by functionevaluate().formulacharacter. The model formula. See details.
nominalcharacter. The nominal effects. See details.
scalecharacter. The scale effects. See details.
linkcharacter. The link function used.
thresholdcharacter. The type of thresholds used. See details.
nAGQnumeric. The number of quadrature points to be used in the adaptive Gauss-Hermite quadrature approximation to the marginal likelihood. See details.
Examples
if (FALSE) {
# Create a Region object
library(cronus)
region <- Region(name = "nebraska", type = "us state",
div = c(country = "United States", state = "Nebraska"))
# Create a model
object1 <- new("ProgressBM",
region = region,
crop = "Corn",
data = data_progress$Corn,
formula = "CumPercentage ~ Time + agdd") # ProgressModel
# Create another model
object2 <- new("ProgressCLM",
region = region,
crop = "Soybeans",
data = data_progress$Soybeans,
formula = "Stage ~ Time + agdd + adayl") # ProgressModel
# Concatenate the models
object <- c(object1, object2) # ProgressModelList
}