Displaying 2 results from an estimated 2 matches for "tp3019044p3019044".
2010 Oct 29
1
Simulating data, loop
...(40,1,3)
x <- 1+2*y1+ rnorm(40,0,5)
#Remove values in Y dependent on X:
ynew <- rep(NA,40)
for (j in 1:40)
{
if (x[j] < 0){ynew[j] <- rbinom(1,1,0.50)}
if (x[j] > 0){ynew[j] <- rbinom(1,1,0.10)}
}
--
View this message in context: http://r.789695.n4.nabble.com/Simulating-data-loop-tp3019044p3019044.html
Sent from the R help mailing list archive at Nabble.com.
2010 Oct 31
1
R-help Digest, Vol 92, Issue 31
...40,1,3)
x <- 1+2*y1+ rnorm(40,0,5)
#Remove values in Y dependent on X:
ynew <- rep(NA,40)
for (j in 1:40)
{
if (x[j] < 0){ynew[j] <- rbinom(1,1,0.50)}
if (x[j] > 0){ynew[j] <- rbinom(1,1,0.10)}
}
--
View this message in context:
http://r.789695.n4.nabble.com/Simulating-data-loop-tp3019044p3019044.html
Sent from the R help mailing list archive at Nabble.com.
------------------------------
Message: 17
Date: Fri, 29 Oct 2010 09:22:09 -0400
From: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
To: r-help <r-help@r-project.org>
Subject: [R] help pages do not open
Message-ID...