Description Usage Arguments References Examples
Compute Latent Variable Scores
1 |
x |
data frame or matrix of predictor variables |
y |
data frame or matrix of response variables |
type |
type of reduced-rank regression model to fit. |
rank |
rank of coefficient matrix. |
k |
small constant added to diagonal of covariance matrices to make inversion easier. |
Izenman, A.J. (2008) Modern Multivariate Statistical Techniques. Springer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(pendigits)
digits_features <- pendigits[, -35:-36]
scores(digits_features, digits_features, type = "pca", rank = 3)
library(dplyr)
data(COMBO17)
galaxy <- as_data_frame(COMBO17)
galaxy <- select(galaxy, -starts_with("e."), -Nr, -UFS:-IFD)
galaxy <- na.omit(galaxy)
galaxy_x <- select(galaxy, -Rmag:-chi2red)
galaxy_y <- select(galaxy, Rmag:chi2red)
scores(galaxy_x, galaxy_y, type = "cva", rank = 4)
data(iris)
iris_x <- iris[,1:4]
iris_y <- iris[5]
scores(iris_x, iris_y, type = "lda")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.