Retrieve the cmstanr fit object This object can be used with any other function or package. You can also convert it to a stanfit objects from rstan

get_fit(bpc_object)

Arguments

bpc_object

a bpc object

Value

a cmdstanr fit object

Examples

# \donttest{
m<-bpc(data = tennis_agresti,
player0 = 'player0',
player1 = 'player1',
result_column = 'y',
model_type = 'bt',
solve_ties = 'none')
#> Running MCMC with 4 parallel chains...
#> 
#> Chain 1 finished in 3.3 seconds.
#> Chain 2 finished in 3.4 seconds.
#> Chain 3 finished in 3.4 seconds.
#> Chain 4 finished in 3.3 seconds.
#> 
#> All 4 chains finished successfully.
#> Mean chain execution time: 3.4 seconds.
#> Total execution time: 3.5 seconds.
fit<- get_fit(m)
print(class(fit))
#> [1] "CmdStanMCMC" "CmdStanFit"  "R6"         
# }