2 data("tribolium", package = "flexmix")
4 ## uses FLXMRglm() from package.
5 tribMix <- initFlexmix(cbind(Remaining, Total - Remaining) ~ Species,
6 k = 2, nrep = 5, data = tribolium,
7 model = FLXMRglm(family = "binomial"))
8 parameters(tribMix); logLik(tribMix)
11 ## uses FLXMRglm() from source file which allows to specify link.
12 tribMixNew <- initFlexmix(cbind(Remaining, Total - Remaining) ~ Species,
13 k = 2, nrep = 5, data = tribolium,
14 model = FLXMRglm(family = "binomial"))
15 parameters(tribMixNew); logLik(tribMixNew)
17 tribMixlogit <- initFlexmix(cbind(Remaining, Total - Remaining) ~ Species,
18 k = 2, nrep = 5, data = tribolium,
19 model = FLXMRglm(family = binomial(link = logit)))
20 parameters(tribMixlogit); logLik(tribMixlogit)
22 tribMixprobit <- initFlexmix(cbind(Remaining, Total - Remaining) ~ Species,
23 k = 2, nrep = 5, data = tribolium,
24 model = FLXMRglm(family = binomial(link = probit)))
25 parameters(tribMixprobit); logLik(tribMixprobit)