coef,oscar-method | R Documentation |
Extract coefficients of oscar-objects
Prediction based on oscar-objects
Plot oscar-coefficients as a function of k and override default plot generic
## S4 method for signature 'oscar'
coef(object, k)
## S4 method for signature 'oscar'
predict(
object,
k,
type = c("response", "link", "nonzero", "coefficients", "label"),
newdata = object@x
)
## S4 method for signature 'oscar'
plot(x, y, k = 1:x@kmax, add = FALSE, intercept = FALSE, ...)
object |
Fit oscar S4-object |
k |
Vector of cardinality 'k' values |
type |
Type of prediction; valid values are 'response', 'link', 'nonzero', 'coefficients', or 'label' |
newdata |
Data to predict on; if no alternate is supplied, the function uses the original 'x' data matrix used to fit object |
x |
Values on x-axis |
y |
Values on y-axis |
add |
Should the plot be added on top of an existing plot (if FALSE, create a new graphics device), Default: FALSE |
intercept |
Should model intercept be plotted, Default: FALSE |
... |
Additional parameters passed on to the points-function drawing lines as a function of cardinality |
Vector of model coefficient values at given cardinality 'k'
A vector of coefficient predictions at the specificied cardinality 'k' with a format depending on the supplied 'type' parameter
Override default plot function with no return but instead tailor suitable graphics plotting
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.