You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- '1.3'# Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
19
+
- '1'# Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
Performances are roughly similar to the newer R function [`feols`](https://cran.r-project.org/web/packages/fixest/fixest.pdf) (note: use `tol = 1e-6, drop_singletons = false` to match the default options of `feols`). The main difference is that `FixedEffectModels` can also run the demeaning operation on a GPU (with `method = :gpu`).
14
+
Performances are roughly similar to the newer R function [`feols`](https://cran.r-project.org/web/packages/fixest/fixest.pdf). The main difference is that `FixedEffectModels` can also run the demeaning operation on a GPU (with `method = :gpu`).
- The option `save` can be set to one of the following: `none` (default) to save nothing `:residuals` to save residuals, `:fe` to save fixed effects. You can access the result with `residuals()` and `fe()`
73
79
74
-
-
80
+
- The option `save` can be set to one of the following: `none` (default) to save nothing `:residuals` to save residuals, `:fe` to save fixed effects. You can access the result with `residuals()` and `fe()`
75
81
76
82
- The option `method` can be set to one of the following: `:cpu`, `:gpu` (see Performances below).
77
83
@@ -93,10 +99,11 @@ You may use [RegressionTables.jl](https://github.com/jmboehm/RegressionTables.jl
93
99
94
100
## Performances
95
101
96
-
### MultiThreads
97
-
By default, `FixedEffectModels` uses as many threads as `Threads.nthreads()`. Use the option `nthreads` to select the number of threads to use in the estimation. Default to `Threads.nthreads()`.
98
102
103
+
### MultiThreads
104
+
`FixedEffectModels` is multi-threaded. Use the option `nthreads` to select the number of threads to use in the estimation (defaults to `Threads.nthreads()`). That being said, multithreading does not usually make a big difference.
99
105
106
+
### GPU
100
107
The package has support for GPUs (Nvidia) (thanks to Paul Schrimpf). This can make the package an order of magnitude faster for complicated problems.
101
108
102
109
To use GPU, run `using CUDA` before `using FixedEffectModels`. Then, estimate a model with `method = :gpu`. For maximum speed, set the floating point precision to `Float32` with `double_precision = false`.
Copy file name to clipboardExpand all lines: src/fit.jl
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Estimate a linear model with high dimensional categorical variables / instrument
13
13
* `method::Symbol`: A symbol for the method. Default is :cpu. Alternatively, :gpu requires `CuArrays`. In this case, use the option `double_precision = false` to use `Float32`.
14
14
* `nthreads::Integer` Number of threads to use in the estimation. If `method = :cpu`, defaults to `Threads.nthreads()`. If `method = :gpu`, defaults to 256.
15
15
* `double_precision::Bool`: Should the demeaning operation use Float64 rather than Float32? Default to true.
16
-
* `tol::Real` Tolerance. Default to 1e-8 if `double_precision = true`, 1e-6 otherwise.
16
+
* `tol::Real` Tolerance. Default to 1e-6.
17
17
* `maxiter::Integer = 10000`: Maximum number of iterations
18
18
* `drop_singletons::Bool = true`: Should singletons be dropped?
19
19
* `progress_bar::Bool = true`: Should the regression show a progressbar
0 commit comments