# this is shown with a scaled likelihood matrix from self-assignment
# of the reference individuals
# we have to get the ploidies to pass to tcf2param_list
locnames <- names(alewife)[-(1:16)][c(TRUE, FALSE)]
ploidies <- rep(2, length(locnames))
names(ploidies) <- locnames
params <- tcf2param_list(alewife, 17, ploidies = ploidies)
logl <- geno_logL(params)
SL <- apply(exp(logl), 2, function(x) x/sum(x))
test_em <- gsi_em_1(SL,
rep(1/params$C, params$C),
max_iterations = 10^6,
tolerance = 10^-7,
return_progression = TRUE)
Run the code above in your browser using DataLab