NEWS | R Documentation |
Construction of model matrices changed to re-use levels of factors while fitting for prediction. Thanks to Robert Poos for pointing the problem out.
Package mgcv of version at least 1.8-0 is required in order to avoid loading of the package for formula evaluation.
Examples changed to be less time consuming.
Bug fixed in ungroupPriors() and getPriors() to work with a grouping where only one unique value is contained. Thanks to Christine Koehler for pointing the problem out.
The logLik()
method for "flexmix"
objects now
also has a newdata
argument.
In the M-step only the parameters of the previously fitted components are passed over to avoid nesting of environments. Thanks to Dominik Ernst for pointing the problem out.
Function boot()
was fixed to work correctly with
grouped data if the groups are kept and if fixed effects are
fitted.
Authors@R used in DESCRIPTION. Deepayan Sarkar listed as contributor due to internal code copied from package lattice used for the plots in flexmix.
Model driver FLXMRlmer()
adapted for lme4 (>=
1.0).
Parallel processing disabled in stepFlexmix()
.
Package dependencies, imports and suggests modified suitably for R >= 2.15.0.
NEWS file adapted to a NEWS.Rd file.
Parallel processing is enabled in stepFlexmix()
. See
flexclust for details.
New model drivers FLXMRmultinom()
and FLXMRcondlogit()
are
included which allow to fit finite mixtures of multinomial logit
and conditional logit models. Identifiability problems might arise
for this model class. Details on sufficient identifiability
conditions are given in Gruen and Leisch (2008).
A bug in FLXMRlmm()
was fixed which did not allow to specify
restrictions on the variances of the random effects and / or the
residuals. Thanks to Gregory Matthews for pointing the problem out.
The fit function in the M-step by default now is called with an
argument containing the fitted component. This allows to use the
parameter estimates from the previous step for initialization. Fit
functions which do not require this now need a ...
argument.
Thanks to Hannah Frick and Achim Zeileis for requesting this
feature.
Function initFlexmix()
was added which is an alternative to
stepFlexmix()
where first several short runs of EM, SEM or CEM are
performed followed by a long run of EM.
A bug fixed in predict()
and fitted()
if a concomitant variable
model is specified and aggregate = TRUE
. Thanks to Julia Schiffner
for pointing this out.
A bug fixed in FLXMRmgcv()
if observations were removed in the
M-step because their a-posterior probabilities were smaller than
eps. Thanks to Ghislain Geniaux for pointing the problem out.
Vignettes moved from /inst/doc to /vignettes.
stepFlexmix()
can now be called with a concomitant variable model
FLXPmultinom()
for k
starting with 1 without getting an error. The
concomitant variable model is internally replaced by
FLXPconstant()
.
The boot()
method for "flexmix"
objects is extended to mixture
models with concomitant variables and mixtures of linear mixed
models.
A bug fixed in the summary()
method for "flexmix"
objects. The
column post > 0 did not give the correct results if weights were
used for fitting the mixture.
A bug fixed in the unique()
method for "stepFlexmix"
objects. This
only occurred if components were dropped as well as if the EM
algorithm did not converge for all repetitions. Thanks to
Sebastian Meyer for pointing this out.
A bug fixed in posterior()
. Fixed priors were always used, also if
a concomitant variable model was present.
A method added for prior()
such that if newdata is supplied and
the object is of class "flexmix"
the prior class probabilities for
each observation are returned.
A generic method for nobs()
is introduced in stats4 for R
2.13.0. flexmix now does not define this generic function and
logLik()
, AIC()
and BIC()
methods were modified to better exploit
already available methods. Thanks to Prof. Brian D. Ripley for
suggesting the modification.
A bug for boot()
fixed for "flexmix"
objects with an unbalanced
grouping variable. Thanks to Laszlo Sandor for pointing this out.
A bug for rflexmix()
fixed for "flexmix"
objects with a
concomitant variable model. Thanks to Greg Petroski for pointing
this out.
Functionality for bootstrapping finite mixture models added.
More generics and methods exported to use the refit()
method when
extending flexmix in other packages.
For long formulas FLXMRglmfix()
did not work properly due to the
splitting of the formula into several parts by deparse()
. This is
fixed by pasting them together again. Thanks to Dustin Tingley for
the bug report.
A new model driver FLXMRmgcv()
is added which allows to fit
regularized linear models in the components.
More generics and methods exported to allow extending flexmix in other packages.
The a-posteriori probabilities are now also determined as changed
for FLXfit()
for version 2.2-6 for refit()
.
Bug fixed for FLXfillconcomitant and refit when weights and grouping are present. A check was added that weights are identical within groups.
Function group()
is now exported.
Bug in the FLXgetModelmatrix()
method for the "FLXMRlmm"
class
fixed when determining identical random effects covariates for the
grouping.
A new model driver for finite mixtures of linear mixed effects models with left-censored observations is added.
Determination of the a-posteriori probabilities made numerically more stable for small likelihoods. Thanks to Nicolas Picard for the code patch.
summary()
for "FLXMRmstep"
objects now returns similar output for
which = "concomitant"
as for flexmix version 2.0-1.
New demo driver FLXMCnorm1()
for univariate Gaussian clustering.
Non-postive values for the maximum number of iterations for the
"FLXcontrol"
object are not valid. A validity check for this is
now included.
Model class "FLXMRfix"
introduced which is a subclass
of "FLXMR"
and a superclass for "FLXMRglmfix"
which also
extends "FLXMRglm"
.
Model driver FLXMCfactanal()
added which allows to
fit finite mixtures of Gaussian distributions where the
variance-covariance matrix is estimated using factor analyzers.
Comparison of formulas now done using identical()
.
Model drivers FLXMRlmer()
and FLXMRlmm()
added for fitting finite
mixtures of linear mixed effects models.
EIC()
added as additional information criterion for assessing model fit.
Bug fixed in plot()
method for "flexmix"
objects introduced in version 2.2-3.
New model driver FLXMCmvcombi()
which is a combination of
Gaussian and binary.
parameters()
now also has a which argument in order to allow to
access the parameters of the concomitant variable model.
Bug fixed in refit()
.
nobs()
now returns the number of rows in the data.frame and not the
number of individuals (similar as for example by lme).
vignette describing Version 2 added
isTRUE(all.equal()
) replaced with identical()
.
Bug fixed for prior in flexmix()
.
New function relabel()
to sort components (generic is in modeltools).
New example data generator ExLinear()
.
Fixed a bug in handling groups (gave an error for empty design matrices).
Added new model FLXMRrobglm()
for robust estimation of GLMs.
Renamed cluster()
to clusters()
to avoid conflict with cluster()
from package survival
Bug fixed in internal functions using S4 generics and methods.
refit()
now has a method argument. For method "optim"
the
variance-covariance matrix is determined using optim()
to maximize the
likelihood initialized in the solution found by the EM algorithm.
Method "mstep"
refits the component specific and concomitant models
treating the posterior probabilities as given, i.e. performs an M-step
of the EM algorithm.
Lapply()
added which allows to apply a function to each component
of a finite mixture
KLdiv()
modified to allow for determination with a discrete and a
continuous version of the KL divergence
Model driver for zero-inflated component specific models.
Latent class analysis for binary multivariate data is now possible to estimate for truncated data where the number of observations with pattern only zeros is missing.
new argument newdata for cluster()
new unique()
method for "stepFlexmix"
objects
New class definitions for component specific models and concomitant variable models.
fitted()
and predict()
now have an aggregate argument in order to
be able to determine the aggregated values over all components.
The package has now a vignette presenting several applications of finite mixtures of regression models with varying and fixed effects on artificial and real data which can be a accessed using the command vignette("regression-examples").
The vignette "flexmix-intro" was adapted to reflect the changes made in the package.
stepFlexmix()
now returns an object of class "stepFlexmix"
which has
a print()
and plot()
method. In addition getModel()
can be used to
select an appropriate model.
flexmix()
now has a weights argument for multiple identical
observations.
New model drivers for latent class analysis with Bernoulli and Poisson distributed multivariate observations.
Variants of the EM algorithm have been modified to correspond to
CEM and SEM. These names can now also be used for specifying the
classify slot of the "FLXcontrol"
object.
The package can now fit concomitant variable models.
New M-step driver for regression models with varying and fixed effects.
ICL information criterion added.
Fixed a bug that made the log-likelihood infinity for observations where all posteriors are numerically zero.
Fixed a bug for formulae with dots.
posterior()
now has a newdata argument.
New demo driver for model-based clustering of binary data.
Adapted to changes in summary.glm()
of R version 2.3.0.
The cluster
argument of flexmix()
may now also be a matrix of
posterior probabilities.
Fixed a bug to make size table work in case of empty clusters.
Fixed a bug in likelihood computation for grouped observations.
The artificial NPreg data now also have a binomial response,
added example to help("flexmix"
).
The FLXglm()
driver now has an offset argument.
New data set seizure as example for a Poisson GLM with an offset.
fitted()
can be used to extract fitted values from "flexmix"
and "FLXrefit"
objects.
New accessor methods cluster()
and posterior()
.
The package now uses lazy loading and has a namespace.
The package has now an introductionary vignette which can be
accessed using the command vignette("flexmix-intro"). The vignette
has been published in the Journal of Statistical Software, Volume
11, Issue 8 (http://www.jstatsoft.org/v11/i08), and the paper should be used as
citation for flexmix, run citation("flexmix")
in R 2.0.0 or newer
for details.
Several typos in help pages have been fixed.
Adjusted for R 2.0.0.
Fixed a bug in the summary()
and plot()
methods
of "flexmix"
objects in case of empty clusters.
stepFlexmix()
takes two new arguments: compare
allows fo find
minimum AIC/BIC solutions in addition to maximum likelihood,
verbose
gives some information about progress.
Use a default of verbose = 0
in FLXcontrol()
(better in combination
with stepFlexmix()
).
New summary()
and plot()
methods for "flexmix"
objects.
"FLXglm"
objects can now be automatically refit()
ted to get table of
significance tests for coefficients.
New function stepFlexmix()
for more automated model search.
The artificial example data now have functions to
create them and a pre-stored data sets, new function plotEll()
to
plot 2d Gaussians with confidence ellipses.
New function KLdiv()
to compute Kullback-Leibler divergence of
components.
The calculation of the degrees of freedom for FLXmclust()
was wrong
Fixed some codoc problems (missing aliases).
First version released on CRAN: 0.7-0