Learn R Programming

EmpiricalDynamics (version 0.1.2)

specify_variables: Specify Variable Types for Dynamical Analysis

Description

Classifies variables in a dataset according to their role in the dynamical system being studied.

Usage

specify_variables(
  data,
  endogenous = NULL,
  endogenous_coupled = NULL,
  coupled = NULL,
  exogenous = NULL,
  slow_parameter = NULL,
  time = NULL,
  time_col = NULL
)

Value

The input data.frame with variable specifications added as the "var_spec" attribute.

Arguments

data

A data.frame containing the time series data.

endogenous

Character vector of endogenous state variable names.

endogenous_coupled

Character vector of coupled endogenous variables.

coupled

Alias for endogenous_coupled (for compatibility).

exogenous

Character vector of exogenous forcing variable names.

slow_parameter

Character vector of slowly-varying parameter names.

time

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

time_col

Alias for time (for compatibility).

Details

Variable types:

  • endogenous: Variables whose dynamics are modeled (appear as dZ/dt).

  • endogenous_coupled: Variables that co-evolve with endogenous vars.

  • exogenous: Variables that influence the system but are not modeled.

  • slow_parameter: Variables that change on much longer timescales.

Examples

Run this code
data <- data.frame(
  time = 1:10,
  profit_rate = runif(10),
  capital_stock = runif(10),
  interest_rate = runif(10)
)

data <- specify_variables(data,
  endogenous = "profit_rate",
  endogenous_coupled = "capital_stock",
  exogenous = "interest_rate"
)
attr(data, "var_spec")

Run the code above in your browser using DataLab