EVOLUTION-MANAGER
Edit File: sample_dirichlet.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Sample from a Dirichlet distribution</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for sample_dirichlet {igraph}"><tr><td>sample_dirichlet {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Sample from a Dirichlet distribution</h2> <h3>Description</h3> <p>Sample finite-dimensional vectors to use as latent position vectors in random dot product graphs </p> <h3>Usage</h3> <pre> sample_dirichlet(n, alpha) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>Integer scalar, the sample size.</p> </td></tr> <tr valign="top"><td><code>alpha</code></td> <td> <p>Numeric vector, the vector of <i>alpha</i> parameter for the Dirichlet distribution.</p> </td></tr> </table> <h3>Details</h3> <p><code>sample_dirichlet</code> generates samples from the Dirichlet distribution with given <i>alpha</i> parameter. The sample is drawn from <code>length(alpha)-1</code>-simplex. </p> <h3>Value</h3> <p>A <code>dim</code> (length of the <code>alpha</code> vector for <code>sample_dirichlet</code>) times <code>n</code> matrix, whose columns are the sample vectors. </p> <h3>See Also</h3> <p>Other latent position vector samplers: <code><a href="sample_sphere_surface.html">sample_sphere_surface</a>()</code>, <code><a href="sample_sphere_volume.html">sample_sphere_volume</a>()</code> </p> <h3>Examples</h3> <pre> lpvs.dir <- sample_dirichlet(n=20, alpha=rep(1, 10)) RDP.graph.2 <- sample_dot_product(lpvs.dir) colSums(lpvs.dir) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>