Find optimal threshold parameter using k-fold cross validation and return model fitted using this threshold.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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. |
n_folds |
Number of folds to use in cross validation step. Default 4. It makes sense that n_folds is multiple of n_cores. |
grid_size |
Number of s_thresh candidates. |
prefer_sparsity |
Boolean indicating whether the cross-validation. procedure should place a naive penalty on non-sparse solutions. |
parallel |
Boolean indicating if code is parallelized over folds. |
n_cores |
How many cores to use for paralellization. Default to number of available logical cores. It makes sense that n_folds is multiple of n_cores. |
return_info |
Return additional info on model fit. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.