
persephone
Model classes
ProgressModel-class.Rd
Package 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
label
character. The object's label.
region
an object of class Region, defined in package
cronus
. A region of interest.data
an object of class
Progress
, defined in packagecronus
. The data on which the model will be fitted.model
ANY. An object holding information about the fitting. Filled by function
fit()
.fitted
an object of class
Progress
, defined in packagecronus
. The fitted data. Filled by functionfit()
.metrics
an object of class
ProgressMetrics
. The model performance metrics. Filled by functionevaluate()
.formula
character. The model formula. See details.
nominal
character. The nominal effects. See details.
scale
character. The scale effects. See details.
link
character. The link function used.
threshold
character. The type of thresholds used. See details.
nAGQ
numeric. 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
}