Learn R Programming

radiant.model (version 0.8.0)

predict.regress: Predict method for the regress function

Description

Predict method for the regress function

Usage

# S3 method for regress
predict(object, pred_data = "", pred_cmd = "",
  conf_lev = 0.95, se = TRUE, dec = 3, ...)

Arguments

object

Return value from regress

pred_data

Name of the dataset to use for prediction

pred_cmd

Command used to generate data for prediction

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 https://radiant-rstats.github.io/docs/model/regress.html for an example in Radiant

See Also

regress to generate the result

summary.regress to summarize results

plot.regress to plot results

Examples

Run this code
# NOT RUN {
result <- regress("diamonds", "price", c("carat","clarity"))
predict(result, pred_cmd = "carat = 1:10")
predict(result, pred_cmd = "clarity = levels(clarity)")
result <- regress("diamonds", "price", c("carat","clarity"), int = c("carat:clarity"))
dpred <<- getdata("diamonds") %>% slice(1:10)
predict(result, pred_data = "dpred")
rm(dpred, envir = .GlobalEnv)

# }

Run the code above in your browser using DataLab