找回密码
 注册
查看: 896|回复: 0

R语言 baySeq包 getLikelihoods()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 12:32:19 | 显示全部楼层 |阅读模式
getLikelihoods(baySeq)
getLikelihoods()所属R语言包:baySeq

                                        Finds posterior likelihoods for each count as belonging to some
                                         发现一些属于每个计数后似然性

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

These functions calculate posterior probabilities for each of the 'counts' in the countDP object belonging to each of the groups specified. The choice of function depends on the prior belief about the underlying distribution of the data. It is essential that the method used for calculating priors matches the method used for calculating the posterior probabilites.
这些函数计算后验概率为每个“罪名”属于每个指定团体在countDP对象。功能的选择取决于对有关数据的基础分布事先信念。至关重要的是,使用的方法计算先验匹配计算后probabilites的使用方法。

For a comparison of the methods, see Hardcastle & Kelly, 2009.
一个比较的方法,请参阅Hardcastle&凯利,2009年。


用法----------Usage----------


getLikelihoods(cD, prs, pET = "BIC", marginalise = FALSE, subset = NULL,
priorSubset = NULL, verbose = TRUE, ..., cl)
getLikelihoods.Dirichlet(cD, prs, pET = "BIC", marginalise = FALSE, subset = NULL,
priorSubset = NULL, verbose = TRUE, cl)
getLikelihoods.Pois(cD, prs, pET = "BIC", marginalise = FALSE, subset = NULL,
priorSubset = NULL, distpriors = FALSE, verbose = TRUE, cl)
getLikelihoods.NB(cD, prs, pET = "BIC", marginalise = FALSE, subset = NULL,
priorSubset = NULL, bootStraps = 1, conv = 1e-4, nullData = FALSE,
returnAll = FALSE, returnPD = FALSE, verbose = TRUE, cl)



参数----------Arguments----------

参数:cD
An object of type countData, or descending from this class.
类型countData,或降从这个类的对象。


参数:prs
(Initial) prior probabilities for each of the groups in the 'countDP' object. Should sum to 1, unless nullData is TRUE, in which case it should sum to less than 1.
“countDP对象的每个组的先验概率(初始)。要总结1,除非nullData为TRUE,在这种情况下,它应该总结小于1。


参数:pET
What type of prior re-estimation should be attempted? Defaults to "BIC"; "none" and "iteratively" are also available.
应该尝试什么类型之前重新估计? “BIC的”默认“无”和“反复”也可。


参数:marginalise
Should an attempt be made to numerically marginalise over a prior distribution iteratively estimated from the posterior distribution? Defaults to FALSE, as in general offers little performance gain and increases computational cost considerably.
应该试图进行数值边缘化了从后验分布的迭代估计先验分布?默认为FALSE,一般会提供小的性能增益,大大提高了计算成本。


参数:subset
Numeric vector giving the subset of counts for which posterior likelihoods should be estimated.
数字向量后似然性的,应当估计数的子集。


参数:priorSubset
Numeric vector giving the subset of counts which may be used to estimate prior probabilities on each of the groups. See Details.
数字矢量可以用来计数,估计先验概率对每个组的子集。查看详细信息。


参数:distpriors
Should the Poisson method use an empirically derived distribution on the prior parameters of the Poisson distribution, or use the mean of the maximum likelihood estimates (default).
泊松方法应使用前的泊松分布参数的经验得出的分布,或使用的最大似然估计(默认)的平均值。


参数:bootStraps
How many iterations of bootstrapping should be used in the (re)estimation of priors in the negative binomial method.
负二项分布方法先验的(重)估计应采用多次迭代的引导。


参数:conv
If not null, bootstrapping iterations will cease if the mean squared difference between posterior likelihoods of consecutive bootstraps drops below this value.
如果不为null,自举迭代将停止后连续白手起家的似然性之间的平均平方差,如果低于这个值。


参数:nullData
If TRUE, looks for segments or counts with no true expression. See Details.
如果是TRUE,看起来没有真正表达段或计数。查看详细信息。


参数:returnAll
If TRUE, and bootStraps > 1, then instead of returning a single countData object, the function returns a list of countData objects; one for each bootstrap. Largely used for debugging purposes.
如果是TRUE,白手起家> 1,而不是返回单countData对象,然后,该函数返回一个列表countData对象为每个引导。主要用于调试目的。


参数:returnPD
If TRUE, then the function returns the (log) likelihoods of the data given the models, rather than the posterior (log) likelihoods of the models given the data. Not recommended for general use.
如果是TRUE,则函数返回给予的模型,而不是后(log)提供的数据模型的似然性的数据(log)似然性。不推荐用于一般用途。


参数:verbose
Should status messages be displayed? Defaults to TRUE.
应该会显示状态消息?默认为true。


参数:cl
A SNOW cluster object.
雪聚类对象。


参数:...
Any additional information to be passed by the 'getLikelihoods' wrapper function to the individual functions which calculate the likelihoods.
任何额外的信息可以通过'getLikelihoods'包装函数来计算的似然性的个别功能。


Details

详情----------Details----------

These functions estimate, under the assumption of various distributions, the (log) posterior likelihoods that each count belongs to a group defined by the @group slot of the countData object. The posterior likelihoods are stored on the natural log scale in the @posteriors slot of the countData object generated by this function. This is because the posterior likelihoods are calculated in this form, and ordering of the counts is better done on these log-likelihoods than on the likelihoods.
这些功能估计,根据各种分布的假设,后似然性(log),每项罪名属于一组定义的@groupcountData对象的槽。 @posteriorscountData这个函数生成的对象的插槽,存储在后似然性的自然log规模。这是因为在此表格计算后的似然性,订购的数量,更似然性上做得比这些数似然性。

If 'pET = "none"' then no attempt is made to re-estimate the prior likelihoods given in the 'prs' variable. However, if 'pET = "BIC"', then the function will attempt to estimate the prior likelihoods by using the Bayesian Information Criterion to identify the proportion of the data best explained by each  model and taking these proportions as prior. Alternatively, an iterative re-estimation of priors is possible ('pET = "iteratively"'), in which an inital estimate for the prior likelihoods of the models is used to calculated the posteriors and then the priors are updated by taking the mean of the posterior likelihoods for each model across all data. This often works well, particularly if the 'BIC' method is used (see Hardcastle & Kelly 2010 for details). However, if the data are sufficiently non-independent, this approach may substantially mis-estimate the true priors. If it is possible to select a representative subset of the data by setting the variable 'subsetPriors' that is sufficiently independent, then better estimates may be acquired.
如果'pET = "none"'然后没有试图重新估计'prs'变量前似然性。然而,如果'pET = "BIC"',那么该函数将试图通过贝叶斯信息标准,以确定数据的比例,最好每个模型的解释,并采取这些比例为前事先似然性估计。另外,一个迭代的先验估计是可能的('pET = "iteratively"'),其中>初始模型前似然性估计是用来计算的后验概率,然后以平均后路先验更新每个跨所有数据模型的似然性。这往往行之有效,尤其是当“的BIC”的方法是使用(详见2010年Hardcastle&凯利)。然而,如果有足够的非独立数据,这种做法可能大大错误估计真正的先验。如果它是可以选择通过设置变量代表一个数据子集'subsetPriors'这是充分独立,然后更好地估计可能被收购。

The Dirichlet and Poisson methods produce almost identical results in simulation. The Negative Binomial method produces results with much lower false discovery rates, but takes considerably longer to run.
Dirichlet和泊松方法产生模拟几乎相同的结果。负二项分布方法产生的结果与假发现率要低得多,但需要相当长的时间来运行。

Filtering the data may be extremely advantageous in reducing run time. This can be done by passing a numeric vector to 'subset' defining a subset of the data for which posterior likelihoods are required.
过滤数据可能是非常有利的,减少运行时间。这可以通过数字向量,以“子集”的定义后似然性要求的数据的一个子集。

If 'nullData = TRUE', the algorithm attempts to find those counts or segments that have no true expression in all samples. This means that there is another, implied group where all samples are equal. The prior likelihoods given in the 'prs' object must thus sum to less than 1, with the residual going to this group.
如果nullData = TRUE“,该算法试图找到所有样品中,有没有真正表达的罪名或分部。这意味着有隐含组,所有样品都是平等的。在“PRS”对象给予事先似然性,因此必须小于1,剩余的将本组总结。

See Hardcastle & Kelly (2010) for a full comparison of the methods.
Hardcastle&凯利(2010年),为全面比较的方法。

A 'cluster' object is strongly recommended in order to parallelise the estimation of posterior likelihoods, particularly for the negative binomial method. However, passing NULL to the cl variable will allow the functions to run in non-parallel mode.
负二项分布方法,特别是parallelise后似然性估计,强烈建议一个“聚类”的对象。然而,传递NULLcl变量将允许在非并行模式运行的功能。

The 'getLikelihoods' function will infer the correct distribution to use from the information stored in the '@priors' slot of the countData object 'sD' and call the appropriate function.
'getLikelihoods'功能会推断出正确的分配使用'@priors'countData对象'sD'的插槽中存储的信息,并调用相应的功能。


值----------Value----------

A countData object.
一个countData对象。


作者(S)----------Author(s)----------


Thomas J. Hardcastle



参考文献----------References----------



参见----------See Also----------

countData, getPriors,
countData,getPriors


举例----------Examples----------



# See vignette for more examples.[看到更多的例子的小插曲。]

# If we do not wish to parallelise the functions we set the cluster[如果我们不希望我们以parallelise的功能设置聚类]
# object to NULL.[对象为NULL。]

cl <- NULL

# Alternatively, if we have the 'snow' package installed we[另外,如果我们有雪包安装]
# can parallelise the functions. This will usually (not always) offer[可以parallelise的功能。这通常(并不总是)报价]
# significant performance gain.[显着的性能增益。]

## Not run: try(library(snow))[#无法运行(库(雪))]
## Not run: try(cl &lt;- makeCluster(4, "SOCK"))[#不运行:尝试(CL < -  makeCluster(4,“袜子”))]

# load test data[加载测试数据]
data(simData)

# Create a {countData} object from test data.[创建一个测试数据{countData}对象。]

replicates <- c("simA", "simA", "simA", "simA", "simA", "simB", "simB", "simB", "simB", "simB")
groups <- list(NDE = c(1,1,1,1,1,1,1,1,1,1), DE = c(1,1,1,1,1,2,2,2,2,2))
CD <- new("countData", data = simData, replicates = replicates, groups = groups)

#estimate library sizes for countData object[估计countData对象库大小]
CD@libsizes <- getLibsizes(CD)

# Get priors for negative binomial method[负二项分布方法获取先验]
## Not run: CDPriors &lt;- getPriors.NB(CD, samplesize = 10^5, estimation =[#无法运行:< -  getPriors.NB CDPriors(光盘版,采样大小= 10 ^ 5,估计=]
"QL", cl = cl)
## End(Not run)[#结束(不运行)]

# To speed up the processing of this example, we have already created[加快处理这个例子,我们已经创建]
# the `CDPriors' object.[CDPriors“对象。]
data(CDPriors)

# Get likelihoods for data with negative binomial method.[负二项分布方法获取数据的似然性。]

CDPost <- getLikelihoods.NB(CDPriors, prs = c(0.5, 0.5),
pET = "BIC", marginalise = FALSE, bootStraps = 1, cl = cl)

try(stopCluster(cl))


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-24 04:41 , Processed in 0.024096 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表