Displaying 2 results from an estimated 2 matches for "mval".
Did you mean:
_val
2008 Aug 21
3
[help] simulation of a simple Marcov Stochastic process for population genetics
Hi, this is my first time using R. I want to simulate the following process:
"in a population of size N, there are i individuals bearing genotype A, the
number of those bearing A is j in the next generation, which following a
binominal distribution (choose j from 2*N, the p is i/2*N), to plot the
probability of the next generations, my script is as follows. It cannot run
successfully,
2010 Oct 15
0
nomianl response model
...es, as
well as a two-component list for the inserts:
H <- c(0.88, 0.72, 0.89, 0.93, 1.23, 0.86)
T <- c(7.14, 7.14, 7.49, 8.14, 7.14, 7.32)
O <- c(0, 0, 0, 2, 0, 0)
R <- c(1.2, 1.4)
m <- rbind(H, T)
o <- rbind(O, c(0, 0, 1, 0, 0, 0))
l <- list(R1 = R, R2 = 1.6)
f <- function(mval, midx, mrep) {
if(nrow(mval) != nrow(midx) || nrow(midx) != length(l))
stop('unequal numbers of rows among inputs')
n <- nrow(mval)
out <- vector('list', n)
for(i in seq_len(n))
out[[i]] <- append(mval[i, ], as.numeric(l[[i]]), after =
which...