coef.SPQR | R Documentation |
SPQR
Computes the estimated spline coefficients of a SPQR
class object
## S3 method for class 'SPQR' coef(object, X, ...)
object |
An object of class |
X |
The covariate vector/matrix for which the coefficient is calculated. |
... |
Other arguments. |
A NROW(X)
by K matrix containing values of the estimated coefficient, where K is the number of basis functions.
set.seed(919) n <- 200 X <- rbinom(n, 1, 0.5) Y <- rnorm(n, X, 0.8) control <- list(iter = 200, warmup = 150, thin = 1) fit <- SPQR(X = X, Y = Y, method = "MCMC", control = control, normalize = TRUE, verbose = FALSE) coef(fit, X = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.