Learn R Programming

FENmlm (version 2.4.4)

res2table: Facility to display the results of multiple femlm estimations.

Description

This function aggregates the results of multiple estimations and display them in the form of only one table whose rownames are the variables and the columns contain the coefficients and standard-errors.

Usage

res2table(..., se = c("standard", "white", "cluster", "twoway",
  "threeway", "fourway"), cluster, depvar, drop, order, digits = 4,
  pseudo = TRUE, convergence, signifCode = c(`***` = 0.01, `**` = 0.05,
  `*` = 0.1), subtitles, keepFactors = FALSE, family)

Value

Returns a data.frame containing the formatted results.

Arguments

...

Used to capture different femlm objects. Note that any other type of element is discarded. Note that you can give a list of femlm objects.

se

Character scalar. Which kind of standard error should be computed: “standard” (default), “White”, “cluster”, “twoway”, “threeway” or “fourway”?

cluster

A list of vectors. Used only if se="cluster", “se=twoway”, “se=threeway” or “se=fourway”. The vectors should give the cluster of each observation. Note that if the estimation was run using cluster, the standard error is automatically clustered along the cluster given in femlm. For one-way clustering, this argument can directly be a vector (instead of a list). If the estimation has been done with cluster variables, you can give a character vector of the dimensions over which to cluster the SE.

depvar

Logical, default is missing. Whether a first line containing the dependent variables should be shown. By default, the dependent variables are shown only if they differ across models.

drop

Character vector. This element is used if some variables are not to be displayed. This should be a regular expression (see regex help for more info). There can be more than one regular expression. Each variable satisfying the regular expression will be discarded.

order

Character vector. This element is used if the user wants the variables to be ordered in a certain way. This should be a regular expression (see regex help for more info). There can be more than one regular expression. The variables satisfying the first regular expression will be placed first, then the order follows the sequence of regular expressions.

digits

Integer, default is 4. The number of digits to be displayed.

pseudo

Logical, default is TRUE. Should the pseudo R2 be displayed?

convergence

Logical, default is missing. Should the convergence state of the algorithm be displayed? By default, convergence information is displayed if at least one model did not converge.

signifCode

Named numeric vector, used to provide the significance codes with respect to the p-value of the coefficients. Default is c("***"=0.01, "**"=0.05, "*"=0.10).

subtitles

Character vector of the same lenght as the number of models to be displayed. If provided, subtitles are added underneath the dependent variable name.

keepFactors

Logical, default is FALSE. By default, when factor variables are contained in the estimation, they are printed as if they were a cluster variable. Put to TRUE to display all the coefficients of the factor variables.

family

A logical, default is missing. Whether to display the families of the models. By default this line is displayed when at least two models are from different families.

Author

Laurent Berge

See Also

See also the main estimation function femlm. Use summary.femlm to see the results with the appropriate standard-errors, getFE to extract the cluster coefficients, and the functions res2table and res2tex to visualize the results of multiple estimations.

Examples

Run this code

# two fitted models with different expl. variables:
res1 = femlm(Sepal.Length ~ Sepal.Width + Petal.Length +
            Petal.Width | Species, iris)
# estimation without clusters
res2 = update(res1, . ~ Sepal.Width | 0)

# We export the two results in one Latex table:
res2table(res1, res2)

# With clustered standard-errors + showing the dependent variable
res2table(res1, res2, se = "cluster", cluster = iris$Species, depvar = TRUE)

# Changing the model names + the order of the variables
# + dropping the intercept.
res2table(model_1 = res1, res2,
          order = c("Width", "Petal"), drop = "Int",
          signifCode = c("**" = 0, "*" = 0.2, "n.s."=1))



Run the code above in your browser using DataLab