Learn R Programming

rmRNAseq (version 0.1.0)

glsCAR1_loglik: Calculate REML Log-Likelihood of glsCAR1 model for each gene

Description

This function calculates log-likelihood value of glsCAR1 for each gene using voom data.

Usage

glsCAR1_loglik(d)

Arguments

d

a data frame containing several columns. The first 4 columns are y: a vector of log-counts (obtained by voom), Subject: a vector of subject/experimental units where repeated measures are obtained (can be either numeric or factor), Time: a vector of time points (continuous, since we fit corCAR1), w: weights to put in gls model, this is the inverse of weights obtained by voom The other columns are exactly the same as design matrix.

Value

reml log-likelihood value

Examples

Run this code
# NOT RUN {
data(res)
data(design)
data(covset)
d <- data.frame(cbind(y = res$ori.res$v$E[1,] ,Subject = covset$ear,
Time = covset$time, w = 1/res$ori.res$v$weights[1,], design))
glsloglikout <- rmRNAseq:::glsCAR1_loglik(d)
glsloglikout
# }

Run the code above in your browser using DataLab