file <- system.file("extdata", "test7_TFE.csv", package="PhenStat")
test <- PhenList(dataset=read.csv(file),
testGenotype="het",
refGenotype = "WT",
dataset.colname.sex="sex",
dataset.colname.genotype="Genotype",
dataset.values.female="f",
dataset.values.male= "m",
dataset.colname.weight="body.weight",
dataset.colname.batch="Date_of_procedure_start")
test_TF <- TFDataset(test,depVariable="Cholesterol")
# when "testDataset" function's argument "callAll" is set to FALSE
# only "startTFModel" function is called - the first step of TFE framework
result <- testDataset(test_TF,
depVariable="Cholesterol",
callAll=FALSE,
method="TF")
# print out formula that has been created
analysisResults(result)$model.formula.genotype
# print out batch effect's significance
analysisResults(result)$model.effect.batch
Run the code above in your browser using DataLab