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

Description Usage Arguments Value References Examples

View source: R/TC_CAR1.R

Description

This function generates bootstrap samples using parametric bootstrap method.

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

rmRNAseq documentation built on Nov. 8, 2019, 5:06 p.m.