This function is a helper for xvalidate that computes FEs using PPML First Order Conditions
(FOCs).
compute_fes(
y,
fes,
x,
b,
insample_obs = rep(1, n),
onlymus = FALSE,
tol = 1e-08,
verbose = FALSE
)If onlymus = TRUE, the vector of conditional means. Otherwise, a list with two
elements:
mu: conditional means.
fe_values: fixed effects.
Dependent variable (a vector).
List of fixed effects.
Regressor matrix.
A vector of coefficient estimates.
Vector of observations used to estimate the b coefficients..
Logical. If TRUE, returns only the conditional means.
A tolerance parameter.
Logical. If TRUE, prints messages to the console while evaluating.