Learn R Programming

svapls (version 1.2)

fitModel: Function to fit an ANCOVA model to the log transformed gene expression data, with a certain specified number of surrogate variables.

Description

This function begins its operation by fitting a standard ANOVA model to the gene expression data, with the gene, variety main effects and their mutual interaction. The residuals from the fit of this model and the original gene expression values are then respectively organized into two matrices E and Y, where each column corresponds to a certain gene. Now E is regressed on Y by Partial Least Squares (PLS) and a specified number of scores are extracted as the estimates of the latent components from their respective column spaces. The scores in the Y-space are used as surrogate variables along with the gene and variety interaction effects with the first score and the usual effects from the standard ANOVA model, in order to fit an ANCOVA model to the data. The function returns the results from this fit.

Usage

fitModel(k1, k2, Y, n.surr)

Arguments

k1
Number of subjects/samples under variety 1.
k2
Number of subjects/samples under variety 2.
Y
The log transformed gene expression data, with genes along the rows and subjects/samples along the columns.
n.surr
The specified number of surrogate variables.

Value

  • mu.hatIntercept (general mean effect).
  • G.hatMain effects of the genes.
  • V.hatMain effects of the varieties.
  • GV.hatGene-Variety interaction effects.
  • scValues of the Surrogate variables (computed only when n.surr>0).
  • beta.hatCoefficients of the surrogate variables (computed only when n.surr>0).
  • GZ1.hatInteraction effects of the genes with the first surrogate variable (computed only when n.surr>0).
  • VZ1.hatInteraction effects of the varieties with the fist surrogate variable (computed only when n.surr>0).
  • vhat.gvhVariances of the estimators for the gene-variety interaction effects.
  • MSEMean Squarred Error for the fitted model.
  • AICValue of the Akaike's Information Criterion (AIC) for the fitted model.

References

Sutirtha Chakraborty, Somnath Datta and Susmita Datta. (2012) Surrogate Variable Analysis Using Partial Least Squares in Gene Expression Studies. Bioinformatics. Martens, H., Naes, T. (1989) Multivariate Calibration. Chicestor:Wiley.

See Also

svpls, hfp

Examples

Run this code
data(hidden_fac.dat)

## Fitting an ANCOVA model with 5 surrogate variables
fit <- fitModel(10,10,hidden_fac.dat,n.surr = 5)
print(fit)

Run the code above in your browser using DataLab