Add RegressionTransform to a vega-lite spec.
vl_regression( spec, regression = NULL, on = NULL, as = NULL, extent = NULL, groupby = NULL, method = NULL, order = NULL, params = NULL, .object = NULL )
An input vega-lite spec
The data field of the dependent variable to predict.
The data field of the independent variable to use a predictor.
The output field names for the smoothed points generated by the regression transform.
Default value: The field names of the input x and y values.
A [min, max] domain over the independent (x) field for the starting and ending points of the generated trend line.
The data fields to group by. If not specified, a single group containing all data objects will be used.
The functional form of the regression model. One of
The polynomial order (number of coefficients) for the 'poly' method.
A boolean flag indicating if the transform should return the regression model parameters (one object per group), rather than trend line points. The resulting objects include a
coefarray of fitted coefficient values (starting with the intercept term and then including terms of increasing order) and an
rSquaredvalue (indicating the total variance explained by the model).
Directly input an object, rather than creating one via the other arguments. Should not be used in conjunction with the other arguments other than
spec. Objects can be of type: RegressionTransform