powered by
Computes the PCA weights for a single country
pca_weights_one_country(Yields, Economy)
A matrix (J x J) that corresponds to the eigenvectors of the variance-covariance matrix of yields
A matrix of bond yields (J x T) for a single country, where J is the number of maturities and T is the time series length.
A character string indicating the name of the economy.
data(CM_Yields) Economy <- "Mexico" pca_weights <- pca_weights_one_country(Yields, Economy)
Run the code above in your browser using DataLab