From ed1ba6b4f5fef99588b6fbee79bf8d18ba606aa8 Mon Sep 17 00:00:00 2001 From: lrberge Date: Wed, 14 Feb 2024 18:25:02 +0100 Subject: [PATCH] add fixef.algo in demean doc --- R/miscfuns.R | 3 ++- docs/reference/demean.html | 10 ++++++++++ man/demean.Rd | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/R/miscfuns.R b/R/miscfuns.R index 5337481c..68f53d13 100644 --- a/R/miscfuns.R +++ b/R/miscfuns.R @@ -2148,7 +2148,8 @@ xpd = function(fml, ..., add = NULL, lhs, rhs, data = NULL, frame = parent.frame #' Centers a set of variables around a set of factors #' #' User-level access to internal demeaning algorithm of `fixest`. -#' +#' +#' @inheritParams feols #' @inheritSection feols Varying slopes #' #' @param X A matrix, vector, data.frame or a list OR a formula OR a [`feols`] estimation. If equal diff --git a/docs/reference/demean.html b/docs/reference/demean.html index a43ba199..7ab5cd94 100644 --- a/docs/reference/demean.html +++ b/docs/reference/demean.html @@ -151,6 +151,16 @@

Argumentsdemeaning_algo. If NULL, it falls to the defaults of demeaning_algo. +This arguments controls the settings of the demeaning algorithm. +Only play with it if the convergence is slow, i.e. look at the slot $iterations, and if any is +over 50, it may be worth playing around with it. Please read the documentation of the +function demeaning_algo. Be aware that there is no clear guidance on how to change the +settings, it's more a matter of try-and-see.

+ +
na.rm

Logical, default is TRUE. If TRUE and the input data contains any NA value, then any observation with NA will be discarded leading to an output with less observations than diff --git a/man/demean.Rd b/man/demean.Rd index 5d8ce43b..39d7df11 100644 --- a/man/demean.Rd +++ b/man/demean.Rd @@ -68,6 +68,14 @@ frequencies before feeding them into the algorithm. If \code{FALSE}, the origina provided by the user is maintained. In general, reordering leads to faster and more precise performance.} +\item{fixef.algo}{\code{NULL} (default) or an object of class \code{demeaning_algo} obtained with +the function \code{\link{demeaning_algo}}. If \code{NULL}, it falls to the defaults of \code{\link{demeaning_algo}}. +This arguments controls the settings of the demeaning algorithm. +Only play with it if the convergence is slow, i.e. look at the slot \verb{$iterations}, and if any is +over 50, it may be worth playing around with it. Please read the documentation of the +function \code{\link{demeaning_algo}}. Be aware that there is no clear guidance on how to change the +settings, it's more a matter of try-and-see.} + \item{na.rm}{Logical, default is \code{TRUE}. If \code{TRUE} and the input data contains any NA value, then any observation with NA will be discarded leading to an output with less observations than the input. If \code{FALSE}, if NAs are present the output will also be filled with NAs for each NA