# \donttest{
# Simple workflow example
# Load example data
extdata_path <- system.file('extdata', package = 'CoxMK')
plink_prefix <- file.path(extdata_path, 'sample')
pheno_data <- read.table(file.path(extdata_path, 'tte_phenotype.txt'),
header = TRUE, stringsAsFactors = FALSE)
covar_data <- read.table(file.path(extdata_path, 'covariates.txt'),
header = TRUE, stringsAsFactors = FALSE)
covar_data <- covar_data[, c("age", "sex", "bmi", "smoking")]
# Run complete analysis
result <- cox_knockoff_analysis(
plink_prefix = plink_prefix,
time = pheno_data$time,
status = pheno_data$status,
covariates = covar_data,
M = 3,
fdr = 0.1
)
# View results
print(result$selected_vars)
print(result$summary)
# }
Run the code above in your browser using DataLab