predict.regress: Predict method for the regress function

Description Usage Arguments Details See Also Examples

View source: R/regress.R

Description

Predict method for the regress function

Usage

1
2
3
4
## S3 method for class 'regress'
predict(object, pred_data = NULL, pred_cmd = "",
  conf_lev = 0.95, se = TRUE, interval = "confidence", dec = 3,
  ...)

Arguments

object

Return value from regress

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

...

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

1
2
3
4
5
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()

radiant-rstats/radiant.model documentation built on Nov. 13, 2018, 7 a.m.