| NEWS | R Documentation | 
NEWS for WeMix
Changes in version 4.0.3
improvements
- there is now a - predictfunction.
BUG FIXES
- the latest Matrix package (unclear what version caused the issue, maybe 1.6) caused a bug that is fixed by this version of WeMix. 
- the - havenpackage doesn't always import data in formats the- Matrixpackage 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.
- the - mixfunction 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.
- the - mixfunction nolonger fails if the- lme4::lmerfit had a variable of exactly zero because- bobyqathrew an error. Thanks fo Charles Blankenship for identifying this bug.
FUNCTION RETIREMENT
- the functions - getHessian2and- getJacobianare removed from the package because they are not used.
Changes in version 4.0.0
NEW FEATURES
- the - mixfunction 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- lme4pureRpackage by Steve Walker and Doug Bates. Use- nQuad=1for LaPlace, and- nQuad>1for AGHQ.
- because of this change the - mixargument- acc0is now deprecated and will be ignored.
Changes in version 3.3.0
IMPROVEMENTS
- many warnings and errors are now clearer 
BUG FIXES
- 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 
Changes in version 3.2.2
IMPROVEMENTS
- 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 - ranefMat
BUG FIXES
- minor update related to the new CRAN checks. 
Changes in version 3.2.1
IMPROVEMENTS
- 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
- In a three-level linear model, when - cWeights=TRUE, the weights were incorrectly adjusted. This has been fixed.
Changes in version 3.2.0
BUG FIXES
-  mixwas not returning on some data that was unsorted, and the function was made more robust to unsorted data.
-  mixused to drop rows if they had anNAon 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
- The documentation for the - weightsvariable 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
IMPROVEMENTS
- a possible speed up in the solver for linear models uses - rbind2in preference to- rbind
- 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
BUG FIXES
-  mixnow works with factor outcomes in a binomial model.
-  mixnow 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. 
Changes in version 3.1.7
IMPROVEMENTS
- with the extended information in - Groupsthe warning about conditional weights was extranious and so was removed.
Changes in version 3.1.7
IMPROVEMENTS
- improved infomation about weights by level under - Groupsheader of an- mmlsummary.
- 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
IMPROVEMENTS
- 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_dfdefaults to- drop=FALSEcausing a single vector to maintain its name when it is expected to be unnamed.
Changes in version 3.1.5
IMPROVEMENTS
- 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. 
Changes in version 3.1.4
BUG FIXES
- The vignettes should now appear as pdf files on CRAN. 
Changes in version 3.1.3
BUG FIXES
- The method used to determine the rank of a matrix was brought into agreement with the - basepackage when the matrix was a base matrix. Prior to this it was possible to get an error from a call to- mixthat should have returned. Now these calls to- mixshould return. Thanks to Christian Christrup 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 Christrup Kjeldsen for pointing this issue out as well. 
Changes in version 3.1.0
NEW FEATURES
-  WeMixcan now accept conditional weights. See thecWeightsargument in themixfunction.
- the - mixfunction checks weights and writes a message if they may be conditional and- cWeightsis set to- FALSE.
- Linear model evaluation is more robust and can handle data with non-invertible Z matrixes within a group. 
BUG FIXES
- Linear models now use - base::qrmore aggressively because of poor performance of the- Matrix::qr.coeffunction on a sparse QR when the system is singular. This previously resulted in very large variance estimates. This also fixed an- invalid 'times' argumenterror.
VIGNETTE
- 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 - mixcolumn. These problems were fixed.
Changes in version 3.0.0
MODEL EVALUATION
- 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. 
NEW FEATURES
- 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. 
Changes in version 2.0.0
NEW MODEL TYPES
- Supports binomial models 
MODEL SPECIFICATION
- Added ability to perform group and grand mean centering to increase comparability with Hierarchical Linear and Nonlinear Modeling (HLM) software 
CODE
- 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
- Corrected the warning message for the fast option (using Rcpp) 
OTHER CHANGES
-  fastoption inmixdefaults toFALSEnow to prioritize accuracy over speed.