View source: R/msqrob-framework.R
StatModel-class | R Documentation |
The StatModel
class contains a statistical model as applied on a
feature.
Models are created by the dedicated user-level functions
(msqrob()
, mqrobAggregate()
) or manually, using the
StatModel()
constructor. In the former case, each quantitative
feature is assigned its statistical model and the models are stored
as a variable in a DataFrame
object, as illustred in the example
below.
Function for constructing a new StatModel
object.
## S4 method for signature 'StatModel'
show(object)
StatModel(
type = "fitError",
params = list(),
varPosterior = NA_real_,
dfPosterior = NA_real_
)
object |
|
type |
default set to fit-error, can be a "lm", "rlm" (robust lm with M estimation), "lmer" (when mixed models or ridge regression is adopted), "quasibinomial" (when peptide counts are fitted) |
params |
A list containing the parameters of the fitted model |
varPosterior |
Numeric, posterior variance, default is NA |
dfPosterior |
Numeric, posterior degrees of freedom, default is NA |
A StatModel object
type
character(1)
defining type of the used model. Default
is "fitError"
, i.e. a error model. Other include "lm"
,
"rlm"
, ...
params
A list()
containing information of the used model.
varPosterior
numeric()
of posterior variance.
dfPosterior
numeric()
of posterior degrees of freedom.
Oliver M. Crook, Laurent Gatto, Lieven Clement
## A fully specified dummy model
myModel <- StatModel(
type = "rlm",
params = list(x = 3, y = 7, b = 4),
varPosterior = c(0.1, 0.2, 0.3),
dfPosterior = c(6, 7, 8)
)
myModel
## A collection of models stored as a variable in a DataFrame
mod1 <- StatModel(type = "rlm")
mod2 <- StatModel(type = "lm")
df <- DataFrame(x = 1:2)
df$mods <- c(mod1, mod2)
df
# TODO
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.