NEWS | R Documentation |

Correction of a bug introduced after the modification of the

`getFE`

function.

Major improvement of the internal code. All functions relating to the fixed-effects have been ported to c++, significantly improving performance (both in computing time and memory usage).

In the

`print`

method, now the BIC and likelihood numbers are properly aligned.[res2table] The titles of each column are more consistent.

[femlm] New controls to check that the formula given by the user is valid and can be evaluated.

[femlm] Better controls when using

`na.rm = TRUE`

.[res2tex] Argument “append” has been superseded by “replace” for improved clarity (the former can still be used though).

Now

`getFE`

returns a list of simple vectors (the fixed-effects on each dimension) instead of`femlm.cluster`

objects.The

`print`

method has been superseded by a`summary`

method.

[femlm] For estimations with fixed-effects only (no variable), the print method did not work. Now corrected.

[femlm] For estimations in Poisson with 2 fixed-effects, when convergence was "difficult", a bug could emerge. Now corrected.

[femlm] Bug when there were NAs in the data and a factor variable in the right hand side.

[print.femlm] For estimations without variables (only the fixed-effects), the print method now works properly.

[diagnostic] Now function

`diagnostic`

works properly when there is a variable that is factored in the formula (i.e. as.factor(var) is applied) and not in the fixed-effect part.

[femlm] Function

`femlm()`

has the new argument`showWarning`

whose default is`TRUE`

. If`FALSE`

, then warnings relating to a) the number of NA values, b) the clusters removed from estimation and c) the convergence state, are not prompted anymore.[res2tex] The new argument

`powerBelow`

controls the display of coefficients/standard-errors of low value in Latex. For values lower than`10**(powerBelow+1)`

the display in Latex is now`x.xx $\times 10^{pow}$`

, for example`0.0000456`

would be displayed as`4.56 $\times 10^{-5}$`

.

Function

`diagnostic()`

now finds more involved collinearity cases.Function res2tex now provides a “nicer” display of coefficients/standard-errors.

Function

`diagnostic()`

did not work when some observations were removed from the estimation. This is now corrected.[femlm] For 3+ clusters, when finding the cluster coefficients was ‘difficult’, there was a bug. Now corrected.

[femlm] Now whenever the data of an estimation contains NA,

`na.rm=TRUE`

and no fixed-effects are used, the observations removed are correctly returned in the object`obsRemoved`

. This was causing a bug in`summary`

with custom clustered standard errors.

Argument “na.rm” is introduced. If the variables necessary for the estimation contain NAs and

`na.rm = TRUE`

, then all observations containing NA are removed prior to estimation and a warning message is raised detailing the number of observations removed. By default, if the necessary variables contain NA, an error is raised.

Argument “useAcc” is removed since now the acceleration algorithm is controlled dynamically.

Improved algorithm to obtain the cluster coefficients for 3+ clusters. For difficult cases, convergence is faster.

Now the acceleration algorithm (to get the cluster coefficients) is set up dynamically. Increases convergence speed overall.

When there is no acceleration, the algorithm converges faster (for 2+ clusters).

Important improvement of the algorithm getting the derivatives of the cluster coefficients. Convergence is fatser overall, especially for difficult cases.

Algorithm has been improved when factor variables are used as clusters.

Update method is now faster when using the same clusters and family.

Better errors messages regarding standard-errors clustering.

Better error messages when a cluster variable is not in the data.

Amelioration of function

`diagnostic`

.

New examples regarding the clustering of standard-errors.

[femlm/cores, reported by Valerio Leone Sciabolazza] Multi-core estimations did not work anymore since version 2.2.0. This has been corrected.

Arguments ‘itermax.cluster’ and ‘itermax.deriv’ are added to the function femlm. They control the number of iterations in the step used to obtain the cluster coefficients and the step used to obtain the derivatives of the cluster coefficients.

For 2+ clusters, the algorithm to obtain the cluster coefficients has been improved. Convergence is usually faster.

For the Gaussian and Poisson models, and in the case of two clusters, the algorithm getting the cluster coefficients has been improved. Now it is much more efficient when dealing with difficult cases.

For 2 clusters, the algorithm to obtain the derivative of the cluster coefficients has been improved. Convergence is usually faster for difficult cases.

Information displayed when verbose > 0 is more detailed.

Better handling of the dynamic precision leading to (usually) faster convergence.

Dependence to package Matrix has been removed.

Slight modifications in the vignette.

Function diagnostic() is created to quickly spot where possible estimation problem come from. Ususally, perfect collinearity (between the explanatory variables or with the cluster variables) leads to false convergence of the optimization algorithm. This function helps figure out which variables that are collinear.

Function obs2remove() is created to obtain the observations that need to be withdrawn from a Poisson, Negative Binomial or Logit estimation (because of only 0 or 1 outcomes for some clusters). The function femlm automatically removes such observations before performing the estimation; this function simply allows the user to clean the data before the estimation is done, if needed.

[femlm] Correction of a bug regarding the constuction of the cluster matrix when the clusters were complex variables in the formula and some observations had to be removed.

Bug in displaying one table of the vignette has been corrected.

Some parts of the vignette have been rewritten.

[stats.methods] Several statistics methods have been implemented: nobs, AIB, BIC, logLik, coef, fitted, residuals, formula, model.matrix, predict, vcov, confint and update.

[res2table] New arguments ‘depvar’ and ‘family’: to control whether the dependent variables (resp. model families) should be displayed.

[res2table] Now the

`call`

is used to produce more informative model names by default.[res2tex] New argument ‘family’ to control whether the families of the models should be displayed.

[summary/vcov] Added the possibility to cluster the standard-errors with direct reference to a cluster variable used in the estimation. Example:

`summary(est, se = "cluster", cluster = "var_2")`

.

[femlm] Formulas are more robustly handled with the package Formula.

[femlm–negative binomial] Added a warning message when there is no overdispersion.

[print.femlm] Information is now displayed more compactly

Slightly faster internal functions.

Some argument names in femlm have been modified for clarification:

[start => NL.start] Argument

`start`

now becomes`NL.start`

to emphasize that it concerns the non-linear in parameters part only. This is the same for argument`start.init`

which becomes`NL.start.init`

.[debug => verbose] Argument

`debug`

of type logical now becomes`verbose`

of type integer which can take values 0, 1 or 2 depending of the level of information to be reported.

Improved examples.

A new reference is added which details the theory behind the method.

[femlm–data] Now the function properly handles matrices in argument ‘data’.

OpenMP is handled differently (now used conditionnaly).

CITATION is added.

Some items in the femlm output have changed names to fit the

`lm/glm`

vocabuary more closely. This concerns: (old name => new name) coef => coefficients, expected.predictor => fitted.values, k => nparams, resids => residuals.A demo has been added.

Warnings have been suppressed when the clustering of standard-errors was equivocal. They have been replaced by explicit mention of the cluster variables in the type of the standard-errors.

[femlm] Improved warning messages for overfitting problems.

[femlm] Improved error-handling.

Amelioration of the Vignette.

[femlm] Added argument “precision.cluster” so that the user can set the level of precision manually (concerns the algorithm to obtain the cluster coefficients).

[summary.femlm] For one-way clustering, the argument “cluster” can now be a vector.

A print method for the fixed-effects obtained with function

`getFE`

has been implemented.

A vignette has been created.

Documentation has been added for fixed-effects plotting and for a new print method.

Some examples have been updated.

[getFE] Corrected a small glitch that impeded the algorithm to find the right solution in presence of complicated cases.

[femlm] The function could not be evaluated at all when parallel::detectCores() gives NA. This has been corrected. Now when parallel::detectCores() gives NA, the number of cores cannot be set greater than 1.

[res2tex] In the exported Latex table the word ‘Cluster’ is changed to ‘Fixed-Effects’.

[summary.femlm] Using cluster=NULL does not cause problems any more.

[print.femlm] Corrected a spelling mistake.

New argument 'cores' => added multi cores with openMP. Particularly efficient for the Negative Binomial and the Logit models.

Added a fixed-point acceleration algorithm for 3+ clusters and also to obtain the derivatives.

Cluster coefficient precision is dynnamically adjusted for complex problems.

Faster matrix creation.

[Design] Argument noWarning is dropped.

[Design] clearer message when clusters are removed.

[Bug] corrected undue information reporting.

[Bug] corrected important bug that made some estimations fail.

[Help] Added more accurate information on the returned objects.

[c++ code] Fixed overloading problem.

Improved help pages.

Code more robust to overfitting situations (in particular for the Logit case).

Added an acceleration algorithm to get the fixed-point for 2 clusters.

New collinearity warnings.

Algorithm is greatly improved.

Two new likelihood models: Negative Binomial and Gaussian.

Any number of clusters is supported.

The functions res2table/res2tex to export the results are greatly enhanced.

cluster-robust covariance: the method to compute it has been improved (more robust to rounding problems).

Computing standard errors: up to four-way clustering is supported.

The function design has changed.

There is only one function called femlm that performs “normal” estimations and “non.linear” in parameters estimations when adding the argument NL.fml.

clusters can now directly be inserted in the formula without using the arument “cluster”.

Name change: the argument “dummy” becomes “cluster”.

Bug related to the handling of the upper and lower bounds is now corrected.