Learn R Programming

radiant.model (version 0.8.0)

regress: Linear regression using OLS

Description

Linear regression using OLS

Usage

regress(dataset, rvar, evar, int = "", check = "", data_filter = "")

Arguments

dataset

Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant

rvar

The response variable in the regression

evar

Explanatory variables in the regression

int

Interaction terms to include in the model

check

Use "standardize" to see standardized coefficient estimates. Use "stepwise-backward" (or "stepwise-forward", or "stepwise-both") to apply step-wise selection of variables in estimation

data_filter

Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")

Value

A list of all variables variables used in the regress function as an object of class regress

Details

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

See Also

summary.regress to summarize results

plot.regress to plot results

predict.regress to generate predictions

Examples

Run this code
# NOT RUN {
result <- regress("diamonds", "price", c("carat","clarity"))
result <- regress("diamonds", "price", c("carat","clarity"), check = "standardize")

# }

Run the code above in your browser using DataLab