get_single_weight: Get weight between times t and period of interest

Description Usage Arguments

View source: R/GEKS_decomp.R

Description

Get weight between times t and period of interest

Usage

1
2
3
4
5
6
7
8
get_single_weight(
  data_window_a,
  data_window_b,
  all_id,
  id_of_interest,
  period_a,
  period_b
)

Arguments

data_window_a

vector of the times at which price observations were made.
NOTE: times must be of class Date or numeric.

data_window_b

vector of log of prices at the given time

all_id

vector of distinct identification number of consumer goods

id_of_interest

vector of expenditure weights used in the regressions

period_a

either empty (will assume latest periods) or a vector of length two relating to times compared where [1] is the 'start_time' time and [2] is the 'to' time e.g Comparing contribution start_time "1973-04-01" to "1973-05-01" would be c("1973-04-01", "1973-05-01")

period_b

optional. Single number for length of window for the data that regressions are fit on. Note if window_length is present it assumes custom time is latest two periods in window.


MjStansfi/GEKSdecomp documentation built on Sept. 30, 2020, 4:21 p.m.