rmRNAseq (version 0.1.0)

sc_CAR1: Simulating Count Data From The Output of Real Data Analysis

Description

This function generates bootstrap samples using parametric bootstrap method.

Usage

sc_CAR1(BetaMat, Sigma2Vec, RhoVec, WeightMat, lib.size, design, Subject,
  Time, nrep)

Arguments

BetaMat

a matrix of estimates of regression coefficients.

Sigma2Vec

a vector of shrinkage estimates of error variances.

RhoVec

a vector of estimates of correlation.

WeightMat

a matrix of weights of all genes obtaining from voom.

lib.size

library size in voom method, we choose .75 quantile as library size.

design

a design matrix.

Subject

a vector of subjects/experimental units.

Time

a vector of time points.

nrep

simulation iteration.

Value

a matrix of count data that has nrow(BetaMat) rows and nrow(design) columns.

References

Yet Nguyen, Dan Nettleton, 2019. rmRNAseq: RNA-seq Analysis for Repeated-measures Data.

Examples

Run this code
# NOT RUN {
data(res)
v <- res$ori.res$v[1:50,]
newlm <- res$ori.res$newlm[1:50,]
BetaMat <- data.matrix(newlm[grep("fixed.", names(newlm))])
Sigma2Vec <- newlm$s2_shrunken
RhoVec <- newlm$rho
WeightMat <- v$weights
lib.size <- v$targets$lib.size
nrep <- 1
Subject <- covset$ear
Time <- covset$time
simcounts <- rmRNAseq:::sc_CAR1(BetaMat, Sigma2Vec, RhoVec, WeightMat,
lib.size, design, Subject, Time)
dim(simcounts)
# }

Run the code above in your browser using DataCamp Workspace