Description Usage Arguments Value Examples
Estimate parameters of a beta-Poisson model for a data vector
1 2 | estimateBP(x, para.num = 4, tbreak.num = 10, break.thres = 10,
useExt = FALSE, param0 = NULL)
|
x |
A vector of input data points |
para.num |
Mode of beta-Poisson model: 3, 4 (default) or 5 parameters |
tbreak.num |
Number of breaks for binning |
break.thres |
A parameter setting of |
useExt |
A parameter setting of |
param0 |
Initial parameters for the model. If it is not set, default initial parameters will be obtained from |
An optimal model to the input data including optimal parameters (par), X2 test results (X2 and PVAL), etc..
1 2 3 4 5 6 7 8 9 10 11 | set.seed(2015)
#Create a simulated gene expression by randomly generating 100 data points
#from a beta-poisson model
alp=0.6;bet=1.5;lam1=20;lam2=0.05
par0=c(alp,bet,lam1,lam2)
bp.vec=rBP(100,par0)
#Estimate parameters of the four-parameter beta-Poisson model from the data points
res=estimateBP(bp.vec,para.num=4)
#Print the goodness-of-fit of the model and the optimal parameters
res$X2
res$par
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.