Learn R Programming

ccdf (version 1.1.4)

perm_cont: Permutation procedure when Z is continuous

Description

Permutation procedure when Z is continuous

Usage

perm_cont(Y, X, Z)

Arguments

Y

a numeric vector of size n containing the preprocessed expressions from n samples (or cells).

X

a numeric or factor vector of size n containing the variable to be tested (the condition to be tested).

Z

a numeric vector of size n containing the covariate. Multiple variables are not allowed.

Value

X_star a vector of permuted X.

Examples

Run this code
# NOT RUN {
if(interactive()){
X <- rbinom(n=100, size = 1, prob = 0.5)
Z <- rnorm(100,0,1)
Y <- ((X==1)*rnorm(n = 50,0,1)) + ((X==0)*rnorm(n = 50,0.5,1))
res <- perm_cont(Y,X,Z)}
# }

Run the code above in your browser using DataLab