Skip to content

Commit a25b563

Browse files
committed
readme
1 parent 82c1fe6 commit a25b563

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ To estimate an interactive fixed effect model, one needs to specify a formula, a
1919
```julia
2020
using DataFrames, RDatasets, InteractiveFixedEffectModels
2121
df = dataset("plm", "Cigar")
22-
df[:pState] = pool(df[:State])
23-
df[:pYear] = pool(df[:Year])
22+
df[:pState] = categorical(df[:State])
23+
df[:pYear] = categorical(df[:Year])
2424
regife(df, @model(Sales ~ Price, ife = (pState + pYear, 2), fe = pState, save = true))
2525
# Linear Factor Model
2626
#================================================================
@@ -52,8 +52,8 @@ regife(df, @model(Sales ~ Price, ife = (pState + pYear, 2), fe = pState, save =
5252
- Interactive fixed effects are indicated with the keyword argument `ife`. Variables must be of type `PooledDataVector`. For instance, for a factor model with id variable `State`, time variable `Year`, and rank `r` equal to 2:
5353
5454
```julia
55-
df[:pState] = pool(df[:State])
56-
df[:pYear] = pool(df[:Year])
55+
df[:pState] = categorical(df[:State])
56+
df[:pYear] = categorical(df[:Year])
5757
ife = (pState + pYear, 2)
5858
```
5959
@@ -98,8 +98,8 @@ Yes. Factor models are a particular case of interactive fixed effect models. Sim
9898
```julia
9999
using DataFrames, RDatasets, InteractiveFixedEffectModels
100100
df = dataset("plm", "Cigar")
101-
df[:pState] = pool(df[:State])
102-
df[:pYear] = pool(df[:Year])
101+
df[:pState] = categorical(df[:State])
102+
df[:pYear] = categorical(df[:Year])
103103
regife(df, @model(Sales ~ 0, ife = (pState + pYear, 2), fe = pState, save = true))
104104
```
105105
Compared to the usual SVD method, the package estimates models with multiple (or missing) observations per id x time.

0 commit comments

Comments
 (0)