Skip to contents

This function computes the point estimates of an RprobitB_fit. Per default, the mean of the Gibbs samples is used as a point estimate. However, any statistic that computes a single numeric value out of a vector of Gibbs samples can be specified for FUN.

Usage

point_estimates(x, FUN = mean)

Arguments

x

An object of class RprobitB_fit.

FUN

A function that computes a single numeric value out of a vector of numeric values.

Value

An object of class RprobitB_parameter.

Examples

data <- simulate_choices(form = choice ~ covariate, N = 10, T = 10, J = 2)
model <- fit_model(data)
#> Computing sufficient statistics - 0 of 4  

#> Computing sufficient statistics - 1 of 4  

#> Computing sufficient statistics - 2 of 4  

#> Computing sufficient statistics - 3 of 4  

#> Computing sufficient statistics - 4 of 4  

#> MCMC iteration - 1 of 1000  

#> MCMC iteration - 10 of 1000  

#> MCMC iteration - 20 of 1000  

#> MCMC iteration - 30 of 1000  

#> MCMC iteration - 40 of 1000  

#> MCMC iteration - 50 of 1000  

#> MCMC iteration - 60 of 1000  

#> MCMC iteration - 70 of 1000  

#> MCMC iteration - 80 of 1000  

#> MCMC iteration - 90 of 1000  

#> MCMC iteration - 100 of 1000  

#> MCMC iteration - 110 of 1000  

#> MCMC iteration - 120 of 1000  

#> MCMC iteration - 130 of 1000  

#> MCMC iteration - 140 of 1000  

#> MCMC iteration - 150 of 1000  

#> MCMC iteration - 160 of 1000  

#> MCMC iteration - 170 of 1000  

#> MCMC iteration - 180 of 1000  

#> MCMC iteration - 190 of 1000  

#> MCMC iteration - 200 of 1000  

#> MCMC iteration - 210 of 1000  

#> MCMC iteration - 220 of 1000  

#> MCMC iteration - 230 of 1000  

#> MCMC iteration - 240 of 1000  

#> MCMC iteration - 250 of 1000  

#> MCMC iteration - 260 of 1000  

#> MCMC iteration - 270 of 1000  

#> MCMC iteration - 280 of 1000  

#> MCMC iteration - 290 of 1000  

#> MCMC iteration - 300 of 1000  

#> MCMC iteration - 310 of 1000  

#> MCMC iteration - 320 of 1000  

#> MCMC iteration - 330 of 1000  

#> MCMC iteration - 340 of 1000  

#> MCMC iteration - 350 of 1000  

#> MCMC iteration - 360 of 1000  

#> MCMC iteration - 370 of 1000  

#> MCMC iteration - 380 of 1000  

#> MCMC iteration - 390 of 1000  

#> MCMC iteration - 400 of 1000  

#> MCMC iteration - 410 of 1000  

#> MCMC iteration - 420 of 1000  

#> MCMC iteration - 430 of 1000  

#> MCMC iteration - 440 of 1000  

#> MCMC iteration - 450 of 1000  

#> MCMC iteration - 460 of 1000  

#> MCMC iteration - 470 of 1000  

#> MCMC iteration - 480 of 1000  

#> MCMC iteration - 490 of 1000  

#> MCMC iteration - 500 of 1000  

#> MCMC iteration - 510 of 1000  

#> MCMC iteration - 520 of 1000  

#> MCMC iteration - 530 of 1000  

#> MCMC iteration - 540 of 1000  

#> MCMC iteration - 550 of 1000  

#> MCMC iteration - 560 of 1000  

#> MCMC iteration - 570 of 1000  

#> MCMC iteration - 580 of 1000  

#> MCMC iteration - 590 of 1000  

#> MCMC iteration - 600 of 1000  

#> MCMC iteration - 610 of 1000  

#> MCMC iteration - 620 of 1000  

#> MCMC iteration - 630 of 1000  

#> MCMC iteration - 640 of 1000  

#> MCMC iteration - 650 of 1000  

#> MCMC iteration - 660 of 1000  

#> MCMC iteration - 670 of 1000  

#> MCMC iteration - 680 of 1000  

#> MCMC iteration - 690 of 1000  

#> MCMC iteration - 700 of 1000  

#> MCMC iteration - 710 of 1000  

#> MCMC iteration - 720 of 1000  

#> MCMC iteration - 730 of 1000  

#> MCMC iteration - 740 of 1000  

#> MCMC iteration - 750 of 1000  

#> MCMC iteration - 760 of 1000  

#> MCMC iteration - 770 of 1000  

#> MCMC iteration - 780 of 1000  

#> MCMC iteration - 790 of 1000  

#> MCMC iteration - 800 of 1000  

#> MCMC iteration - 810 of 1000  

#> MCMC iteration - 820 of 1000  

#> MCMC iteration - 830 of 1000  

#> MCMC iteration - 840 of 1000  

#> MCMC iteration - 850 of 1000  

#> MCMC iteration - 860 of 1000  

#> MCMC iteration - 870 of 1000  

#> MCMC iteration - 880 of 1000  

#> MCMC iteration - 890 of 1000  

#> MCMC iteration - 900 of 1000  

#> MCMC iteration - 910 of 1000  

#> MCMC iteration - 920 of 1000  

#> MCMC iteration - 930 of 1000  

#> MCMC iteration - 940 of 1000  

#> MCMC iteration - 950 of 1000  

#> MCMC iteration - 960 of 1000  

#> MCMC iteration - 970 of 1000  

#> MCMC iteration - 980 of 1000  

#> MCMC iteration - 990 of 1000  

#> MCMC iteration - 1000 of 1000  

#> Computing log-likelihood
point_estimates(model)
#> alpha : double vector of length 2 
#> -1.55 -1.09
#> 
#> C : NA
#> 
#> s : NA
#> 
#> b : NA
#> 
#> Omega : NA
#> 
#> Sigma : 1
#> 
#> Sigma_full : 2 x 2 matrix of doubles 
#>      [,1] [,2]
#> [1,]    2    1
#> [2,]    1    1
#> 
#> 
#> beta : NA
#> 
#> z : NA
#> 
#> d : NA
#> 
point_estimates(model, FUN = median)
#> alpha : double vector of length 2 
#> -1.52 -1.07
#> 
#> C : NA
#> 
#> s : NA
#> 
#> b : NA
#> 
#> Omega : NA
#> 
#> Sigma : 1
#> 
#> Sigma_full : 2 x 2 matrix of doubles 
#>      [,1] [,2]
#> [1,]    2    1
#> [2,]    1    1
#> 
#> 
#> beta : NA
#> 
#> z : NA
#> 
#> d : NA
#>