Learn R Programming

sspm (version 1.1.0)

raw_formula: Accessing OR replacing sspm_formula model elements

Description

All methods described here allow to access the elements of contained in objects of class sspm_formula.

Usage

raw_formula(sspm_object)

# S4 method for sspm_formula raw_formula(sspm_object)

raw_formula(object) <- value

# S4 method for sspm_formula raw_formula(object) <- value

translated_formula(sspm_object)

# S4 method for sspm_formula translated_formula(sspm_object)

translated_formula(object) <- value

# S4 method for sspm_formula translated_formula(object) <- value

formula_vars(sspm_object)

# S4 method for sspm_formula formula_vars(sspm_object)

formula_vars(object) <- value

# S4 method for sspm_formula formula_vars(object) <- value

formula_type(sspm_object)

# S4 method for sspm_formula formula_type(sspm_object)

formula_type(object) <- value

# S4 method for sspm_formula formula_type(object) <- value

is_fitted(sspm_object)

# S4 method for sspm_formula is_fitted(sspm_object)

is_fitted(object) <- value

# S4 method for sspm_formula is_fitted(object) <- value

spm_response(sspm_object)

# S4 method for sspm_formula spm_response(sspm_object)

spm_response(object) <- value

# S4 method for sspm_formula spm_response(object) <- value

spm_lagged_vars(sspm_object)

# S4 method for sspm_formula spm_lagged_vars(sspm_object)

spm_lagged_vars(object) <- value

# S4 method for sspm_formula spm_lagged_vars(object) <- value

Value

The object in the required slot.

Arguments

sspm_object

[sspm_formula] An object of class sspm_formula.

object

[sspm_formula] An object of class sspm_formula.

value

typically an array-like R object of a similar class as x.

Examples

Run this code
form <- new("sspm_formula",
            raw_formula = as.formula("weight_per_km2 ~ smooth_time()"),
            translated_formula = as.formula("weight_per_km2 ~ s(year_f,
                      k = 24L, bs = 're', xt = list(penalty = pen_mat_time))"),
                    vars = list(pen_mat_time = matrix(),
                                pen_mat_space = matrix()),
                    response = "weight_per_km2")
translated_formula(form)

Run the code above in your browser using DataLab