Description Usage Arguments Author(s) Examples
Used internally to extract the parameters from a kfunclme object.
1 | getpars(mod, lin.comb.Ct)
|
mod |
Model to get parameters from |
lin.comb.Ct |
Linear combination to be used for predictions |
Robert Bagchi Maintainer: Robert Bagchi <robert.bagchi@uconn.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (mod, lin.comb.Ct)
{
if (!is.null(mod)) {
beta.r <- fixef(mod)
vcov.r <- vcov(mod)
est.Kmean.r <- as.vector(lin.comb.Ct %*% fixef(mod))
est.Kse.r <- sqrt(diag(lin.comb.Ct %*% vcov(mod) %*%
t(lin.comb.Ct)))
}
else {
beta.r <- rep(NA, ncol(lin.comb.Ct))
vcov.r <- matrix(NA, ncol = length(beta.r), nrow = length(beta.r))
est.Kmean.r <- rep(NA, nrow(lin.comb.Ct))
est.Kse.r <- rep(NA, nrow(lin.comb.Ct))
}
return(list(pred.r = est.Kmean.r, se.pred.r = est.Kse.r,
beta.r = beta.r, vcov.r = vcov.r))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.