top of page

x <- read.csv("数量化2類.csv")
x

attach(x)

#青木 ダミー変数版と一致: x1 x2 をfactor()
install.packages(MASS)
library(MASS)

fx1=factor(x1)
fx2=factor(x2)
fy=factor(group)


s3 <- lda(fy~fx1+fx2,data=x)
print(s3)

table(x[,4],predict(s3)$class)
 
print(predict(s3))

plot(predict(s3)$x,col=x$group)

plot(fy,predict(s3)$x)

plot(s3,dimen=1)

© 2018-2024 HIDEYUKI UNUMA

All visitors since 14 Apr. 2018

  • Twitter
  • Instagram
  • Facebook
bottom of page