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
A typical formula is composed of one dependent variable and a set of regressors.
33
30
34
-
Interactive fixed effects are indicated with the function `ife`. For instance, to specify a factor model with id variable `State`, time variable `Year`, and rank 2, use `ife(State, Year, 2)`.
31
+
Interactive fixed effects are indicated with the function `ife`. For instance, to specify a factor model with id variable `State`, time variable `Year`, and rank 2, use `ife(State, Year, 2)`.
35
32
36
-
High-dimensional Fixed effects can be used, as in `fe(State)` but only for the variables specified in the factor model. See [FixedEffectModels.jl](https://github.com/matthieugomez/FixedEffectModels.jl) for more information
33
+
High-dimensional Fixed effects can be used, as in `fe(State)` but only for the variables specified in the factor model. See [FixedEffectModels.jl](https://github.com/matthieugomez/FixedEffectModels.jl) for more information
37
34
38
-
```julia
39
-
regife(df, @formula(Sales ~ Price + Year + ife(State, Year, 2)))
@@ -47,7 +49,7 @@ A typical formula is composed of one dependent variable and a set of regressors
47
49
vcov.robust()
48
50
vcov.cluster(:State)
49
51
vcov.cluster(:State, :Year)
50
-
```
52
+
```
51
53
- The option `weights` can add weights
52
54
```julia
53
55
weights = :Pop
@@ -64,22 +66,16 @@ A typical formula is composed of one dependent variable and a set of regressors
64
66
- The option `save = true` saves a new dataframe storing residuals, factors, loadings and the eventual fixed effects. Importantly, the returned dataframe is aligned with the initial dataframe (rows not used in the estimation are simply filled with `missing`s).
65
67
66
68
67
-
## Construct Model Programatically
68
-
You can use
69
-
```julia
70
-
using StatsModels, DataFrames, RDatasets, InteractiveFixedEffectModels
The algorithm can estimate models with missing observations per id x time, multiple observations per id x time, and weights.
79
75
80
76
However, in these cases, the optimization problem may have local minima. The algorithm tries to catch these cases, and, if need be, restart the optimization until the global minimum is reached. However I am not sure that all the cases are caught.
81
77
82
-
## FAQ
78
+
83
79
#### Does the package estimate PCA / factor models?
84
80
85
81
Yes. Factor models are a particular case of interactive fixed effect models.
0 commit comments