Predict method for the logistic function

Share:

Description

Predict method for the logistic function

Usage

1
2
3
## S3 method for class 'logistic'
predict(object, pred_data = "", pred_cmd = "",
  conf_lev = 0.95, se = FALSE, dec = 3, ...)

Arguments

object

Return value from logistic

pred_data

Provide the name of a dataframe to generate predictions (e.g., "titanic"). The dataset must contain all columns used in the estimation

pred_cmd

Generate predictions using a command. For example, 'pclass = levels(pclass)' would produce predictions for the different levels of factor 'pclass'. To add another variable use a ',' (e.g., 'pclass = levels(pclass), age = seq(0,100,20)')

conf_lev

Confidence level used to estimate confidence intervals (.95 is the default)

se

Logical that indicates if prediction standard errors should be calculated (default = FALSE)

dec

Number of decimals to show

...

further arguments passed to or from other methods

Details

See http://radiant-rstats.github.io/docs/model/logistic.html for an example in Radiant

See Also

logistic to generate the result

summary.logistic to summarize results

plot.logistic to plot results

plot.model.predict to plot prediction output

Examples

1
2
3
4
5
6
result <- logistic("titanic", "survived", c("pclass","sex"), lev = "Yes")
 predict(result, pred_cmd = "pclass = levels(pclass)")
logistic("titanic", "survived", c("pclass","sex"), lev = "Yes") %>%
  predict(pred_cmd = "sex = c('male','female')")
logistic("titanic", "survived", c("pclass","sex"), lev = "Yes") %>%
 predict(pred_data = "titanic")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.