If you multiply the data for a certain group by the scaling matrix for that
group, the variance matrix will be the identity. E.g.,
> z <- qda(iris[-5], grouping=iris$Species)
> zapsmall(var( as.matrix(subset(iris, Species=="virginica", 1:4)) %*%
z$scaling[,,"virginica"] ))
1 2 3 4
1 1 0 0 0
2 0
I guess the question that is being asked here is what is the scaling matrix
that is being returned in the qda object. The help file on qda() says:
...
scaling: for each group ‘i’, ‘scaling[,,i]’ is an array which transforms
observations so that within-groups covariance matrix is spherical.
...
T
You need to learn how to access code for nonexported methods. See ? "::"
> methods(qda)
[1] qda.data.frame* qda.default*qda.formula*qda.matrix*
see '?methods' for accessing help and source code
Shows you that the methods are not exported from the namespace. Hence
you need to use the trip
Hello,
I am Souradeep Chattopadhyay and I am a graduate student at Iowa
State University Department of Statistics.
Can anyone please explain the mathematical formulation behind the scaling
matrix returned by the qda function in MASS package. I want to understand
how this scaling matrix
4 matches
Mail list logo