sphereX: Sphere Data Matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/sphereX.R

Description

The data matrix is scaled and sphered so it is orthonormal. The Cholesky decomposition is used.

Usage

1

Arguments

X

X rectangular data matrix

Value

sphered matrix

Author(s)

A. I. McLeod

See Also

scale, NNPredict

Examples

1
2
3
data(longley)
longley.x <- data.matrix(longley[, 1:6])
sphereX(longley.x)

Example output

Loading required package: leaps
     GNP.deflator         GNP   Unemployed Armed.Forces Population        Year
1947  -1.73109925  1.33749899  0.376715415  -0.43952360  0.5556448  0.03330382
1948  -1.22144139 -0.61320972 -0.287394127  -2.10328462  1.0680594 -0.14858251
1949  -1.24924091 -0.50687669  1.609804282   0.13081548  0.2191625  0.13956770
1950  -1.12877633  0.63366202  1.185478297  -0.08927135 -1.2461612  0.06330403
1951  -0.50792039 -0.67344479 -1.172585131   0.24242957 -0.5057739 -2.42778092
1952  -0.33185676 -0.62125700 -1.536331075   0.89644902  0.1470533 -0.96148669
1953  -0.24845821  0.16902242 -1.600500701   0.80543630  1.3417251  1.15525613
1954  -0.15579314 -0.71762081  0.572938086   2.23116631  0.4990846  0.73324255
1955  -0.04459506  1.10117892 -0.239991928   0.99829987 -1.8950956  0.24307555
1956   0.27046616  0.37504834 -0.683768576  -0.22375085 -1.0008922  1.51278746
1957   0.62259341 -0.48907652 -0.903191272  -0.98069634  0.1126148  1.42958153
1958   0.84498956 -2.05482515  1.142656553   0.18880280  0.1548643  0.08806118
1959   1.01178668 -0.36652560  0.004639375  -0.92834161 -1.5012455 -0.63521260
1960   1.16005078  0.04424532  0.094013053  -0.96518801 -0.2493174  0.37137050
1961   1.29904838  0.18980750  1.200883966   0.15844617  1.0247545 -0.64393582
1962   1.41024646  2.19237277  0.236633783   0.07821084  1.2755226 -0.95255191

bestglm documentation built on March 26, 2020, 7:25 p.m.