compute_T_star: Compute lengths of fine-scale chunks

View source: R/compute_T_star.R

compute_T_starR Documentation

Compute lengths of fine-scale chunks

Description

This helper function computes lengths of fine-scale chunks in the hierarchical case.

Usage

compute_T_star(horizon, period, dates = NULL, seed = NULL)

Arguments

horizon

The element controls$horizon, i.e., an integer vector of length 2, where the second entry can be NA_integer_.

period

The element controls$period, i.e. one of "w", "m", "q", or "y".

dates

A character vector of dates of empirical fine-scale data (if any). By default, dates = NULL.

seed

Set a seed for the simulation of flexible chunk lengths. By default, seed = NULL (i.e., no seed).

Value

An integer vector of fine-scale chunk sizes.

Examples

## Not run: 
### weekly fine-scale chunk sizes for 10 coarse-scale observations
horizon <- c(10, NA_integer_)
period <- "w"
compute_T_star(horizon, period)

## End(Not run)


fHMM documentation built on Oct. 12, 2023, 5:10 p.m.