predict.regress {radiant.model} | R Documentation |
Predict method for the regress function
Description
Predict method for the regress function
Usage
## S3 method for class 'regress'
predict(
object,
pred_data = NULL,
pred_cmd = "",
conf_lev = 0.95,
se = TRUE,
interval = "confidence",
dec = 3,
envir = parent.frame(),
...
)
Arguments
object |
Return value from |
pred_data |
Provide the dataframe to generate predictions (e.g., diamonds). The dataset must contain all columns used in the estimation |
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) |
interval |
Type of interval calculation ("confidence" or "prediction"). Set to "none" if se is FALSE |
dec |
Number of decimals to show |
envir |
Environment to extract data from |
... |
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
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 = "carat:clarity")
predict(result, pred_data = diamonds) %>% head()