summary.bfi {BFI} | R Documentation |
Summarizing BFI Fits
Description
Summary method for an object with class 'bfi' created by the MAP.estimation
and bfi
functions.
Usage
## S3 method for class 'bfi'
summary(object,
cur_mat = FALSE,
digits = max(3, getOption("digits") - 3),
...)
Arguments
object |
fitted |
cur_mat |
logical; if |
digits |
significant digits in printout. |
... |
additional arguments affecting the summary produced. |
Details
summary.bfi()
gives information about the MAP estimates of parameters of the model. It can be used for the bfi
objects built by the MAP.estimation
and bfi
functions.
The output of the summary method shows the details of the model, i.e. formula, family and link function used to specify the generalized linear model, followed by information about the estimates, standard deviations and credible intervals. Information about the log-likelihood posterior and convergence status are also provided.
By default, summary.bfi
function does not return (minus) the curvature matrix, but the user can use cur_mat = TRUE
to print it.
Value
summary.bfi
returns an object of class summary.bfi
, a list with the following components:
theta_hat |
the component from |
A_hat |
the component from |
sd |
the component from |
Lambda |
the component from |
formula |
the component from |
n |
the component from |
np |
the component from |
family |
the component from |
intercept |
the component from |
convergence |
the component from |
control |
the component from |
stratified |
the component from |
estimate |
the estimated regression coefficients, i.e., without the estimate |
logLikPost |
the value of the log-likelihood posterior density evaluated at estimates ( |
link |
the link function only for GLMs, not for the survival family. By default the |
dispersion |
the estimated variance of the random error, i.e., |
CI |
a 95 |
Author(s)
Hassan Pazira
Maintainer: Hassan Pazira hassan.pazira@radboudumc.nl
See Also
MAP.estimation
and bfi
Examples
#-------------
# y ~ Gaussian
#-------------
# model assumption:
theta <- c(1, 2, 3, 4, 1.5) # coefficients and sigma2 = 1.5
#----------------
# Data Simulation
#----------------
n <- 40
X <- data.frame(x1=rnorm(n), # continuous variable
x2=sample(1:3, n, replace=TRUE)) # categorical variable
Xx2_1 <- ifelse(X$x2 == '2', 1, 0)
Xx2_2 <- ifelse(X$x2 == '3', 1, 0)
X$x2 <- as.factor(X$x2)
eta <- theta[1] + theta[2] * X$x1 + theta[3] * Xx2_1 + theta[4] * Xx2_2
mu <- gaussian()$linkinv(eta)
y <- rnorm(n, mu, sd = sqrt(theta[5]))
#----------------
# MAP estimations
#----------------
Lambda <- inv.prior.cov(X, lambda = c(0.1, 0.5), family = "gaussian")
fit <- MAP.estimation(y, X, family = "gaussian", Lambda)
class(fit)
#-------------------------
# Summary of MAP estimates
#-------------------------
summary(fit)
sumfit <- summary(fit, cur_mat = TRUE)
sumfit$estimate
sumfit$logLikPost
sumfit$dispersion
sumfit$CI
class(sumfit)