Description Usage Arguments Value See Also Examples
A method that prints out the fitted values of the ridge regression model, possibly for new data.
1 2 | ## S3 method for class 'ridgeregr'
predict(x, x_values = "default")
|
x |
A ridgeregr object. |
x_values |
Optional. If included, the predictions are made on these x_values instead. |
a numeric vector of fitted values.
predict. The generic function from which predict.ridgeregr is created.
1 2 3 4 | a <- ridgeregr(Petal.Length~Sepal.Width+Sepal.Length, data=iris, lambda=10)
predict(a) # The fitted values
df <- data.frame(Petal.Length=runif(n = 150, min = -1.5, max = 1.5), x2=runif(n = 150, min = -2, max = 2.5),x3 = runif(n = 150, min = -1.5, max = 1.5) )
predict(x=a, x_values = df) # Predicted on the new x-values in the df data.frame.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.