residuals.bmixlm: Residuals for a 'bmixlm' Object

Description Usage Arguments Details Value

Description

Calculate the residuals from the two component models, and the probabilities of membership of the second component.

Usage

1
2
3
## S3 method for class 'bmixlm'
residuals(object, type = c("mean", "samples"),
  standardize = FALSE, ...)

Arguments

object

An object of class bmixlm

type

Whether to return the posterior mean or samples from the posterior.

standardize

Whether to standardize the residuals.

...

Currently unused.

Details

If type="mean" the function returns posterior mean quantities as a dataframe, otherwise it returns samples from the posterior as a list of arrays.

Value

Returns a list or dataframe with elements

y1

residuals for the first component model

y2

residuals for the second component model

p

posterior predictive probabilities of membership of the second component

q

posterior probabilities of membership of the second component

b

binary indicators of membership of the second component, conditional on the observed response

If type="mean" return a dataframe of posterior means is returned, and if type="samples" return a list of arrays of samples from the posterior.


SWotherspoon/bmixlm documentation built on May 9, 2019, 12:07 p.m.