tw_apc: Tall-Wide Imputation of Missing Value in Panel Data

View source: R/tw_apc.R

tw_apcR Documentation

Tall-Wide Imputation of Missing Value in Panel Data

Description

tw_apc imputes the missing values in a given panel data using the method of "Tall-Wide".

Usage

tw_apc(X, kmax, center = FALSE, standardize = FALSE, re_estimate = TRUE)

Arguments

X

a matrix of size T by N with missing values.

kmax

integer, indicating the maximum number of factors.

center

logical, indicating whether or not X should be demeaned

standardize

logical, indicating whether or not X should be scaled.

re_estimate

logical, indicating whether or not output factors, 'Fhat', 'Lamhat', 'Dhat', and 'Chat', should be re-estimated from the imputed data.

Value

a list of elements:

Fhat

estimated F

Lamhat

estimated Lambda

Dhat

estimated D

Chat

euqals Fhat x Lamhat'

ehat

equals Xhat - Chat

data

X with missing data imputed

X

the original data with missing values

kmax

the maximum number of factors

center

logical, indicating whether or not X was demeaned in the algorithm

standardize

logical, indicating whether or not X was scaled in the algorithm

re_estimate

logical, indicating whether or not output factors, 'Fhat', 'Lamhat', 'Dhat', and 'Chat', were re-estimated from the imputed data

Author(s)

Yankang (Bennie) Chen <yankang.chen@yale.edu>

Serena Ng <serena.ng@columbia.edu>

Jushan Bai <jushan.bai@columbia.edu>

References

Jushan Bai and Serena Ng (2021), Matrix Completion, Counterfactuals, and Factor Analysis of Missing Data. https://www.tandfonline.com/doi/full/10.1080/01621459.2021.1967163


cykbennie/fbi documentation built on Jan. 24, 2025, 5:59 p.m.