nauf
models.When nauf_pmmeans
is used with Bayesian regressions, the
elements of the resulting nauf.pmm.list
have class
nauf.pmm.stan
.
# S3 method for nauf.pmm.stan
summary(object, probs = c(0.025, 0.975),
type = c("link", "response"), ...)# S3 method for summ.nauf.pmm.stan
print(x, row.names = FALSE, mcse = FALSE,
rhat = NULL, ...)
# S3 method for nauf.pmm.stan
as.array(x, ...)
# S3 method for nauf.pmm.stan
as.matrix(x, ...)
# S3 method for nauf.pmm.stan
print(x, ...)
# S3 method for nauf.pmm.stan
as.data.frame(x, row.names = NULL, optional = FALSE,
...)
# S3 method for summ.nauf.pmm.stan
as.data.frame(x, row.names = NULL,
optional = FALSE, ...)
A nauf.pmm.stan
object.
A vector of quantiles to calculate for the estimates. The default is a 95 The median (0.5) is always added regardless of whether it is specified.
If "link"
(the default), then the estimates are not
transformed prior to summary; if "response"
, then the inverse link
function in the object's family
element is applied to the
samples
element prior to summary.
See the Methods
section.
Either a nauf.pmm.stan
object, or the summ.nauf.pmm.stan
object returned by calling summary
on a nauf.pmm.stan
object.
Changes from the defaults are ignored.
A logical indicating whether the Monte Carlo standard errors
should be printed (default FALSE
since the column is always recoverable
by dividing the SD
column by the square root of the ESS
column).
An optional logical indicating whether or not to print the
Gelman-Rubin R-hat statistic. If rhat = NULL
(the default), then
the Rhat
column of the summary is only printed if any of the
statistics are greater that 1.1
. Regardless of the value of the
rhat
argument, a warning is issued if any of the statistics are
greater than 1.1
.
The returned object depends on the function. See the 'Methods' section.
Returns a data frame with class
summ.nauf.pmm.stan
, with means, standard deviations, medians, mean
absolute differences, the posterior probability that the estimate is
greater than zero, quantiles specified in probs
, the effective
sample size, Monte Carlo standard error, and Gelman-Rubin R-hat statistic.
Additional arguments in ...
are ignored. Quantiles, effective
samples size, and Monte Carlo standard error, and R-hat statistics are
computed using monitor
.
For summ.nauf.pmm.stan
objects, the data frame is
printed, omitting the Monte Carlo standard error and
R-hat statistic based on mcse
and rhat
. If the inverse
link function was used, then a message indicating the response type
is also printed. Additional arguments in ...
are passed to
print.data.frame
. For nauf.pmm.stan
objects,
first summary
is called, passing along ...
,
and then print is called on the resulting summ.nauf.pmm.stan
, also
passing along ...
arguments.
For summ.nauf.pmm.stan
objects, removes the
data.frame
contained in a summ.nauf.pmm.stan
. Additional
arguments in ...
are ignored. For nauf.pmm.stan
objects,
first summary
is called, passing along ...
, and then
as.data.frame
is called on the resulting summ.nauf.pmm.stan
object, ignoring ...
arugments.
Returns the samples
element of a
nauf.pmm.stan
object. Additional arguments in ...
are
ignored.
Returns the samples
element of a
namf.pmm.stan
object, flattening the array into a matrix such that
the rows represent iterations ordered by chain and the columns represent
parameters.
The nauf.pmm.stan
object is a list with the following elements.
A data frame with the levels of each factor (or 'inc_1' for
covariates), with one row for each element in the third dimension of
samples
.
The fixed effects model matrix showing the contrasts
applied to the regression coefficients (rows correspond to the
names
element).
An array with three dimensions. The first corresponds to
iterations, the second to chains, and the third to parameters (the same
structure returned by as.array.stanfit
).
The regression family.
The label of the inverse link (e.g. probability, rate, etc.).
A list with additional information based on the type of model.