estimatep: Estimate the probability that the read is 0 in a...

Description Usage Arguments Value Examples

View source: R/estimatep.R

Description

Estimate the probability that the read is 0 in a Zero-inflated Poisson model.

Usage

1
2
estimatep(x,y,xte=NULL,beta=1,
type=c("mle","deseq","quantile"), prior=NULL)

Arguments

x

MUST be a n times p matrix - i.e. observations on the rows and features on the columns

y

A numeric vector of class labels of length n: 1, 2, ...., K if there are K classes.Each element of y corresponds to a row of x; i.e. these are the class labels for the observations in x.

xte

A m-by-p data matrix: m test observations and p features. The classifier fit on the training data set x will be tested on this data set. If NULL, then testing will be performed on the training set.

beta

A standardized parameter

type

the method of normality

prior

vector of length equal to the number of classes, representing prior probabilities for each class.If NULL then uniform priors are used (i.e. each class is equally likely)

Value

p the probability that the read is 0 in a Zero-inflated Poisson model

Examples

1
2
3
4
5
6
library(SummarizedExperiment)
dat <- newCountDataSet(n=40,p=500, K=4, param=10, sdsignal=0.1,drate=0.4)
x <- t(assay(dat$sim_train_data))
y <- as.numeric(colnames(dat$sim_train_data))
xte <- t(assay(dat$sim_test_data))
prob <- estimatep(x=x, y=y, xte=x, beta=1, type="mle", prior=NULL)

zhangli1109/CAEN documentation built on Nov. 14, 2020, 11:41 a.m.