tcasub {TCA} | R Documentation |
Subsetting features from a TCA model
Description
Extracts from a fitted TCA model (i.e. a value returned by the function tca
) a subset of the features.
Usage
tcasub(tca.mdl, features, log_file = "TCA.log", debug = FALSE, verbose = TRUE)
Arguments
tca.mdl |
The value returned by applying the function |
features |
A vector with the identifiers of the features to extract (as they appear in the rows of |
log_file |
A path to an output log file. Note that if the file |
debug |
A logical value indicating whether to set the logger to a more detailed debug level; set |
verbose |
A logical value indicating whether to print logs. |
Details
This function allows to extract a subset of the features from a fitted TCA model (i.e. from a value returned by the function tca
). This allows, for example, to extract and then perform post-hoc tests on only a small set of candidate features (e.g., using the function tcareg
), without the need to run tca
again for fitting the model to the candidate features.
Value
A list with the estimated parameters of the model for the given set of features.
W |
Equals to |
mus_hat |
A |
sigmas_hat |
A |
tau_hat |
Equals to |
gammas_hat |
A |
deltas_hat |
A |
gammas_hat_pvals |
A |
gammas_hat_pvals.joint |
A |
deltas_hat_pvals |
A |
Examples
data <- test_data(50, 20, 3, 0, 0, 0.01)
tca.mdl <- tca(X = data$X, W = data$W)
tca.mdl.subset <- tcasub(tca.mdl, rownames(data$X)[1:10])
y <- matrix(rexp(50, rate=.1), ncol=1)
rownames(y) <- rownames(data$W)
# run tcareg test with an outcome y:
res <- tcareg(data$X[1:10,], tca.mdl.subset, y, test = "joint")