many warnings and errors are now clearer
group mean centering and grand mean centering now calculate averages correctly for unbalanced data
group and grand mean centering now always use the level-1 weights
WeMix now fits linear models with any number of levels and has been tested with 4-level models.
WeMix now returns a nicer version of the random effects in the object
minor update related to the new CRAN checks.
When estimating the standard errors, the evaluation of the Jacobian was further optimized. Internal tests show a speedup between zero and thirty percent per model fit.
In a three-level linear model, when
cWeights=TRUE, the weights were incorrectly adjusted. This has been fixed.
mix was not returning on some data that was unsorted, and the function was made more robust to unsorted data.
mix used to drop rows if they had an
NA on any column, regardless of if it was used in the model. Now it first forms a model frame with the relevant rows before doing this. Thank you to Bernhard Clemm von Hohenberg for pointing out this bug. From https://github.com/American-Institutes-for-Research/WeMix/issues/2.
The documentation for the
weights variable has been improved to indicate what order to put the weights in. Thank you to Bernhard Clemm von Hohenberg for pointing out the possible confusion.
a possible speed up in the solver for linear models uses
rbind2 in preference to
The error code when a single weight was passed was unclear. Thank you to Zerleen Quader for identifying this issue.
mix now works with factor outcomes in a binomial model.
mix now works with factor IDs.
the final latent estimates were not converging because the Newton steps were not sufficently controlled. They are now more agressively prevented from diverging.
when the variance estimate of a binomial model converged to the minimum variable (about 0.01) the model never acknowledged convergence, it now does.
thanks to Tan Khai Ee and Prof. Taberez A. Neyazi for identifying and helping develop test code for the above four bugs.
non-linear models summary function was not printing correctly. They are now also correctly showing weighted results, similar to linear models in 3.1.7.
the warning for very low variance models in binomial regression was updated to clearly state the limitation of WeMix (it cannot estimate such models), and possible solutions.
with the extended information in
Groups the warning about conditional weights was extranious and so was removed.
improved infomation about weights by level under
Groups header of an
a conditioning variable cannot contain a dot, which now has a clearer error. Thank you to Felix Schulz for identifying this issue.
it is possible to pass an S3 object that claims to extend data frame but does not (such as a
tbl_df) and so now all data objects are cast as a data frame before procesing beings. The specific issue is that a
tbl_df defaults to
drop=FALSE causing a single vector to maintain its name when it is expected to be unnamed.
Models now use less memory when there is a large number of units and groups after switching to a sparse Matrix for the random effects.
The method of forming a generalized inverse was made more robust. It used to try only a QR decomposition based generalized inverse; this is now lest robust for unknown reasons. Now it also tries an SVD decomposition based generalized inverse.
Updated tests to use EdSurvey 2.6.1.
The vignettes should now appear as pdf files on CRAN.
The method used to determine the rank of a matrix was brought into agreement with the
base package when the matrix was a base matrix. Prior to this it was possible to get an error from a call to
mix that should have returned. Now these calls to
mix should return. Thanks to Christian Kjeldsen of Aarhus University, Danish School of Education, for pointing this issue out.
The Wald test now works for generalized linear models instead of throwing an error. Thanks to Christian Kjeldsen for pointing this issue out as well.
WeMix can now accept conditional weights. See the
cWeights argument in the
mix function checks weights and writes a message if they may be conditional and
cWeights is set to
Linear model evaluation is more robust and can handle data with non-invertible Z matrixes within a group.
Linear models now use
base::qr more aggressively because of poor performance of the
Matrix::qr.coef function on a sparse QR when the system is singular. This previously resulted in very large variance estimates. This also fixed an
invalid 'times' argument error.
The code in the vignette was not the code used to generate the results and some values were incorrectly entered in the comparison table under the
mix column. These problems were fixed.
Linear models are now solved using an analytical solution based on work by Bates and Pinheiro, (1998). This solution is significantly faster than the previous adaptive quadrature method.
Non-linear models are still evaluated using adaptive quadrature.
WeMix can now fit weighted three-level linear models, see the Weighted Linear Mixed-Effects Model vignette for details. Non-linear models are still evaluated using adaptive quadrature and are limited to two-level models.
Model evaluation is now possible using Wald tests. Wald tests allow users to test both fixed effects and random effects variances.
Supports binomial models
Added ability to perform group and grand mean centering to increase comparability with Hierarchical Linear and Nonlinear Modeling (HLM) software
Although three-level models are not currently supported, in version 2.0.0, changes were made to the way groups handled and to the data structures used for integration over random effects so as to be compatible with the future development of three-level models.
Corrected the warning message for the fast option (using Rcpp)
fast option in
mix defaults to
FALSE now to prioritize accuracy over speed.