multiprobit: Estimate a multivariate probit model

Description Usage Arguments Details Value Examples

View source: R/estimation.R

Description

Estimate a multivariate probit model from multivariate binary data in a Bayesian generalised linear model framework

Usage

1

Arguments

model

An mp_model model object.

...

Parameters passed on to mp_model()

options

An mp_options object or a list that can be coerced into an mp_options object. Options set here will override the global options.

Details

For details on the multivariate probit model, see mp_model(). The multiprobit function estimates the model for observations stored in response

Value

An mp_estimate object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Not run: 
if (interactive()) {
  N <- 6
  d <- 2
  J <- 1

  set.seed(1L)
  X <- cbind(1, matrix(rnorm(N * (J - 1)), N, J - 1))
  B <- matrix(0.5, J, d)
  Y <- matrix(rnorm(N * d, mean = as.vector(X %*% B)) > 0, N, d)
  df <- d + 1
  prec_beta <- 0.1

  model <- mp_model(
    response = Y, X = X,
    df = df, prec_beta = prec_beta
  )
  opt <- multiprobit(
    model = model,
    options =
      mp_options(
        gaussint = list(max.threads = 1),
        strategy = "stepwise"
      )
  )
}

## End(Not run)

finnlindgren/multiprobit documentation built on June 20, 2020, 6:12 a.m.