R predict()

1 개요[ | ]

R predict()
  • "Model Predictions"
df <- data.frame(
  Hours = c(0.50,0.75,1.00,1.25,1.50,1.75,1.75,2.00,2.25,2.50,2.75,3.00,3.25,3.50,4.00,4.25,4.50,4.75,5.00,5.50),
  Pass = c(0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1)
)
model <- glm(Pass ~ ., data=df, family=binomial)
summary(model)
predict(model, data.frame(Hours=0))
##         1 
## -4.077713
predict(model, data.frame(Hours=1))
##         1 
## -2.573068
predict(model, data.frame(Hours=2))
##         1 
## -1.068423
predict(model, data.frame(Hours=3))
##         1 
## 0.4362229

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}