calulate.mu_Xk.RdThis function calculates mu(Xk) for null replicates Xk.
calulate.mu_Xk( binary = FALSE, X, i2, S, out, nulls.list_S = NULL, gamma_X.list_S = NULL, useMC = TRUE, Xmodel = "gaussian", algo = "lasso", predict.fun, cv.rule = "min", verbose = FALSE )
| binary | whether the response variable is binary (will be converted to factors if TRUE; default: FALSE). |
|---|---|
| X | a n by p matrix, containing all the covariates. |
| i2 | the index of inference samples. |
| S | a list of selected variables. |
| out | the fitted model from train.fun. |
| nulls.list_S | a list of length |S| whose element is a (|i2|*K)-dimensional vector, which contains K set of null samples. |
| gamma_X.list_S | a list of length |S|, with each element being the linear coefficient of the given covariate on the other covariates (only relevant when Xmodel = "gaussian"; default: NULL). |
| useMC | whether to use Monte Carlo estimators of the conditional quantities (default: TRUE). |
| Xmodel | model of the covaraites (default: "gaussian"). |
| algo | a fitting algorithm (default: "lasso"). |
| predict.fun | a function to produce predictions of the response variable with a given fitted model from train.fun and a matrix of new covariate values. |
| cv.rule | indicates which rule should be used for the predict function, either "min" (the usual rule) or "1se" (the one-standard- error rule); default: "min"). See the glmnet help files for details. |
| verbose | whether to show intermediate progress (default: FALSE). |
A list of kength |S|, whose element is the matrix of mu(Xk) with dimension n2-by-K or n2-by-1.
Zhang L, Janson L (2020). “Floodgate: Inference for Model-Free Variable Importance.” arXiv preprint arXiv:2007.01283.
Other methods:
calculate.V_mean(),
fg.inference.binary(),
fg.inference(),
fit.mu(),
floodgate.binary(),
floodgate(),
inference_general()