batch
using the $\delta$
statistic resulting from guided principal componenets analysis (gPCA).
gPCA.batchdetect(x, batch, filt = NULL, nperm = 1000, center = FALSE, scaleY=FALSE,
seed = NULL)
x
centered? If not, then center=FALSE
and gPCA.batchdetect will center it for you.
Y
matrix by the number of samples in each batch? If not, then center=FALSE
(default), otherwise, center=TRUE
.
set.seed()
. Default is NULL.
nperm
length vector of delta values resulting from the permuation test.The test statistic $\delta$ along with a one-sided $p$-value results from a gPCA.batchdetect()
call,
along with the values of $\delta_p$ from the permutation test. The $\delta_p$ values can be used to visualize
the permutation distribution of your test using the gDist
function. For more information on gPCA, please
see reese.
gDist
, PCplot
, CumulativeVarPlot
,
data(caseDat)
batch<-caseDat$batch
data<-caseDat$data
out<-gPCA.batchdetect(x=data,batch=batch,center=FALSE,nperm=250)
out$delta ; out$p.val
## Plots:
gDist(out)
CumulativeVarPlot(out,ug="unguided",col="blue")
PCplot(out,ug="unguided",type="1v2")
PCplot(out,ug="unguided",type="comp",npcs=4)
Run the code above in your browser using DataLab