Learn R Programming

EmpiricalDynamics (version 0.1.2)

analyze_fixed_points: Analyze Fixed Points

Description

Finds and characterizes fixed points of the discovered equation.

Usage

analyze_fixed_points(
  equation,
  variable,
  range = c(-10, 10),
  n_grid = 100,
  exogenous_values = list()
)

Value

Data frame of fixed points with stability classification.

Arguments

equation

Fitted equation object.

variable

Name of the main variable.

range

Numeric vector of length 2 specifying search range.

n_grid

Number of grid points for initial search.

exogenous_values

Named list of fixed values for exogenous variables.

Examples

Run this code
# \donttest{
# Toy example: dZ = 2*Z - Z^2 (Logistic growth)
data <- data.frame(Z = seq(0.1, 3, length.out=50))
data$dZ <- 2*data$Z - data$Z^2
model <- stats::lm(dZ ~ I(Z) + I(Z^2) + 0, data = data)

# Analyze (note: linear models on dZ aren't direct ODEs, but this demonstrates structure)
# For correct usage, 'equation' should be from fit_specified_equation
fp <- analyze_fixed_points(model, variable = "Z", range = c(0, 3))
# }

Run the code above in your browser using DataLab