Description Usage Arguments Value Examples
View source: R/estimateBPMatrix.R
Estimate parameters of beta-Poisson models for a data matrix
1 2 3  | 
dataMat | 
 Data matrix that needs to be modelled  | 
para.num | 
 Mode of beta-Poisson model: 3, 4 (default) or 5 parameters  | 
tbreak.num | 
 Number of breaks for binning  | 
fout | 
 A *.RData file name to export results  | 
break.thres | 
 A parameter setting of   | 
estIntPar | 
 An option to allow estimating initial parameters for the model from only expressed values  | 
extreme.quant | 
 A quantile probability to remove extrem values (outliers) higher than the quantile. If extreme.quant=NULL, no elimination of outliers is done  | 
useExt | 
 A parameter setting of   | 
min.exp | 
 A threshold for minimum expressed values. If a expression is less than min.exp, it is set to be zero  | 
useParallel | 
 An option to allow using parallel computing  | 
A list of optimal models corresponding to the rows of the matrix. Each model consists of optimal parameters, X2 test results (X2 and PVAL), etc..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | set.seed(2015)
#create random data matrix from a beta-poisson model
N=10
alp=sample(100,N,replace=TRUE)*0.1;
bet=sample(100,N,replace=TRUE)*0.1;
lam1=sample(100,N,replace=TRUE)*10;
lam2=sample(100,N,replace=TRUE)*0.01;
n=100
bp.mat=NULL
for (i in 1:N)
  bp.mat=rbind(bp.mat,rBP(n,alp=alp[i],bet=bet[i],lam1=lam1[i],lam2=lam2[i]))
#Estimate parameters from the data set
mat.res=estimateBPMatrix(bp.mat,para.num=4,fout=NULL,estIntPar=FALSE,useParallel=FALSE)
#In this function, user can also set estIntPar=TRUE to have better estimated beta-Poisson
#models for the generalized linear model. However, a longer computational time is required.
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.