similar to: How to generate multivariate uniform distribution random numbers?

Displaying 20 results from an estimated 10000 matches similar to: "How to generate multivariate uniform distribution random numbers?"

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
2006 Oct 09
2
How to generate the random numbers uniformly distributed on the unit disc?
Hi, I want to get random number which is uniformly distributed on the unit disc. How can I do that with R? Best wishes, WAN WAN [[alternative HTML version deleted]]
2010 Sep 02
1
How to generate integers from uniform distribution with fixed mean
Hi, folks, runif (n,min,max) is the typical code for generate R.V from uniform dist. But what if we need to fix the mean as 20, and we want the values to be integers only? Thanks [[alternative HTML version deleted]]
2010 Sep 08
3
Uniform Distribution
Hello, I would like to uniformly distribute values from 0 to 200. Can someone help me find the appropriate uniform distribution generator? I would like to thank you in advance for your help. Best Regards Alex [[alternative HTML version deleted]]
2005 Jul 01
5
Generating correlated data from uniform distribution
Dear R users, I want to generate two random variables (X1, X2) from uniform distribution (-0.5, 0.5) with a specified correlation coefficient r. Does anyone know how to do it in R? Many thanks! Menghui
2011 Jun 02
4
generating random covariance matrices (with a uniform distribution of correlations)
List members, Via searches I've seen similar discussion of this topic but have not seen resolution of the particular issue I am experiencing. If my search on this topic failed, I apologize for the redundancy. I am attempting to generate random covariance matrices but would like the corresponding correlations to be uniformly distributed between -1 and 1. The approach I have been using is:
2012 Sep 27
2
Generating an autocorrelated binary variable
Hi R-fellows, I am trying to simulate a multivariate correlated sample via the Gaussian copula method. One variable is a binary variable, that should be autocorrelated. The autocorrelation should be rho = 0.2. Furthermore, the overall probability to get either outcome of the binary variable should be 0.5. Below you can see the R code (I use for simplicity a diagonal matrix in rmvnorm even if it
2010 Mar 08
2
variance of discrete uniform distribution
Hi all, I am REALLY confused with the variance right now. for a discrete uniform distribution on [1,12] the mean is (1+12)/2=6.5 which is ok. y=1:12 mean(y) then var(y) gives me 13 1- on http://en.wikipedia.org/wiki/Uniform_distribution_%28discrete%29 wiki the variance is (12^2-1)/12=143/12 2-
2010 Feb 10
3
Sampling from Bivariate Uniform Distribution
Hello all!!! 1) I am wondering is there a way to generate random numbers in R for Bivariate Uniform distribution? 2) Does R have  built-in function for generating random numbers for any given bivariate distribution. Any help would be greatly appreciated !! Good day! Haneef Anver [[alternative HTML version deleted]]
2011 Feb 08
2
please hep in uniform distribution
Hi I have generate two variable with uniform disrtribution A and B and I want to calculate the number of cases where B<A^2 So I done it by sum(B<A^2), but I'm not sure if there is anther way to calculate the number of cases in the distribution or what I have done is fine thanks for helping me Woo -- View this message in context:
2011 Feb 20
8
Generating uniformly distributed correlated data.
I wish to generate a vector of uniformly distributed data with a defined correlation to another vector The only function I have been able to find doing something similar is corgen from the library ecodist. The following code generates data with the desired correlation to the vector x but the resulting vector y is normal and not uniform distributed library(ecodist) x <- runif(10^5) y
2017 Aug 04
2
Latin hypercube sampling from a non-uniform distribution
Hello, I am performing a sensitivity analysis using a Latin Hypercube sampling. However, I have difficulty to draw a Hypercube sample for one variable. I?ve generated this variable from a Poisson distribution as follows: set.seed(5) mortality_probability <- round(ppois(seq(0, 7, by = 1), lambda = 0.9), 2) barplot(mortality_probability, names.arg = seq(0, 7, by = 1), xlab = "Age
2009 Jun 25
2
crr - computationally singular
Dear R-help, I'm very sorry to ask 2 questions in a week. I am using the package 'crr' and it does exactly what I need it to when I use the dataset a. However, when I use dataset b I get the following error message: Error in drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE = "base")) : system is computationally singular: reciprocal condition number =
2013 Oct 08
3
Latin Hypercube Sample and transformation to uniformly distributed integers or classes
Hi, I'd like to use Latin Hypercube Sampling (LHC) in the the context of uncertainty / sensitivity analysis of a complex model with approximately 10 input variables. With the LHC approach I'd like to generate parameter combinations for my model input variables. Therefore I came across an simple example here on the mailing list (
2011 Jun 10
3
Test if data uniformly distributed (newbie)
Hello, I have a bunch of files containing 300 data points each with values from 0 to 1 which also sum to 1 (I don't think the last element is relevant though). In addition, each data point is annotated as an "a" or a "b". I would like to know in which files (if any) the data is uniformly distributed. I used Google and found out that a Kolmogorov-Smirnov or a Chi-square
2017 Aug 07
0
Latin hypercube sampling from a non-uniform distribution
> How can I draw a Hypercube sample for the variable mortality_probability so > that this variable exhibits the same pattern as the observed distribution? One simple way is to use the uniform random output of randomLHS as input to the quantile function for your desired distribution(s). For example: q <- randomLHS(1000, 3) colnames(q) <- c("A", "B",
2006 May 17
4
uniform and clumped point plots
I am trying to generate two dimensional random coordinates. For randomly distributed data I have simply used >xy<-cbind(runif(100),runif(100)) However I also want to generate coordinates that are more uniformly distributed, and coordinates that are more contagiously distributed than the above. Can anyone make any suggestions Thanks. Dr Terry Beutel Rangeland Scientist Animal
2017 Aug 08
1
Discrete Uniform Distribution
Hey I want to generate a discrete uniform distribution as follows: For example: I want to get 278734 records each with a numbers between 7-10. And the sum of numbers in 278734 records to be equal to 2253712. Once this is done, I want to get that printed to an excel file such that Record Value 1 9 2 7 so on 278734 8 The
2009 Jul 06
1
transform multi skew-t to uniform distribution
Hi R-users,  I have a data from multi skew t and would like to transform each of the data to uniform data.  I tried using 'pmst' but only got one output:   > rr1 <- as.vector(r1);rr1  [1]  0.7207582  5.2250906  1.7422237  0.5677233  0.7473555 -0.6020626 -2.1947872 -1.1128313 -0.6587316 -1.1409261     > pmst(rr1, xi=rep(0,10), Omega=diag(10), alpha=rep(1,10), df=5) [1] 3.676525e-09
2007 Nov 08
1
how to generate data in a simulation study
hello, I have a problem in how to generate data in a simulation study. I have a logistic model to evaluate p by 3 covariates. I need to generate 4 variables: the binary outcome Y and 3 covariates: gender (binary) and aps and tiss (continuous variables). I have the logistic model which is the expected model: log(p(y=1)/(1-p(y=1))=-1.659-0.05*sex+0.063*aps+0.04*tiss0) I generate the outcome y like