get.resids: Estimate Residuals

Description Usage Arguments Author(s) Examples

Description

Get Residuals from data given a model

Usage

1
get.resids(Y, mod)

Arguments

Y

Matrix of data

mod

Model matrix parameterizing coefficients

Author(s)

Brig Mecham <brig.mecham@sagebase.org> and John D. Storey <jstorey@princeton.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (data.matrix, design.matrix) 
{
    x.qr <- qr(design.matrix)
    x.det <- prod(diag(x.qr$qr))
    x.cov.unscaled <- solve(t(qr.R(x.qr)) %*% qr.R(x.qr))
    x.df <- nrow(design.matrix) - x.qr$rank
    Fit.coef <- qr.coef(x.qr, t(data.matrix))
    Fit.res <- qr.resid(x.qr, t(data.matrix))
  }

Sage-Bionetworks/snm documentation built on May 9, 2019, 12:14 p.m.