dfa_trends: Get the trends from a DFA as a data frame

View source: R/dfa_trends.R

dfa_trendsR Documentation

Get the trends from a DFA as a data frame

Description

Get the trends from a DFA as a data frame

Usage

dfa_trends(rotated_modelfit, years = NULL)

Arguments

rotated_modelfit

Output from rotate_trends.

years

Optional numeric vector of years.

Value

A data frame with the following columns: time is the time step, trend_number is an identifier for each trend, estimate is the trend mean, lower is the lower CI, and upper is the upper CI.

See Also

plot_trends fit_dfa rotate_trends

Examples

set.seed(1)
s <- sim_dfa(num_trends = 1)
m <- fit_dfa(y = s$y_sim, num_trends = 1, iter = 50, chains = 1)
r <- rotate_trends(m)
trends <- dfa_trends(r)

bayesdfa documentation built on Oct. 11, 2023, 5:14 p.m.