qb.data {qtlbim}R Documentation

Prepares data for qb.mcmc

Description

This function selects trait(s) and covariates from a cross object to build a model (qb.model) for MCMC (qb.mcmc).

Usage

qb.data(cross, pheno.col = 1, trait = c("normal","binary","ordinal"), 
  censor = NULL, fixcov = c(0), rancov = c(0), boxcox = FALSE,
  standardize = FALSE, ...) 

Arguments

cross An object of class cross. See read.cross for details.
pheno.col the column number for the phenotype used by model. Currently, only one phenotype can be analyzed at a time.
trait Type of the quatitative trait or dependent variable: "normal" or "binary" or "ordinal".
censor Matrix of censor values with 2 columns and nind(cross) rows. Details needed here.
fixcov list of fixed covariates. The column number(s) in cross$pheno which is(are) considered as fixed covariates.
rancov list of random covariates.The column number(s) in cross$pheno which is(are) considered as random covariates.
boxcox Indicates whether to use a Boxcox transformation for the dependent variable or not: TRUE or FALSE. Note: trait has to be "normal" and all phenotypic values have to be positive for using this option.
standardize Indicates whether to standardize the dependent variable or not: TRUE or FALSE. Note: trait has to be "normal" to use this option.
... Extra terms not used.

Details

This function picks the relevant part of the data from the cross object and prepares data for qb.model and qb.mcmc It can also standardize or transform continuous data if specified.

Value

yvalue vector of the values of the dependent variable.
ncategory number of category type if it is non-normal data.
envi environment effect: TRUE or FALSE.
nfixcov number of fixed covariates.
nrancov number of random covariates.
fixcoef values of the fixed covariate(s) for all individuals.
rancoef values of the random covariate(s) for all individuals.
nran number of categories defining the random covariate.
lamda value of lamda, the transformation parameter for the boxcox transformation.

Note

This function returns a list and hence should have a differenct name from that of the cross object.

Author(s)

Dr. Nengjun Yi, et al., nyi@ms.ssg.uab.edu

References

http://www.qtlbim.org

See Also

qb.genoprob, qb.model, qb.mcmc

Examples


qbData <- qb.data(cross, pheno.col = 3, rancov = 2, fixcov = 1)

[Package qtlbim version 1.9.3 Index]