predict | R Documentation |
Predict values on 'mlm_stressor', 'reg_asym', or 'reg_sine' objects. This expands the predict function.
## S3 method for class 'mlm_stressor'
predict(object, newdata, train_data = NULL, ...)
## S3 method for class 'reg_asym'
predict(object, newdata, ...)
## S3 method for class 'reg_sine'
predict(object, newdata, ...)
object |
A 'mlm_stressor', 'reg_asym', or 'reg_sine' object. |
newdata |
A data.frame object that is the data to be predicted on. |
train_data |
A data.frame object defaulted to 'NULL'. This is only used when an 'mlm_stressor' object needs to be refitted. |
... |
Extending the predict function default. In this case, it is ignored. |
A data.frame of predictions if 'mlm_stressor' object or vector of predicted values.
# mlm_stressor example
lm_test <- data_gen_lm(20)
create_virtualenv()
mlm_lm <- mlm_regressor(Y ~ ., lm_test)
predict(mlm_lm, lm_test)
# Asymptotic Examples
asym_data <- data_gen_asym(10)
asym_fit <- reg_asym(Y ~ ., asym_data)
predict(asym_fit, asym_data)
# Sinusoidal Examples
sine_data <- data_gen_sine(10)
sine_fit <- reg_sine(Y ~ ., sine_data)
predict(sine_fit, sine_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.