Skip to contents

This function creates an object of class RprobitB_parameter, which contains the parameters of a probit model. If sample = TRUE, missing parameters are sampled. All parameters are checked against the values of P_f, P_r, J, and N.

Usage

RprobitB_parameter(
  P_f,
  P_r,
  J,
  N,
  ordered = FALSE,
  alpha = NULL,
  C = NULL,
  s = NULL,
  b = NULL,
  Omega = NULL,
  Sigma = NULL,
  Sigma_full = NULL,
  beta = NULL,
  z = NULL,
  d = NULL,
  seed = NULL,
  sample = TRUE
)

Arguments

P_f

The number of covariates connected to a fixed coefficient (can be 0).

P_r

The number of covariates connected to a random coefficient (can be 0).

J

The number (greater or equal 2) of choice alternatives.

N

The number (greater or equal 1) of decision makers.

ordered

A boolean, FALSE per default. If TRUE, the choice set alternatives is assumed to be ordered from worst to best.

alpha

The fixed coefficient vector of length P_f. Set to NA if P_f = 0.

C

The number (greater or equal 1) of latent classes of decision makers. Set to NA if P_r = 0. Otherwise, C = 1 per default.

s

The vector of class weights of length C. Set to NA if P_r = 0. For identifiability, the vector must be non-ascending.

b

The matrix of class means as columns of dimension P_r x C. Set to NA if P_r = 0.

Omega

The matrix of class covariance matrices as columns of dimension P_r*P_r x C. Set to NA if P_r = 0.

Sigma

The differenced error term covariance matrix of dimension J-1 x J-1 with respect to alternative J. In case of ordered = TRUE, a numeric, the single error term variance.

Sigma_full

The error term covariance matrix of dimension J x J. Internally, Sigma_full gets differenced with respect to alternative J, so it becomes an identified covariance matrix of dimension J-1 x J-1. Sigma_full is ignored if Sigma is specified or ordered = TRUE.

beta

The matrix of the decision-maker specific coefficient vectors of dimension P_r x N. Set to NA if P_r = 0.

z

The vector of the allocation variables of length N. Set to NA if P_r = 0.

d

The numeric vector of the logarithmic increases of the utility thresholds in the ordered probit case (ordered = TRUE) of length J-2.

seed

Set a seed for the sampling of missing parameters.

sample

A boolean, if TRUE (default) missing parameters get sampled.

Value

An object of class RprobitB_parameter, i.e. a named list with the model parameters alpha, C, s, b, Omega, Sigma, Sigma_full, beta, and z.

Examples

RprobitB_parameter(P_f = 1, P_r = 2, J = 3, N = 10)
#> alpha : 0.8
#> 
#> C : 1
#> 
#> s : 1
#> 
#> b : 2 x 1 matrix of doubles 
#> 
#>      [,1]
#> [1,] -1.9
#> [2,] -2.1
#> 
#> 
#> Omega : 4 x 1 matrix of doubles 
#> 
#>           [,1]
#> [1,]  3.483686
#> [2,] -2.746854
#> [3,] -2.746854
#> [4,]  3.874257
#> 
#> 
#> Sigma : 2 x 2 matrix of doubles 
#> 
#>           [,1]      [,2]
#> [1,] 3.1122967 0.4256672
#> [2,] 0.4256672 2.8436770
#> 
#> 
#> Sigma_full : 3 x 3 matrix of doubles 
#> 
#>           [,1]      [,2]      [,3]
#> [1,] 6.6100780 0.8429134 3.1832096
#> [2,] 0.8429134 0.1803880 0.1026744
#> [3,] 3.1832096 0.1026744 2.8686378
#> 
#> 
#> beta : 2 x 10 matrix of doubles 
#> 
#>         [,1]    [,2]    [,3] ...   [,10]
#> [1,] -0.9191 -1.6917 -3.0293 ... -5.9343
#> [2,] -5.8519 -3.0123 -3.7019 ...  1.0129
#> 
#> 
#> z : integer vector of length 10 
#> 
#> 1 1 1 ... 1
#> 
#> d : NA
#>