as_disag.ts: Create a data.frame suitable for disaggregation regression...

View source: R/as_disag.R

as_disag.tsR Documentation

Create a data.frame suitable for disaggregation regression modelling from a time series object.

Description

An example time series object is daily stock price growth

Usage

## S3 method for class 'ts'
as_disag(data, lags = 10, ID = "add", ...)

Arguments

data

A vector of class time series representing a response e.g. in stock data the growth

lags

An integer saying how many lags should be taken

ID

Either the name of the grouping variable or "add" which means an ID variable will be added 1:nrow()

...

any other arguments

Value

as_disag.ts returns a dataframe that can be used with all agouti functions.

More stuff

NA

Examples

data(stock_vector)
disag_data <- as_disag(data=stock_vector)

timcdlucas/agouti documentation built on Feb. 8, 2024, 6:12 p.m.