Changes in version 4.0.4 BUG FIXES o fixed bug in summary when there are two random effects at the lowest grouping level. thanks to Francis Huang for identifying this issue. o fixed handling of non-integer weights which could result in a fit not proceeding in some cases. Changes in version 4.0.3 (2023-11-03) improvements o there is now a predict function. BUG FIXES o the latest Matrix package (unclear what version caused the issue, maybe 1.6) caused a bug that is fixed by this version of WeMix. o the haven package doesn't always import data in formats the Matrix package recognizes. Columns that should be numeric are now cast as numeric before they are used, which may prevent this issue. Thanks to Emilie Franck for pointing this out. o the mix function documentation now notes that the coefficient standard errors are always cluster robust (CR-0) estimates. Thanks to Francis Huang for pointing out that it previously mentioned a non-existent argument. o the mix function nolonger fails if the lme4::lmer fit had a variable of exactly zero because bobyqa threw an error. Thanks fo Charles Blankenship for identifying this bug. FUNCTION RETIREMENT o the functions getHessian2 and getJacobian are removed from the package because they are not used. Changes in version 4.0.0 (2023-03-21) NEW FEATURES o the mix function now fits weighted binomial and Poisson models with up to three levels. This update uses, at the user's request the LaPlace approximation or adaptive Gauss-Hermite Quadrature (AGHQ). To achieve that, we use penalized iteratively reweighted least squares (PIRLS) with code based on lme4pureR package by Steve Walker and Doug Bates. Use nQuad=1 for LaPlace, and nQuad>1 for AGHQ. o because of this change the mix argument acc0 is now deprecated and will be ignored. Changes in version 3.3.0 (2022-12-21) IMPROVEMENTS o many warnings and errors are now clearer BUG FIXES o group mean centering and grand mean centering now calculate averages correctly for unbalanced data o group and grand mean centering now always use the level-1 weights Changes in version 3.2.2 (2022-09-23) IMPROVEMENTS o WeMix now fits linear models with any number of levels and has been tested with 4-level models. o WeMix now returns a nicer version of the random effects in the object ranefMat BUG FIXES o minor update related to the new CRAN checks. Changes in version 3.2.1 (2021-12-07) IMPROVEMENTS o 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. BUG FIXES o In a three-level linear model, when cWeights=TRUE, the weights were incorrectly adjusted. This has been fixed. Changes in version 3.2.0 (2021-11-16) BUG FIXES o mix was not returning on some data that was unsorted, and the function was made more robust to unsorted data. o 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. DOCUMENTATION o 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. Changes in version 3.1.9 (2021-10-20) IMPROVEMENTS o a possible speed up in the solver for linear models uses rbind2 in preference to rbind o The error code when a single weight was passed was unclear. Thank you to Zerleen Quader for identifying this issue. Changes in version 3.1.8 (2021-06-06) BUG FIXES o mix now works with factor outcomes in a binomial model. o mix now works with factor IDs. o the final latent estimates were not converging because the Newton steps were not sufficently controlled. They are now more agressively prevented from diverging. o when the variance estimate of a binomial model converged to the minimum variable (about 0.01) the model never acknowledged convergence, it now does. o thanks to Tan Khai Ee and Prof. Taberez A. Neyazi for identifying and helping develop test code for the above four bugs. o 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. o 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. Changes in version 3.1.7 (2021-05-11) IMPROVEMENTS o with the extended information in Groups the warning about conditional weights was extranious and so was removed. o improved infomation about weights by level under Groups header of an mml summary. o a conditioning variable cannot contain a dot, which now has a clearer error. Thank you to Felix Schulz for identifying this issue. Changes in version 3.1.6 (2020-12-08) IMPROVEMENTS o 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. Changes in version 3.1.5 (2020-09-09) IMPROVEMENTS o 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. o 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. o Updated tests to use EdSurvey 2.6.1. Changes in version 3.1.4 (2020-05-21) BUG FIXES o The vignettes should now appear as pdf files on CRAN. Changes in version 3.1.3 (2020-01-08) BUG FIXES o 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 Christrup Kjeldsen of Aarhus University, Danish School of Education, for pointing this issue out. o The Wald test now works for generalized linear models instead of throwing an error. Thanks to Christian Christrup Kjeldsen for pointing this issue out as well. Changes in version 3.1.0 NEW FEATURES o WeMix can now accept conditional weights. See the cWeights argument in the mix function. o the mix function checks weights and writes a message if they may be conditional and cWeights is set to FALSE. o Linear model evaluation is more robust and can handle data with non-invertible Z matrixes within a group. BUG FIXES o 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. VIGNETTE o 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. Changes in version 3.0.0 (2019-03-30) MODEL EVALUATION o 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. o Non-linear models are still evaluated using adaptive quadrature. NEW FEATURES o 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. o Model evaluation is now possible using Wald tests. Wald tests allow users to test both fixed effects and random effects variances. Changes in version 2.0.0 (2018-08-14) NEW MODEL TYPES o Supports binomial models MODEL SPECIFICATION o Added ability to perform group and grand mean centering to increase comparability with Hierarchical Linear and Nonlinear Modeling (HLM) software CODE o 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. BUG FIXES o Corrected the warning message for the fast option (using Rcpp) OTHER CHANGES o fast option in mix defaults to FALSE now to prioritize accuracy over speed.