Description Usage Arguments Details Value Author(s) References See Also Examples

Estimating interactive fixed effect models.

1 2 |

`formula` |
an object of class "formula": a symbolic description of the model to be fitted. |

`data` |
a data frame (must be with a dichotomous treatment but balanced is not required). |

`Y` |
outcome. |

`X` |
time-varying covariates. |

`index` |
a two-element string vector specifying the unit (group) and time indicators. Must be of length 2. |

`r` |
an integer specifying the number of factors. |

`force` |
a string indicating whether unit or time fixed effects will be imposed. Must be one of the following, "none", "unit", "time", or "two-way". The default is "unit". |

`se` |
a logical flag indicating whether uncertainty estimates will be produced via bootstrapping. |

`nboots` |
an integer specifying the number of bootstrap
runs. Ignored if |

`seed` |
an integer that sets the seed in random number
generation. Ignored if |

`normalize` |
a logic flag indicating whether to scale outcome and
covariates. Useful for accelerating computing speed when magnitude of data is large.The default is |

`interFE`

estimates interactive fixed effect models proposed by
Bai (2009).

`beta` |
estimated coefficients. |

`mu` |
estimated grand mean. |

`factor` |
estimated factors. |

`lambda` |
estimated factor loadings. |

`VNT` |
a diagonal matrix that consists of the r eigenvalues. |

`niter` |
the number of iteration before convergence. |

`alpha` |
estimated unit fixed effect (if |

`xi` |
estimated time fixed effect (if |

`residuals` |
residuals of the estimated interactive fixed effect model. |

`sigma2` |
mean squared error of the residuals. |

`IC` |
the information criterion. |

`ValidX` |
a logical flag specifying whether there are valid covariates. |

`dat.Y` |
a matrix storing data of the outcome variable. |

`dat.X` |
an array storing data of the independent variables. |

`Y` |
name of the outcome variable. |

`X` |
name of the time-varying control variables. |

`index` |
name of the unit and time indicators. |

`est.table` |
a table of the estimation results. |

`est.boot` |
a matrix storing results from bootstraps. |

Yiqing Xu <yiqingxu@ucsd.edu>

Licheng Liu <liulch.16@sem.tsinghua.edu.cn>

Jushan Bai. 2009. "Panel Data Models with Interactive Fixed Effects." Econometrica 77:1229–1279.

`print.interFE`

and `gsynth`

1 2 3 4 5 |

```
Bootstraping
Call:
interFE.formula(formula = Y ~ X1 + X2, data = d, index = c("id",
"time"), r = 2, force = "two-way", nboots = 50)
Estimated Coefficients:
Coef S.E. CI.lower CI.upper p.value
X1 1.021 0.02806 0.9685 1.082 0
X2 3.052 0.03918 2.9788 3.130 0
_const 5.005 0.14020 4.7962 5.260 0
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.