Description Usage Arguments Details Value Examples
Main function. Two steps: Given density specification, update selection indicator z by Swendsen- Wang; Given selection indicator z, update density specification by DPM fitting.
1 2 3 4 5 6 7 | BANFF2(net,test.stat,pvalue.stat=FALSE,candidate.z.set=c(-1,0,1),
seed.main=1024,na.action=c("NN","Bayes","na.remove"),niter.densupd=5,niter=10,
paras=list(tau=c(2,10,2),alpha=NULL,gamma=NULL,xi=NULL, beta=rep(10,3),
rho=c(1.003,0.479,0.988,0.000),pivec=c(0.15,0.7,0.15),densAcc=0.001,
null.quantile=c(0.25, 0.75),null.method="biGaussianModeSplit",
transitionMatrix.Z.11=0.6,miss.stat=2,min.node=5),
para.DPM=NULL,para.HODC=NULL,para.DMH=NULL)
|
net |
The adjacent matrix with 0/1 indicating "connected" or "not directly connected |
test.stat |
The observed test statistics. Missing values are represented as NAs. If they are pvalues, then the pvalue.stat should be T; |
pvalue.stat |
Logical. Wether test.stat is generated as pvalues or not. Default F. |
candidate.z.set |
Default is of three regulation type. Defalut=c(-1,0,1), 1=down-regulated, 2=not differentially expressed, 3=up-regulated. |
seed.main |
Set seed before iteration for generating reproducible results. Default=1024. |
na.action |
The method used to impute missing values. Can be "NN", "Bayes", or "na.remove". |
niter.densupd |
The total number of iterations for updating density. Default=5 |
niter |
The total number of iterations for study. Default=10. |
paras |
A list contains hyper-parameters and other parameters used for preparations.
|
para.DPM |
A list object contains, if NULL, default value is used:
|
para.HODC |
A list object contains, if NULL, default value is used:
|
para.DMH |
If rho & pivec is not given, DMH is used for pre-calculating rho & pivec. Default is a list object contains:
|
The fully Bayesian updating algorithm is executed as below:
Input data r and graph G=<V,E>
Update z|theta via Swendsen-Wang
Update theta|z via DPM Fitting
A list:
initialValue |
initial parameter list |
zTrack |
trace for z |
FinalValue |
final parameter list |
iters |
total iterations |
rmisTrack |
(if NAs in test.statistics) trace for test.statistics imputation. (only for those with NAs) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
## The simulation settings based on real gene network (takes time)
data("net")
data("test.stat")
res=BANFF2(net,test.stat,niter=300,na.action="NN")
res=BANFF2(net,pnorm(test.stat),pvalue.stat=TRUE,candidate.z.set=c(0,1),na.action="NN",
niter=300,
paras=list(tau=c(2,10),alpha=NULL,gamma=NULL,xi=NULL, beta=rep(10,2),rho=c(1,0.5,0),
pivec=c(0.2,0.8),densAcc=0.001,null.quantile=c(0.25, 1),
null.method="biGaussianModeSplit",transitionMatrix.Z.11=0.6,miss.stat=2,min.node=5))
## A toy example
simdata=SimulatedDataGenerator(nnode=100,missing=TRUE,missrate=0.1,dist="norm",
plot=TRUE,nbin=c(20,20,10),rng=1024)
res=BANFF2(net=simdata$net,test.stat=simdata$testcov,niter=100,na.action="NN")
classLabelEst=SummaryClassLabel(simdata$net,simdata$testcov,res$zTrack,
method="MajorVote",nburn=10)
print(table(classLabelEst))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.