coef.tbl_post: Coefficient extraction

View source: R/coefficient_extraction.R

coef.tbl_postR Documentation

Coefficient extraction

Description

summary table of fixed, random or group-level coefficients and fitted values (eta, only stanfit models) from posterior

Usage

## S3 method for class 'tbl_post'
coef(
  object,
  model = unique(object$model),
  type = c("fixef", "ranef"),
  mean.func = identity,
  estimate = median,
  interval = 0.95
)

## S3 method for class 'data.frame'
coef(df, ...)

## S3 method for class 'MCMCglmm'
coef(object, estimate = median, ...)

## S3 method for class 'brmsfit'
coef(object, estimate = median, ...)

## S3 method for class 'stanfit'
coef(object, estimate = median, ...)

## S3 method for class 'stanreg'
coef(object, estimate = median, ...)

fixef(object, estimate = median, ...)

## S3 method for class 'tbl_post'
fixef(object, estimate = median, ...)

## S3 method for class 'MCMCglmm'
fixef(object, estimate = median, ...)

## S3 method for class 'brmsfit'
fixef(object, estimate = median, ...)

## S3 method for class 'stanfit'
fixef(object, estimate = median, ...)

## S3 method for class 'stanreg'
fixef(object, estimate = median, ...)

ranef(object, estimate = median, ...)

## S3 method for class 'tbl_post'
ranef(object, estimate = median, ...)

## S3 method for class 'MCMCglmm'
ranef(object, estimate = median, ...)

## S3 method for class 'brmsfit'
ranef(object, estimate = median, ...)

## S3 method for class 'stanfit'
ranef(object, estimate = median, ...)

## S3 method for class 'stanreg'
ranef(object, estimate = median, ...)

grpef(object, estimate = median, ...)

## S3 method for class 'tbl_post'
grpef(object, estimate = median, ...)

## S3 method for class 'MCMCglmm'
grpef(object, estimate = median, ...)

## S3 method for class 'brmsfit'
grpef(object, estimate = median, ...)

## S3 method for class 'stanfit'
grpef(object, estimate = median, ...)

## S3 method for class 'stanreg'
grpef(object, estimate = median, ...)

## S3 method for class 'tbl_coef'
print(x, ...)

## S3 method for class 'tbl_coef'
knit_print(x, ...)

Arguments

object

tbl_post (brms, MCMCglmm) object holding the posterior in long format

model

model

type

type of coefficient: fixef (grpef, ranef)

mean.func

function (identity)

estimate

function for computing the center estimate (posterior mode)

interval

credibility interval: .95

...

ignored

Value

coefficient table with parameter name, estimate and interval

The standard center function is the posterior median

Author(s)

Martin Schmettow


schmettow/bayr documentation built on March 23, 2024, 7:49 p.m.