Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. IQ = c(rep(1,497),rep(2,651))
  2. Y = Y[,1:2]
  3. lda.IQ = lda(Y,IQ); lda.IQ
  4. lda.pred = predict(lda.IQ)
  5. attributes(lda.pred)
  6. lda.pred$class
  7. head(lda.pred$posterior)
  8. table(lda.pred$posterior[,1]>lda.pred$posterior[,2],lda.pred$class)
  9. table(IQ,lda.pred$class) #40 chilren misclaasified
  10. partimat(IQ~Y[,1]+Y[,2],method='lda',imageplot=FALSE)
  11.  
  12. Error in partimat.default(x, grouping, ...) :
  13. at least two classes required
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement