# print.fixest_fitstat: Print method for fit statistics of fixest estimations In fixest: Fast Fixed-Effects Estimations

 print.fixest_fitstat R Documentation

## Print method for fit statistics of fixest estimations

### Description

Displays a brief summary of selected fit statistics from the function `fitstat`.

### Usage

```## S3 method for class 'fixest_fitstat'
print(x, na.rm = FALSE, ...)
```

### Arguments

 `x` An object resulting from the `fitstat` function. `na.rm` Logical, default is `FALSE`. If `TRUE`, the statistics that are missing are not displayed. `...` Not currently used.

### Examples

```
gravity = feols(log(Euros) ~ log(dist_km) | Destination + Origin, trade)

# Extracting the 'working' number of observations used to compute the pvalues
fitstat(gravity, "g", simplify = TRUE)

# Some fit statistics
fitstat(gravity, ~ rmse + r2 + wald + wf)

# You can use them in etable
etable(gravity, fitstat = ~ rmse + r2 + wald + wf)

# For wald and wf, you could show the pvalue instead:
etable(gravity, fitstat = ~ rmse + r2 + wald.p + wf.p)

# Now let's display some statistics that are not built-in
# => we use fitstat_register to create them

# We need: a) type name, b) the function to be applied
#          c) (optional) an alias

fitstat_register("tstand", function(x) tstat(x, se = "stand"), "t-stat (regular)")
fitstat_register("thc", function(x) tstat(x, se = "heter"), "t-stat (HC1)")
fitstat_register("t1w", function(x) tstat(x, se = "clus"), "t-stat (clustered)")
fitstat_register("t2w", function(x) tstat(x, se = "twow"), "t-stat (2-way)")

# Now we can use these keywords in fitstat:
etable(gravity, fitstat = ~ . + tstand + thc + t1w + t2w)

# Note that the custom stats we created are can easily lead
# to errors, but that's another story!

```

fixest documentation built on April 1, 2022, 1:05 a.m.