Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m1=cov.wt(Craneos1)$center
- m1=data.matrix(m1)
- m2=cov.wt(Craneos2)$center
- m2=data.matrix(m2)
- D=((nrow(Craneos1)-1)*var(Craneos1)+(nrow(Craneos2)-1)*var(Craneos2))/30
- d=solve(D)%*%(m1-m2)
- d # Estos son los coeficientes de la función
- 0.5*t(m1+m2)%*%d # Este es el punto crítico
- > d # Coefficients of the discriminant analysis
- [,1]
- x1 -0.089306662
- x2 0.155774683
- x3 0.005231617
- x4 -0.177194601
- x5 -0.177408670
- > 0.5*t(m1+m2)%*%d # Este es el punto crítico
- [,1]
- [1,] -30.46349
- lda(group~.,data=Datos)
- > lda(group~.,data=Datos)
- Call:
- lda(group ~ ., data = Datos)
- Prior probabilities of groups:
- CRANEOS1 CRANEOS2
- 0.53125 0.46875
- Group means:
- X1 X2 X3 X4 X5
- CRANEOS1 174.8235 139.3529 132.0000 69.82353 130.3529
- CRANEOS2 185.7333 138.7333 134.7667 76.46667 137.5000
- Coefficients of linear discriminants:
- LD1
- X1 0.047726591
- X2 -0.083247929
- X3 -0.002795841
- X4 0.094695000
- X5 0.094809401
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement