The function for nuisance parameter estimation in simple_pc_testing() and debiased_pc_testing().
estimate_nuisance_pc(
nuisance_sample_1,
nuisance_sample_2 = NULL,
pca_method = "sparse_pca",
mean_method = "naive",
num_latent_factor = 1,
local_environment = NA
)A list of estimated nuisance quantities.
Leading principle components
Sample mean for group 1
Sample mean for group 1
Eigenvalue for each principle compoenent.
Noise variance, I need this to construct block-diagonal estimates of the covariance matrix.
Group 1 sample. Each row is a subject and each column corresponds to a feature.
Group 2 sample. Each row is a subject and each column corresponds to a feature.
Methods used to estimate principle component The default is "sparse_pca", using sparse PCA from package PMA. Other choices are "dense_pca"---the regular PCA; and "hard"--- hard-thresholding PCA, which also induces sparsity.
Methods used to estimate the mean vector. Default is sample mean "naive". There is also a hard-thresholding sparse estiamtor "hard".
Number of principle to be estimated/tested. Default is 1.
A environment for hyperparameters shared between folds.