predict_using_factors: Predict aggregate growth based on PCA decomposition

Description Usage Arguments Value

View source: R/pca_functions.R

Description

A function that predicts an annual aggregate growth rate by using a PCA decomposition of individual growth rates, using a given number of common factors (estimated elsewhere).

Usage

1
predict_using_factors(hatr, X, W, pca = prcomp(X))

Arguments

hatr

The number of common factors (estimated by some other means)

X

A matrix of data

W

A matrix of weights

pca

The PCA decomposition of X

Value

A tbl of predictions of aggregate growth by year, using the number of common factors given by hatr


tweed1e/idiosyncratics documentation built on May 29, 2019, 10:51 a.m.