# import data
library(splines)
data(kidney)
age <- kidney$age
sex <- kidney$sex
kidexpr <- kidney$kidexpr
cov <- data.frame(sex = sex, age = age)
# create models
null_model <- ~sex
full_model <- ~sex + ns(age, df = 4)
# create deSet object from data
de_obj <- build_models(data = kidexpr, cov = cov, null.model = null_model,
full.model = full_model)
# run surrogate variable analysis
de_sva <- apply_sva(de_obj)
# run odp/lrt with surrogate variables added
de_odp <- odp(de_sva, bs.its = 30)
summary(de_odp)
Run the code above in your browser using DataLab