ExpandData {CNVtools} | R Documentation

## Expands a CNV input data frame for the maximum likelihood routines

### Description

This function should be invisible to most users. The methods within CNV.fitModel require that the CNV data is expanded N times where N is the number of copies. This allows the use of Generalized Linear Models (GLM) in constraining the Gaussian mixture component locations and spreads to be functions of the copy number.

### Usage

    ExpandData(batch, trait, names, signal, ncomp, association.strata = NULL)

### Arguments

`batch` | List of vectors, one vector per batch in the data. Because each element in the list corresponds to a batch, each element should be a vector with a unique values repeated as many times as the number of data point in the batch.
`trait` | List of vectors, one vector per batch in the data. Each element of the list can be either a vector of quantitative traits or a vector of 0 and 1 in a case/control framework
`names` | List of vectors, one vector per batch in the data containing names for each data point, typically individual IDs.
`signal` | List, one vector per batch in the data.
`ncomp` | Integer, number of components one wants to fit to the data
`association.strata` | Optional, a factor vector containing the strata when using a stratified test of association.

### Value

An expanded data frame needed for CNVfit.binary.

### Author(s)

Vincent Plagnol vincent.plagnol@cimr.cam.ac.uk and Chris Barnes christopher.barnes@imperial.ac.uk

### See Also

CNVtest.binary

[Package CNVtools version 1.76.0 Index]