get.coefs: Estimate Coefficients Gets Coefficients From a Fitted Model

Description Usage Arguments Author(s) Examples

Description

Estimate coefficients from a set of data using a specified model. Estimates the coefficients from a fitted model

Usage

1
get.coefs(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
##---- 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))
  }

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