Description Usage Arguments Details Value Examples
View source: R/cross_fit_helper.R
Implements k-fold cross-fitting with the supplied method, is a helper function that the user should not need.
1 | fit_cross(Y_def, X_def, W_def, data.size, fun.call, k.folds, method_used)
|
Y_def |
An argument that control the Y input (used for argument passing) |
X_def |
An argument that control the X input (used for argument passing) |
W_def |
An argument that control the W input (used for argument passing) |
data.size |
Parses the length of the dataset (nrow) for splitting. |
fun.call |
Designates the function to use for cross-fitting. |
k.folds |
The number of k-folds for daataset splitting, defaults to 3. |
method_used |
The method to used when applying predict trough a helper function (do not worry about this!). |
This only implements the k-fold crossfitting, not the n.repeat simulation - if you intend to use this function, it works as a 'naive' double machine learning.
A list with four elements: The mean estimate of θ, the standard error of the mean estimate, the associated moment conditions, and the estimated heterogenous effects for a combined estimate from a simulation run.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.