plrs(expr, cghseg, cghcall=NULL, probloss = NULL, probnorm = NULL,
probgain = NULL, probamp = NULL, knots = NULL, continuous = FALSE,
constr = TRUE, constr.slopes = 2, constr.intercepts = TRUE,
min.obs = 3, discard.obs = TRUE)
NULL
.NULL
.NULL
.NULL
.NULL
(default), there are estimated. See details.TRUE
(default) jumps from state to state are also constrained to be non-negativemodify.conf
modify.conf
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.
# 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)
Run the code above in your browser using DataLab