coef.tandem {TANDEM} | R Documentation |
Returns the regression coefficients from a TANDEM fit
Description
Returns the regression coefficients from a TANDEM fit.
Usage
## S3 method for class 'tandem'
coef(object, ...)
Arguments
object |
A tandem-object, as returned by tandem() |
... |
Not used. Other arguments for coef(). |
Value
The regression coefficients.
Examples
# unpack example data
x = example_data$x
y = example_data$y
upstream = example_data$upstream
# fit a tandem model, determine the coefficients and create a prediction
fit = tandem(x, y, upstream, alpha=0.5)
beta = coef(fit)
y_hat = predict(fit, newx=x)
[Package TANDEM version 1.0.3 Index]