# realistic random sample of size 100: mutation probability 1e-9,
# mean final number 1e9, coefficient of variation on final numbers 0.3,
# fitness 0.9, lognormal lifetimes, 5% mutant deaths, plating efficiency 80%
x <- rflan(100, mutprob = 1e-9, mfn = 1e9, cvfn = 0.3, fitness = 0.9, death = 0.05, plateff = 0.8)
# maximum likelihood estimates with mean final number
meanfn <- mutestim(x$mc, mfn = 1e9)
# maximum likelihood estimates with final numbers
withfn <- mutestim(x$mc, x$fn)
# change model
Hmodel <- mutestim(x$mc, x$fn, model = "H")
# faster methods
GFmethod <- mutestim(x$mc, x$fn, method = "GF")
P0method <- mutestim(x$mc, x$fn, method = "P0")
# take deaths into account
withdeaths <- mutestim(x$mc, x$fn, death = 0.05, method = "GF")
# with plateff
withpef <- mutestim(x$mc, x$fn, death = 0.05, plateff = 0.8, method = "GF")
# compare results
rbind(meanfn, withfn, Hmodel, GFmethod, P0method, withdeaths, withpef)
# extreme example
x <- rflan(1000, mutations = 50, fitness = 0.5, dist = "exp")$mc
summary(x)
mutestim(x, method = "GF")
mutestim(x)
mutestim(x, winsor = 5000)
if (FALSE) {
# None null count in the sample: P0 can not be used.
mutestim(x, method = "P0")
}
Run the code above in your browser using DataLab