qpG2Sigma(qpgraph)
qpG2Sigma()所属R语言包:qpgraph
Random covariance matrix
随机协方差矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Builds a positive definite matrix from an undirected graph G that can be used as a covariance matrix for a Gaussian graphical model with graph G. The inverse of the resulting matrix contains zeroes at the missing edges of the given undirected graph G.
建立一个无向图G正定矩阵,可以作为一个图G为高斯图形模型的协方差矩阵,逆矩阵包含在给定的无向图G失踪的边缘零
用法----------Usage----------
qpG2Sigma(g, rho=0, matrix.completion=c("HTF", "IPF"), verbose=FALSE, R.code.only=FALSE)
参数----------Arguments----------
参数:g
undirected graph specified either as a graphNEL object or as an adjacency matrix.
指定为graphNEL对象或作为一个邻接矩阵的无向图。
参数:rho
real number between -1/(n.var-1) and 1 corresponding to the mean marginal correlation
-1 /(n.var-1)和1之间的实数对应的平均边际相关
参数:matrix.completion
algorithm to employ in the matrix completion operations employed to construct a positive definite matrix with the zero pattern specified in g
算法采用矩阵的完成操作,以构建与g指定零模式正定矩阵
参数:verbose
show progress on the calculations.
计算表明进展。
参数:R.code.only
logical; if FALSE then the faster C implementation is used in the internal call to the IPF algorithm (default); if TRUE then only R code is executed.
逻辑;如果为FALSE,然后更快的C实现内部通话使用IPF的算法(默认),如果TRUE,那么只有R代码被执行。
Details
详情----------Details----------
The random covariance matrix is built by first generating a random matrix with the function qpRndWishart from a Wishart distribution whose expected value is a matrix with unit diagonal and constant off-diagonal entries equal to rho.
随机协方差矩阵内置函数首先生成一个随机矩阵qpRndWishart从Wishart分布的预期值是一个矩阵对角线单元和恒定关断对角线的项等于rho的。
值----------Value----------
A random positive definite matrix that can be used as a covariance matrix for a Gaussian graphical model with graph G.
可以作为一个图G高斯图形模型的协方差矩阵的随机正定矩阵。
作者(S)----------Author(s)----------
A. Roverato
参考文献----------References----------
inference and simulation with the R package qpgraph, submitted.
参见----------See Also----------
qpRndGraph qpGetCliques qpIPF qpRndWishart rmvnorm
qpRndGraphqpGetCliquesqpIPFqpRndWishartrmvnorm
举例----------Examples----------
set.seed(123)
G <- qpRndGraph(p=5, d=2)
Sigma <- qpG2Sigma(G, rho=0.5)
round(solve(Sigma), digits=2)
as(G, "matrix")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|