-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add support for WLS * speed up testing * small documentation updates
- Loading branch information
Showing
52 changed files
with
702 additions
and
10,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# demean.demean { #pyfixest.demean.demean } | ||
|
||
`demean.demean(x, flist, weights, tol=1e-08, maxiter=100000)` | ||
|
||
Workhorse for demeaning an input array `x` based on the specified fixed effects and weights | ||
via the alternating projections algorithm. | ||
|
||
## Parameters | ||
|
||
| Name | Type | Description | Default | | ||
|-----------|---------------------|----------------------------------------------------------------------------------------------------------------|------------| | ||
| `x` | numpy.numpy.ndarray | Input array of shape (n_samples, n_features). Needs to be of type float. | _required_ | | ||
| `flist` | numpy.numpy.ndarray | Array of shape (n_samples, n_factors) specifying the fixed effects. Needs to already be converted to integers. | _required_ | | ||
| `weights` | numpy.numpy.ndarray | Array of shape (n_samples,) specifying the weights. | _required_ | | ||
| `tol` | float | Tolerance criterion for convergence. Defaults to 1e-08. | `1e-08` | | ||
| `maxiter` | int | Maximum number of iterations. Defaults to 100_000. | `100000` | | ||
|
||
## Returns | ||
|
||
| Type | Description | | ||
|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | ||
| typing.Tuple\[numpy.numpy.ndarray, bool\] | A tuple containing the demeaned array of shape (n_samples, n_features) and a boolean indicating whether the algorithm converged successfully. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.