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

Description Usage Arguments Value See Also Examples

View source: R/dfa_trends.R

Description

Get the trends from a DFA as a data frame

Usage

1
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

1
2
3
4
5
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 May 29, 2021, 1:06 a.m.