similar to: How to draw 4 random weights that sum up to 1?

Displaying 20 results from an estimated 10000 matches similar to: "How to draw 4 random weights that sum up to 1?"

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
2012 Nov 07
6
how to generate a set of random numbers that sum to 1 with uniform distribution of elements
Hi, I am looking for a way to generate a matrix of random numbers in a way that each row of the matrix would sum to 1 and that the numbers in the columns of the matrix would have a uniform distribution. So far I have found several ways to create random numbers that would sum to 1, but then the distribution of the individual elements is more or less skewed - there are much more small numbers than
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
Okay, been working with tripack, seems the most mature package for this. Got it to work well with their test data set - data(tritest). When i tried random numbers to explore further, i am getting some results that don't reconcile. example run this: library(tripack) y <- runif(100) x <- runif(100) vm <- voronoi.mosaic(x,y) plot(vm) par(new=T) plot(x,y,col='blue') when
2011 Mar 29
4
Creating 3 vectors that sum to 1
I have 3 vectors: p1, p2, and p3. I would like each vector to be any possible value between 0 and 1 and p1 + p2 + p3 = 1. I want to graph these and I've thought about using scatterplot3d(). Here's what I have so far. library(scatterplot3d) p1 <- c(1,0,0,.5,.5,0,.5,.25,.25,.34,.33,.33,.8,.1,.1,.9,.05,.05) p2 <- c(0,1,0,.5,0,.5,.25,.5,.25,.33,.34,.33,.1,.8,.1,.05,.9,.05) p3 <-
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 between two trees
2007 Mar 24
2
sampling from the unoform distrubuton over a convex hull
Dear list, Does anyone have a suggestion (or better still) code for sampling from the uniform distribution over the convex hull of a set of points? Many thanks and best wishes, Ranjan
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 -
2016 Jul 24
2
Weighting Schemes: Evaluation results
Hi all, I have evaluated new weighting schemes along with their existing counterparts in Xapian to compare and see which one does better job. Also, I have put together all the results files for easy access here: https://github.com/ivmarkp/xapian-evaluation/tree/evaluation/run and a README for getting started with xapian-evaluation module. Hopefully, it might be of help to those who are new to
2007 Jul 10
2
integration over a simplex
Hello The excellent adapt package integrates over multi-dimensional hypercubes. I want to integrate over a multidimensional simplex. Has anyone implemented such a thing in R? I can transform an n-simplex to a hyperrectangle 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
2005 Feb 28
1
draw random samples from empirical distribution
Dear useRs, I have an empirical distribution (not normal etc) and I want to draw random samples from it. One solution I can think of is to compute let's say 100 quantiles, then use runif() to draw a random number Q between 1 and 100, and finally run runif() again to pull a random value from the quantile Q. Is there perhaps a better/more elegant way of doing this? Thank you, b.
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 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
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
2009 Dec 09
3
Plotting frequency curve over histogram
Hello, This is a problem for which there seem to be several solutions online, but not really. My question was about plotting a curve over the histogram. All the previous posts and messages talk about generating a *density histogram*using (freq=F) and then plotting the density curve. However, I find that that seriously distorts my data and the plot becomes confounding to the viewer. I was
2013 May 12
1
Multinomial-Dirichlet using R
Hi: I have asked this question on Cross-Validated. So it might be a cross posting but havent received any responses to it. I am trying to see which distribution will best fit the data I am working on. The dataset is as following: Site Nausea headache Abdominal Distension 1 17 5 10 2 12
2010 Sep 15
3
Creating publication-quality plots for use in Microsoft Word
Hi everyone, I am trying to make some publication-quality plots for use in Microsoft Word, but I am having trouble creating high-quality plots that are supported by Microsoft Word. If I use the R plot function to create the figure, the lines are jagged, and the picture is not of high quality (same with JPEG(), TIFF(), and PNG() functions). I have tried using the Cairo package, but it distorts
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]]
2011 Mar 03
2
[Bug 706] Iptables randomly reject some packets that have accept rule
http://bugzilla.netfilter.org/show_bug.cgi?id=706 Jan Engelhardt <jengelh at medozas.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jengelh at medozas.de --- Comment #1 from Jan Engelhardt <jengelh at medozas.de> 2011-03-03 14:20:30
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
2003 Sep 09
1
Should Speex VBR Introduce Distortion?
Hi All, I've run into a small hiccup in encoding my audios with Speex. When I encode audience laughter and applause with 'speexenc' (version 1.0.1), the result is quite acceptable... until I enable VBR. Then it distorts horribly. My understanding of VBR is that it frees the encoder to vary the number of bits emitted to better maintain the quality requested, and so I would have