adj_pvalues(object)
"adj_pvalues"(object)
"weights"(object, levels_only = FALSE)
thresholds(object, ...)
"thresholds"(object, levels_only = FALSE)
pvalues(object)
"pvalues"(object)
weighted_pvalues(object)
"weighted_pvalues"(object)
covariates(object)
"covariates"(object)
covariate_type(object)
"covariate_type"(object)
groups_factor(object)
"groups_factor"(object)
nfolds(object)
"nfolds"(object)
nbins(object)
"nbins"(object)
alpha(object)
"alpha"(object)
rejections(object, ...)
"rejections"(object)
rejected_hypotheses(object, ...)
"rejected_hypotheses"(object)
regularization_term(object)
"regularization_term"(object)
m_groups(object)
"m_groups"(object)
as.data.frame_ihwResult(x, row.names = NULL, optional = FALSE, ...)
"as.data.frame"(x, row.names = NULL, optional = FALSE, ...)
"nrow"(x)
"show"(object)adj_pvalues: Extract adjusted pvalues weights: Extract weights thresholds: Calculate ihw thresholds pvalues: Extract pvalues weighted_pvalues: Extract weighted pvalues covariates: Extract covariates covariate_type: Extract type of covariate ("ordinal" or "nominal") groups_factor: Extract factor of stratification (grouping) variable nfolds: Extract number of folds nbins: Extract number of bins alpha: Extract nominal significance (alpha) level rejections: Total number of rejected hypotheses by ihw procedure rejected_hypotheses: Get a boolean vector of the rejected hypotheses regularization_term: Extract vector of regularization parameters used for each stratum m_groups: Extract total number of hypotheses within each stratum as.data.frame: Coerce ihwResult to data frame nrow: Return number of p-values show: Convenience method to show ihwResult object
dfweightsalphanbinsnfoldsregularization_termm_groupspenaltycovariate_typeadjustment_typereg_path_informationsolver_information
save.seed <- .Random.seed; set.seed(1)
X <- runif(n = 20000, min = 0.5, max = 4.5) # Covariate
H <- rbinom(n = length(X), size = 1, prob = 0.1) # Is the null hypothesis (mean=0) true or false ?
Z <- rnorm(n = length(X), mean = H * X) # Z-score
.Random.seed <- save.seed
pvalue <- 1 - pnorm(Z) # pvalue
ihw_res <- ihw(pvalue, covariates = X, alpha = 0.1)
rejections(ihw_res)
colnames(as.data.frame(ihw_res))
Run the code above in your browser using DataLab