Learn R Programming

lmdme (version 1.14.0)

fitted.values: Getters for lmdme object

Description

To obtain lmdme slot information, according to the given function call (see Values). If a term parameter is not specified, it will return all the available terms. Otherwise, just the one specified.

Usage

"fitted.values"(object, term=NULL, drop=TRUE)
"fitted"(object, term=NULL, drop=TRUE)
"coef"(object, term=NULL, drop=TRUE)
"coefficients"(object, term=NULL, drop=TRUE)
"resid"(object, term=NULL, drop=TRUE)
"residuals"(object, term=NULL, drop=TRUE)
F.p.values(object, term=NULL, drop=TRUE)
"F.p.values"(object, term=NULL, drop=TRUE)
p.values(object, term=NULL, drop=TRUE)
"p.values"(object, term=NULL, drop=TRUE)
modelDecomposition(object, term=NULL, drop=TRUE)
"modelDecomposition"(object, term=NULL, drop=TRUE)
components(object, term=NULL, drop=TRUE)
"components"(object, term=NULL, drop=TRUE)
componentsType(object)
"componentsType"(object)
model(object)
"model"(object)
design(object)
"design"(object)

Arguments

object
lmdme class object.
term
character with the corresponding term/s to return. Default value is NULL in order to return every available term/s.
drop
should try to drop list structure if length==1? Default value is TRUE

Value

according to the call one of the following objects can be returned
design
experiment design data.frame used.
model
decomposed formula used.
modelDecomposition
list of decomposed model formulas.
residuals, resid, coef, coefficients, fitted, fitted.values, p.values or F.p.values
list of appropriate slot where each item is a matrix that will have G rows (individuals) x k columns (levels of the corresponding model term).
components
list with corresponding PCA or PLSR terms according to the decomposition function call.
componentsType
character name vector with the information of the component calculations.

See Also

lmdme, decomposition, print, show

Examples

Run this code
{
data(stemHypoxia)

##Just to make a balanced dataset in the Fisher sense (2 samples per
## time*oxygen levels)
design<-design[design$time %in% c(0.5, 1, 5) & design$oxygen %in% c(1,5,21),]
design$time<-as.factor(design$time)
design$oxygen<-as.factor(design$oxygen)
rownames(M)<-M[, 1]

##Keeping appropriate samples only
M<-M[, colnames(M) %in% design$samplename]

##ANOVA decomposition
fit<-lmdme(model=~time+oxygen+time:oxygen, data=M, design=design)

##Let's inspect how the decomposition process was carried out:
##a) The model formula used
##b) The design data.frame used
##c) The decomposition itself
fit.model<-model(fit)
fit.design<-design(fit)
fit.modelDecomposition<-modelDecomposition(fit)

##Getting the specific "time" term coefficients, p-values or F-values.
## Omit "term" parameter for all available terms.
timeCoef<-coef(fit,term="time")
fit.p.values<-p.values(fit,term="time")
fit.f.values<-F.p.values(fit,term="time")

##Getting the residuals or fitted values, for the interaction "time:oxygen"
## term. Omit "term" parameter for all available terms.
interactionResid<-resid(fit, term="time:oxygen")
interactionFit<-fitted(fit, term="time:oxygen")
}

Run the code above in your browser using DataLab