How can I use R to compute a pooled sample covariance matrix and it's inverse? I am using the Bumpus Sparrows data set.
To compute the pooled sample covariance matrix in R following steps are required to be done:
i) Install the package "Morpho" using the install.packages("Morpho") command
ii) Include the library of Morpho package in R using library("Morpho")
iii) use the command covW(data,group) to get the pooled sample covariance matrix where data is the required data file and group is the grouping variables. Let us name this matrix as P.
To find the inverse of the matrix only 1 command is required and it is solve(P)
so covW(P) gives you the required pooled sample covariance matrix and using solve command on that gives you the inverse.
Hope this helps.
Get Answers For Free
Most questions answered within 1 hours.