Closed nick-youngblut closed 1 year ago
Given that one would not use glm(family='binomial') for a continuous outcome, it would be helpful to include a code snippet as in:
glm(family='binomial')
xTest <- x[-trainIndex,] yTest <- z[-trainIndex] yHatLogit <- predict(partial, newdata = dfTest) + predict(model, xTest, logits=T) yHat <- yHatLogit > 0 # in case we need binary predictions e.g. to compute accuracy testAUC <- pROC::auc(pROC::roc(yTest, yHatLogit, quiet=T)) cat("Test AUC:", round(100 * testAUC), "%")
...but for continuous outcomes
Good idea, thanks. Have added in such a snippet, let me know if anything is unclear.
Given that one would not use
glm(family='binomial')
for a continuous outcome, it would be helpful to include a code snippet as in:...but for continuous outcomes