x: A fixest_mutli object, obtained e.g. from feols.
lhs: Logical scalar, default is FALSE. If TRUE, the number of different left hand sides is returned.
rhs: Logical scalar, default is FALSE. If TRUE, the number of different right hand sides is returned.
sample: Logical scalar, default is FALSE. If TRUE, the number of different samples is returned.
fixef: Logical scalar, default is FALSE. If TRUE, the number of different types of fixed-effects is returned.
iv: Logical scalar, default is FALSE. If TRUE, the number of different IV stages is returned.
Returns
It returns an integer scalar. If no argument is provided, the total number of models is returned.
Examples
base = setNames(iris, c("y","x1","x2","x3","species"))est = feols(y ~ csw(x1, x2, x3), base, fsplit =~species)# there are 3 different RHSs and 4 different samplesmodels(est)# We can obtain these numbers with n_modelsn_models(est, rhs =TRUE)n_models(est, sample =TRUE)