Description Usage Arguments Details Value See Also Examples
Predicted values based on slm
object.
1 2 3 |
object |
an object of class |
newdata |
an optional data frame in which to look for variables with which to predict.
|
interval |
type of interval calculation. It can be only |
level |
a number between 0 and 1, which indicates the tolerance/confidence level. |
... |
further arguments passed to or from other methods. |
This function produces predicted values, obtained by evaluating the regression function in the frame newdata
(which defaults to model.frame(object)
). If newdata
is omitted the predictions are based on the data used for the fit.
This function produces a vector of predictions or a matrix of predictions and bounds with column names fit
, lwr
,
and upr
if interval
is set.
1 2 3 4 5 6 7 8 9 10 11 | data("shan")
reg1 = slm(shan$PM_Xuhui ~ . , data = shan, method_cov_st = "fitAR", model_selec = -1)
predict(reg1)
data("co2")
y = as.vector(co2)
x = as.vector(time(co2)) - 1958
reg2 = slm(y ~ x + I(x^2) + I(x^3) + sin(2*pi*x) + cos(2*pi*x) + sin(4*pi*x) +
cos(4*pi*x) + sin(6*pi*x) + cos(6*pi*x) + sin(8*pi*x) + cos(8*pi*x),
method_cov_st = "fitAR", model_selec = -1)
predict(reg2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.