Get Started {#sec-start}

This chapter provides installation instructions and introduces the datasets used in the tutorial.

rm(list = ls())

Installation

To install fect from CRAN, run the code chunk below:

install.packages("fect")

We recommend users to install the most up-to-date version of fect from Github using:

devtools::install_github("xuyiqing/fect")

After installation, check fect version to make sure the package is up-to-date.

installed.packages()["fect", "Version"]

panelView for panel data visualization is highly recommended and will be used in the tutorial:

devtools::install_github('xuyiqing/panelView')

fect depends on the following packages, which should be installed automatically when fect is being installed. You can also install them manually.

install_all <- function(packages) {
  installed_pkgs <- installed.packages()[, "Package"]
  for (pkg in packages) {
    if (!pkg %in% installed_pkgs) {
      install.packages(pkg)
    }
  }
}
packages <- c("abind", "doParallel", "doRNG", "fixest", "foreach", "future", 
              "GGally", "ggplot2", "grid", "gridExtra", "Mass", 
              "panelView", "Rcpp")
install_all(packages)

Datasets

The fect package ships five datasets.

library(fect)
data(fect)
ls()

Below is a brief explanation of the datasets used in this book:



xuyiqing/fect documentation built on April 12, 2025, 9:50 p.m.