Learn R Programming

EmpiricalDynamics (version 0.1.2)

explore_dynamics: Comprehensive Dynamics Exploration

Description

Generates a battery of diagnostic plots to explore the dynamical structure of the data and suggests potential functional forms.

Usage

explore_dynamics(
  data,
  target,
  predictors = NULL,
  time = NULL,
  n_bins = 10,
  include = "all"
)

Value

A list containing:

  • suggestions: Character vector of suggested functional forms

  • statistics: Data frame of diagnostic statistics

  • plots: List of ggplot objects (if available)

Arguments

data

Data frame containing the time series.

target

Name of the target variable (or its derivative).

predictors

Character vector of predictor variable names.

time

Name of the time column (auto-detected if NULL).

n_bins

Number of bins for conditional analysis.

include

Which plots to include: "all", or subset of c("timeseries", "phase", "bivariate", "interactions").

Examples

Run this code
# \donttest{
# Toy example
data <- data.frame(
  time = 1:50,
  Z = sin(seq(0, 10, length.out = 50)),
  X = cos(seq(0, 10, length.out = 50))
)
data$dZ <- c(diff(data$Z)/diff(data$time), NA)
data <- na.omit(data)

result <- explore_dynamics(data, 
  target = "dZ",
  predictors = c("Z", "X")
)
print(result$suggestions)
# }

Run the code above in your browser using DataLab