predict {stressor} | R Documentation |
Prediction Methods for Various Models
Description
Predict values on 'mlm_stressor', 'reg_asym', or 'reg_sine' objects. This expands the predict function.
Usage
## 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, ...)
Arguments
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. |
Value
A data.frame of predictions if 'mlm_stressor' object or vector of predicted values.
Examples
# 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)
[Package stressor version 0.2.0 Index]