ohdatamineDISC2

P suppose now we do not know the population variance

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ibution is multivariate normal the D2 follows a χ2 distribution. p Suppose now, we do not know the population variance-covariance, we estimate it by the pooled variance covariance matrix ∑g i=1 (ni − 1)Ci C= ∑ i (ni − 1) Then the Mahalanobis distance between the observation x and the group centroid i is: ¯ ¯ ¯ D2 (x, xi ) = (x − xi )′ C−1 (x − xi ) We can assign x to the group to which its Mahalanobis distance is the smallest. Thus, the smaller the Mahalanobis distance, the closer the case is to the group centroid and the more likely it is to be classed as belonging to that group. . . . . . . R function lda() lda(formula, data, ..., subset, na.action) ## Default S3 method: lda(x, grouping, prior = proportions, method, CV = FALSE, nu, ...) . . . . . . Example of Linear Discrimination diab=read.table('diabetes.txt',header=T,row.names=1) diab=diab[,-1] diab[1:20,] relwt glufast glutest steady insulin Group 1 0.81 80 356 124 55 3 3 0.94 105 319 143 105 3 5 1.00 90 323 240 143 3 7 0.91 100 350 221 119 3 9 0.99 97 379 142 98 3 11 0.90 91 353 221 53 3 13 0.96 78 290 136 142 3 15 0.74 86 312 208 68 3 17 1.10 90 364 152 76 3 pairs(diab[,1:5],pch = 21, bg = c(&quot;red&quot;, &quot;green3&quot;, &quot;blue&quot;)[dia . . . . . . . . . . . . 100 200 300 qq q q qq q q qq q qq q q qq qq q qqq q q q qqq q qq q q qq q q qqq q qq q q qq q q qq q q q q q q qqqq q qq q qq q qq q qq qqq q qq q q q q q qq q q q q qq qq qq q q qq q q q q q q qqq qq q q q q q q q q qq q qq q q q q q q qq 100 200 300 relwt q qq qq q q q qq q qq qq q q q q q q qq q q q q qq q q q qq qq qq q q q q q q qqqqqq q qq q q qq qq q qq q q qq q q q q q qq q qqq qq qqq q qq q qq qq qqqqqqqq qq qq qq qq qqqqqqqq q q q qq qqq q qq qq q 0 400 q q q q qq q q q q q qq q q q q qqq q q qq q qq q q q q qqqqq q qq q qq q q q q qqqq q qq qq q q q qq q q q qqq qqqqq qqqqq q qqq q qq q q q q qq qqqqq q qq q q q q qq qq q qqqq q q q q qqqq q...
View Full Document

Ask a homework question - tutors are online