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 : -1.4
#> 
#> C : 1
#> 
#> s : 1
#> 
#> b : 2 x 1 matrix of doubles 
#>      [,1]
#> [1,]  0.6
#> [2,] -0.8
#> 
#> 
#> Omega : 4 x 1 matrix of doubles 
#>       [,1]
#> [1,]  1.44
#> [2,] -0.12
#> [3,] -0.12
#> [4,]  0.14
#> 
#> 
#> Sigma : 2 x 2 matrix of doubles 
#>       [,1]  [,2]
#> [1,]  4.17 -0.09
#> [2,] -0.09  0.21
#> 
#> 
#> Sigma_full : 3 x 3 matrix of doubles 
#>       [,1]  [,2]  [,3]
#> [1,]  3.03 -0.67 -0.42
#> [2,] -0.67  0.18  0.13
#> [3,] -0.42  0.13  0.29
#> 
#> 
#> beta : 2 x 10 matrix of doubles 
#>       [,1]  [,2]  [,3] ... [,10]
#> [1,] -1.24   0.4  1.71 ... -1.07
#> [2,] -0.84 -1.07 -1.65 ...  -0.8
#> 
#> 
#> z : double vector of length 10 
#> 1 1 1 ... 1
#> 
#> d : NA
#>