Usage
CNVtest.qt(signal, batch, sample = NULL, qt = NULL, ncomp, n.H0=5, n.H1=0,
model.mean = '~ strata(cn)', model.var = '~ strata(cn)',
model.qt = '~ cn', beta.estimated = NULL, start.mean = NULL, start.var = NULL,
control=list(tol=1e-5, max.iter = 3000, min.freq=4) )
Arguments
signal
The vector of intensity values, meant to be a proxy for the
number of copies.
batch
Factor, that describes how the data points should be
separated in batches, corresponding to different tehnologies to
measure the number of DNA copies, or maybe different cohorts in a
case control framework.
sample
Optional (but recommended). A character vector
containing a name for each data point, typically the name of the
individuals.
qt
Quantitative trait values.
ncomp
Number of components one wants to fit to the data.
n.H0
Number of times the EM should be used to maximize the
likelihood under the null hypothesis of no association, each time
with a different random starting point. The run that maximizes the
likelihood is stored.
n.H1
Number of times the EM should be used to maximize the
likelihood under the alternate hypothesis of association present, each time
with a different random starting point. The run that maximizes the
likelihood is stored.
model.mean
Formula that relates the location of the means for
the clusters with the number of copies and the different batches if
there are multiple batches. The default is ``~ strata(cn)''
that assumes a free model for the cluster locations for each copy
number.'' ~ strata(cn, batch)'' assumes free variances for each
combination of copy number and batch. More traditional model
specifications such as ' ~ cn' are also possible, but will converge
more slowly and might have numerical stability issues.
model.var
A formula as above, but to model the variances. The
default is the free variance model for each copy number ``~
strata(cn)'' and the same model specifications as model.means can be
used.
model.qt
A formula that relates the number of copies with
the case/control status. The default is a linear trend model ``~
cn''. Note that this formula will only matter under the alternate
hypothesis and has no effect under the null.
beta.estimated
Optional. It is used if one wants to fit the
model for a particular value of the log odds parameter beta
(essentially if one is interested in the profile likelihood).
In this case the disease model should be set to ' ~ 1' and the model
to 'H1'. It will then provide the best model assuming the
value of beta (the log odds ratio parameter) provided by the user.
start.mean
Optional. A set of starting values for the
means. Must be numeric and the size must match ncomp.
start.var
Optional. A set of starting values for the
variances. Must be numeric and the size must match ncomp.
control
A list of parameters that control the behavior of the fitting.