Skip to contents

Package persephone defines a number of model classes. The main functions of the package receive a model object and edit its slots.

Value

An S4 object of the appropriate class.

Details

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 package cronus. 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 package cronus. The fitted data. Filled by function fit().

metrics

an object of class ProgressMetrics. The model performance metrics. Filled by function evaluate().

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
}