search for: corgen

Displaying 8 results from an estimated 8 matches for "corgen".

Did you mean: jorgen
2007 Oct 17
1
correlated data
Hi!! I am trying to generate data with specific correlation using corgen method from the ecodist package. It does not seem to generate the data properly. I am listing the code below. Secondly, when I put the code given below all in one file and source it, it is unable to complete the task. But when I execute it one at a time it is able to complete it. Can someone point...
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 <- corgen(x=x, r=.5)$y Do anyone know a similar function generating uniform dist...
2012 Mar 15
6
Generation of correlated variables
Hi everyone. Based on a dependent variable (y), I'm trying to generate some independent variables with a specified correlation. For this there's no problems. However, I would like that have all my "regressors" to be orthogonal (i.e. no correlation among them. For example, y = x1 + x2 + x3 where the correlation between y x1 = 0.7, x2 = 0.4 and x3 = 0.8. However, x1, x2 and x3
2007 Jun 12
4
Generating artificial datasets with a specific correlation coefficient.
I need to create artificial datasets with specific correlation coefficients (i.e. a dataset that returns r = 0.30, etc.) as examples for a lab I am teaching this summer. Is there a way to do that in R? Thanks. Jim Milks Graduate Student Environmental Sciences Ph.D. Program 136 Biological Sciences Wright State University 3640 Colonel Glenn Hwy Dayton, OH 45435 [[alternative HTML version
2013 Mar 05
3
Simulate binary correlated data
Dear R experts, I am trying to simulate correlated binary data and have stumbled upon the following problem: With the help of "binarySimCLF" or "mvpBinaryEp" I have been able to simulate correlating binary vectors given certain mean values and a desired correlation. My problem is that these procedures do not allow you to specify the exact vector for which you want to generate
2011 Sep 01
0
UNSOLVED: Fwd: generate correlated qualitative data
...( x == 0) { > xv <- sample(c(0,0),100, replace = T, prob = c(0.5, 0.5)) > } > return(xv) > } > > # applying the function > x = mfun1(1) > > # just what I know so far, correlated sample for a quantative data (i do > not want !) > library(ecodist) > y <- corgen(x=x, r=.5)$y > What I want is to generate new variable that is correlated at the same new > variable should be a qualitative one with just value 2,1,0 (no decimals). > > I have vector of length 100, just an example > vc <- sample(c(2,1,0),100, replace = T, prob = c(0.6, 0.2, 0.2))...
2009 Nov 25
3
Random data
Hi, how can I produce random data which lies around a straight line with angle 45 degree. Similar to this image: http://zoonek2.free.fr/UNIX/48_R/g134.png Cheers -- View this message in context: http://old.nabble.com/Random-data-tp26513822p26513822.html Sent from the R help mailing list archive at Nabble.com.
2011 Aug 31
0
generate correlated qualitative data
...sample(c(1,0),100, replace = T, prob = c(0.6, 0.4)) } if ( x == 0) { xv <- sample(c(0,0),100, replace = T, prob = c(0.5, 0.5)) } return(xv) } # applying the function x = mfun1(1) # just what I know so far, correlated sample for a quantative data (i do not want !) library(ecodist) y <- corgen(x=x, r=.5)$y What I want is to generate new variable that is correlated at the same new variable should be a qualitative one with just value 2,1,0 (no decimals). I have vector of length 100, just an example vc <- sample(c(2,1,0),100, replace = T, prob = c(0.6, 0.2, 0.2)) I want to apply the ab...