search for: dirichlet

Displaying 20 results from an estimated 55 matches for "dirichlet".

2006 Sep 18
1
Simulation of a Dirichlet Process.
I'm just getting started with R, having a lot of original work on modeling and exploring the simulation by MCMC. I want to simulate the prior and the posterior distribution of Dirichlet Process by MCMC. Is there anyone in NYC that might be a good tutor for me? -- Dr. P. NGOM, Facult? des Sciences et Techniques D?partement de Math?matiques et Informatique Universit? Cheikh Anta Diop Dakar - S?n?gal ---------------------------------------------------------------- Universite Cheik...
2011 Mar 29
1
Dirichlet surface
Dear list members, I want to draw surfaces of Dirichlet distributions with different parameter settings. My code is the following: #<begin code> a1 <- a2 <- a3 <- 2 #a2 <- .5 #a3 <- .5 x1 <- x2 <- seq(0.01, .99, by=.01) f <- function(x1, x2){ term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3)) term2...
2006 Sep 19
1
help on dirichlet distribution
Dear Gregory R. Warnes, I'm a phd student in statistics, at the University of Milano Bicocca. I'm interested to the methods of estimate the parameters of the Dirichlet distribution. Do you have implemented an algorithm in R? If so, can you give me the script? or, in general, some helps? Best Regards Gianna --------------------------------------------------------------- Gianna Monti Dottorato di Ricerca in Statistica Università degli Studi di Milano Bicocca Vi...
2006 Oct 10
4
generate random numbers that sum up to 1
As I have previously asked, in response to a similar question: Is this a homework problem? cheers, Rolf Turner rolf at math.unb.ca
2013 May 12
1
Multinomial-Dirichlet using R
...ents per category given the category response rates can be assumed to be independently distributed. They can be modeled by a multinomial distribution with parameters n=60 and category response rates pi1, . . . , piC for site i. The individual variation in category response rates can be modeled by a Dirichlet distribution. Just wondering if I am thinking through this correctly. If so, could someone share some thoughts on how this could be done in R? Really Appreciate any help. Thanks Anamika [[alternative HTML version deleted]]
2007 Nov 27
1
voronoi/Delaunay/Dirichlet tessellation on sphere in R or S?
There's Renka's STRIPACK, and TRIPACK, respectively, ACM TOMS Algorithms 772 and 751, and there's the R package "deldir" which does the Delaunay for a plane, but does anyone have or know of the tessellation in R for a sphere? Also, is there a standard indexing scheme for Delaunay facets, and perhaps of edges in such facets? I'd expect that to be a publication reference,
2007 Jul 10
2
integration over a simplex
...tangle but the Jacobian is a rapidly-varying (and very lopsided) function and this is making adapt() slow. [ A \dfn{simplex} is an n-dimensional analogue of a triangle or tetrahedron. It is the convex hull of (n+1) points in an n-dimensional Euclidean space. My application is a variant of the Dirichlet distribution: With p~D(a), if length(p) = n+1 then the requirement that all(p>0) and sum(p)=1 mean that the support of the Dirichlet distribution is an n-simplex. ] -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8...
2016 Dec 05
2
Suma condicionada.-
Hola comunidad, Les consulto mi duda. Quisiera generar N números aleatorios tal que su suma esté predeterminada a un valor k. Sé que con la distribución Dirichlet, por ejemplo, se podrían obtener números aleatorios tal que su suma es la unidad. Por ejemplo MCMCpack::rdirichlet(1,rep(10,7)) genera 7 números tal que su suma es 1 (el parámetro rep(10,7) es cualquier cosa). Pero me pregunto si se podrá realizar algo parecido variando la suma (no necesariament...
2007 May 29
0
DPpackage - New version
Dear List: I have uploaded version 1.0-4 of DPpackage on CRAN. Since the first version (1.0-0), I have not communicated the improvements of the package. I'll use this email to summarize its current status. The name of the package is motivated by the Dirichlet process. However, DPpackage tries to be a general package for Bayesian nonparametric and semi-parametric data analysis. So far, the package includes models based on Dirichlet processes, Dirichlet process mixtures of normals, Polya trees, and Random Bernstein polynomials. A list of current...
2007 May 29
0
DPpackage - New version
Dear List: I have uploaded version 1.0-4 of DPpackage on CRAN. Since the first version (1.0-0), I have not communicated the improvements of the package. I'll use this email to summarize its current status. The name of the package is motivated by the Dirichlet process. However, DPpackage tries to be a general package for Bayesian nonparametric and semi-parametric data analysis. So far, the package includes models based on Dirichlet processes, Dirichlet process mixtures of normals, Polya trees, and Random Bernstein polynomials. A list of current...
2008 Nov 23
2
Latin Hypercube with condition sum = 1
Hi I want to du a sensitivity analysis using Latin Hypercubes. But my parameters have to fulfill two conditions: 1) ranging from 0 to 1 2) have to sum up to 1 So far I am using the lhs package and am doing the following: library(lhs) ws <- improvedLHS(1000, 7) wsSums <- rowSums(ws) wss <- ws / wsSums but I think I can't do that, as after the normalization > min(wss) [1]
2006 Jul 19
2
voronoi tessellations
...ellations > > On Tue, 18 Jul 2006, Don MacQueen wrote: > > > I'll suggest going to the CRAN packages page and doing a search for "voronoi". > > The problem here is that `Voronoi tessellation' is a secondary name. The > concept has many names, including Dirichlet tessellation and Thiessen > polygons, and Dirichlet has priority over Voronoi. > > > Also, search for 'triangulation', since that is one of the uses of them. > > I know of packages deldir, tripack and perhaps geometry. > > > -Don > > > > At 11:46...
2003 Feb 16
1
multivariate sampling question again
Hi Thanks for replying my question! What really interested me is that the package providing some complex form sampling, such as wishart, multinomial, dirichlet. And others for example conditional beta distribution confining the random variable in the interval (a, b). Since these concept are widely used in the baysian, I wonder whether somebody has already written this package. Thanks! Best wishes, Peng ******************************* Peng Zhang Departme...
2010 Jul 05
2
Function to compute the multinomial beta function?
Dear R-users, Is there an R function to compute the multinomial beta function? That is, the normalizing constant that arises in a Dirichlet distribution. For example, with three parameters the beta function is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3) Thanks in advance for any assisstance. Regards, Greg [[alternative HTML version deleted]]
2010 Aug 27
2
multivariate distributions
Hi, How can I generate data from multivariate gamma distribution & multivariate beta distribution? I only found command for multivariate normal only. Many thanks in advance :) Regards Rofizah [[alternative HTML version deleted]]
2012 Nov 05
0
slider control questions
...)) term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1) term3 <- (x1 + x2 < 1) term1 * term2 * term3 } f <- outer(x1, x2, dirf) f[f<=0] <- NA f[is.infinite(f)] <- NA persp(x1, x2, f, zlim = c(0, max(f, na.rm = TRUE)+1), main = bquote(paste("Dirichlet eloszlás, ", alpha ,"=(",.(a1),",",.(a2),",",.(a3),")")), col = "lightblue", theta = 50, phi = 20, r = 50, d = 0.1, expand = 0.5, ltheta = 90, lphi = 180, shade = 0.75,...
2011 Feb 24
1
weighted Voronoi diagrams
Dear R-users, Does anyone know how to do weighted Voronoi diagrams (Dirichlet tesselation) in R? To be more specific, I have a set of coordinates for tree locations on a plot, and I'm looking for a way to do the tesselation so that the polygon size for each tree depends on the size of the subject tree, and the size of its neighbors. So, the location of the bisection...
2010 Jun 23
1
A question about R2Winbugs
...form the data into matrix ## parameter setting N=nrow(X) # # of servers T=ncol(X) # Time m=sum(X)/(N*T) # mean of the training set M=matrix(m,nrow=N,ncol=T) s=sum((X-M)^2)/(N*T) # std of the training set K=3 # # of clusters alpha=0.5 # parameter for Dirichlet distn sigmae=0.5 # var of cluster mean mu q1=rep(1/K,K) # prior for Z(n,1) ## MCMC sampling data=list("X","m","s","N","T","K","alpha","sigmae","q1") inits=function(){list(a0=rbeta(1,1,1), q...
2009 Dec 08
1
Simplex Density Plots
Hello, I have just started using R, and have found it quite easy to make plots of probability densities for normal and beta distributions, etc. Now, I'm looking at trying to make a simplex plot of a Dirichlet density, but have gotten stuck and was hoping that someone could help. Ideally, the plot would look something like the 3d plots on Wikipedia here: http://en.wikipedia.org/wiki/File:Dirichlet_distributions.png Although if these are impossible, a color-coded 2d simplex would work as well. Does anyo...
2011 Oct 08
1
HWEBayes, swapping the homozygotes genotype frequencies
...entry and n22 entry of nvec, I received totally different Bayes factor: > > HWETriangBF2(nvec=c(2,10,88)) [1] 5.710153 > In my understanding, defining the genotype frequency as n11 or n22 are arbitrary. So I was expecting the same value of Bayes factor. This is the case for conjugate Dirichlet prior: >DirichNormHWE(nvec=c(88,10,2), c(1,1))/DirichNormSat(nvec=c(88,10,2), c(1,1,1)) [1] 1.542047 >DirichNormHWE(nvec=c(2,10,88), c(1,1))/DirichNormSat(nvec=c(2,10,88), c(1,1,1)) [1] 1.542047 Could you explain why the HWETriangBF2 is returining completely different values of Bayes Factor?...