Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


bpcs (version 1.0.0)

create_bpc_object: Defines the class bpc and creates the bpc object. To create we need to receive some defined parameters (the arguments from the bpc function), a lookup table and a the stanfit object generated from the rstan sampling procedure

Description

Defines the class bpc and creates the bpc object. To create we need to receive some defined parameters (the arguments from the bpc function), a lookup table and a the stanfit object generated from the rstan sampling procedure

Usage

create_bpc_object(
  stanfit,
  lookup_table,
  model_type,
  standata,
  call_arg,
  cluster_lookup_table = NULL,
  predictors_df = NULL,
  predictors_lookup_table = NULL,
  predictors_matrix = NULL
)

Arguments

stanfit

Stanfit object returned by rstan::sampling

lookup_table

lookup_table dataframe. Two columns one Index the other Names where each each index will match a string in the names

model_type

the type of the model used to call stan (string)

standata

a list with the data used to call the rstan::sampling procedure

call_arg

a list with the arguments called from the bpc function

cluster_lookup_table

a lookup table with we have random effects

predictors_df

the data frame of the predictors for a generalized model

predictors_lookup_table

a lookup table for generalized models

predictors_matrix

a matrix of predictors for generalized models

Value

a bpc object