Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


podkat (version 1.4.2)

NullModel-class: Class NullModel

Description

S4 class for storing null models for later usage with the assocTest method

Arguments

Objects

Objects of this class are created by calling nullModel.

Details

This class serves as the general interface for storing the necessary phenotype information for a later association test. Objects of this class should only be created by the nullModel function. Direct modification of object slots is strongly discouraged!

Subsetting

For a NullModel object x and an index vector i that is a permutation of 1:length(x), x[i] returns a new NullModel object in which the samples have been rearranged according to the permutation i. This is meant for applications in which the order of the samples in a subsequent association test is different from the order of the samples when the null model was trained/created.

References

http://www.bioinf.jku.at/software/podkat

See Also

nullModel

Examples

Run this code
## read phenotype data from CSV file (continuous trait + covariates)
phenoFile <- system.file("examples/example1lin.csv", package="podkat")
pheno <-read.table(phenoFile, header=TRUE, sep=",")

## train null model with all covariates in data frame 'pheno'
model <- nullModel(y ~ ., pheno)
model
length(model)
residuals(model)

## read phenotype data from CSV file (binary trait + covariates)
phenoFile <- system.file("examples/example1log.csv", package="podkat")
pheno <-read.table(phenoFile, header=TRUE, sep=",")

## train null model with all covariates in data frame 'pheno'
model <- nullModel(y ~ ., pheno)
model
length(model)
residuals(model)

## "train" simple Bernoulli model on a subset of 100 samples
model <- nullModel(y ~ 0, pheno[1:100, ])
model
length(model)
residuals(model)

Run the code above in your browser using DataLab