
Last chance! 50% off unlimited learning
Sale ends in
Sample finite-dimensional vectors to use as latent position vectors in random dot product graphs
sample_dirichlet(n, alpha)
Integer scalar, the sample size.
Numeric vector, the vector of
A dim
(length of the alpha
vector for
sample_dirichlet
) times n
matrix, whose columns are the sample
vectors.
sample_dirichlet
generates samples from the Dirichlet distribution
with given length(alpha)-1
-simplex.
Other latent position vector samplers:
sample_sphere_surface()
,
sample_sphere_volume()
# NOT RUN {
lpvs.dir <- sample_dirichlet(n=20, alpha=rep(1, 10))
RDP.graph.2 <- sample_dot_product(lpvs.dir)
colSums(lpvs.dir)
# }
Run the code above in your browser using DataLab