Description Usage Arguments Details Value Author(s) Examples
The function fits a piecewise linear regression spline to explain gene expression by the segmented DNA copy number. The called copy number values are used as a template for model building.
1 2 3 4 |
expr |
Vector of gene expression values |
cghseg |
Vector of segmented copy number values |
cghcall |
Vector of called copy number values. If not provided, we are reduced to a simple linear model. |
probloss |
Vector of call probabilities associated with state "loss". Default is |
probnorm |
Vector of call probabilities associated with state "normal". Default is |
probgain |
Vector of call probabilities associated with state "gain". Default is |
probamp |
Vector of call probabilities associated with state "amplification". Default is |
knots |
knots or change points. If |
continuous |
Logical, whether the model is continuous (no jump) or not. |
constr |
Logical, whether the model is constrained or not. (this has been implemented to turn on and off easily the constraints) |
constr.slopes |
Type of non-negativity constraints applied on slopes. Either 1 or 2 (default). See details. |
constr.intercepts |
If |
min.obs |
See |
discard.obs |
See |
If cghcall=NULL
, discrete copy number values are omitted, which results in fitting a simple linear model.
If constr.slopes=1
, all slopes are constrained to be non-negative.
If constr.slopes=2
, the slope associated with state "normal" is constrained to be non-negative and all others are forced to be at least equal to the latter.
Two methods are implemented for the estimation of knots. If call probabilities are provided,
a knot is determined so that the sum of (the two adjacent) states membership probabilities is maximized.
Otherwise, this is defined as the midpoint of the interval between the two consecutive states.
The constrained least squares problem is solved using function solve.QP
of package quadprog.
An object of class plrs-class
Gwenael G.R. Leday g.g.r.leday@vu.nl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Simulate data
sim <- plrs.sim(n=80, states=4, sigma=0.5)
# Fit a model
model <- plrs(expr=sim$expr, cghseg=sim$seg, cghcall=sim$cal)
model
# Methods
coef(model)
effects(model)
fitted(model)
knots(model)
model.matrix(model)
plot(model)
predict(model, newcghseg=seq(0,5, length.out=100))
residuals(model)
summary(model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.