fit_saw_iter: Iterative threshold finder

Description Usage Arguments

View source: R/post_saw.R

Description

Solve for threshold using iterative procedure which sets the threshold as the smallest absolute coefficient in iteration until convergence.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fit_saw_iter(
  y,
  X,
  Z = NULL,
  time_effect = TRUE,
  id_effect = TRUE,
  max_iter = 20,
  choose_min = TRUE,
  numerical_threshold = 0.001,
  return_info = FALSE
)

Arguments

y

Matrix of labels. Has dimension T x N.

X

List of feature matrices. The pth entry corresponds to the design matrix of the pth covariate and has dimension T x N.

Z

Instruments corresponding to the argument X. If NULL all X variables are their own instrument.

time_effect

Boolean indicating if a time effect is to be estimated.

id_effect

Boolean indicating if an individual effect is to be estimated and returned.

max_iter

Maximum number of iterations. Default 20.

choose_min

Boolean, if true use minimum of absolute coefficients else max.

numerical_threshold

Threshold when to stop iteration. Default 0.001.

return_info

Return additional info on model fit.


timmens/sawr documentation built on Aug. 30, 2021, 8:09 a.m.