as.data.frame.BayesMfp: Convert a BayesMfp object to a data frame

as.data.frame.BayesMfpR Documentation

Convert a BayesMfp object to a data frame

Description

Convert the BayesMfp object to a data frame with the saved models.

Usage

## S3 method for class 'BayesMfp'
as.data.frame(x, row.names = NULL, ..., freq = TRUE)

Arguments

x

valid BayesMfp object

row.names

optional rownames (default is to keep the names of the BayesMfp list)

freq

should empirical frequencies of the models in the sampling path be given? (default)

...

unused

Author(s)

Daniel Saban\'es Bov\'e

See Also

summary.BayesMfp

Examples

## generate a BayesMfp object
set.seed(19)

x1 <- rnorm(n=15)
x2 <- rbinom(n=15, size=20, prob=0.5) 
x3 <- rexp(n=15)

y <- rt(n=15, df=2)

test <- BayesMfp(y ~ bfp (x2, max = 4) + uc (x1 + x3), nModels = 100,
                 method="exhaustive")

## get the models data frame
as.data.frame(test)

bfp documentation built on Nov. 1, 2022, 1:05 a.m.