dfcop: Discrete factor copula models

Description Usage Arguments Details Value Examples

Description

Fit discrete factor copula models to data.

Usage

1
2
dfcop(data, family_set = "all", selcrit = "bic", ngrid = 100,
  keep_data = TRUE)

Arguments

data

a binary matrix or data.frame.

family_set

a character vector of families; as in dfcop_dist(), see Details for additional options.

selcrit

criterion for family selection, either "loglik", "aic", or "bic".

ngrid

number of nodes and weights for the Gaussian quadrature.

keep_data

whether the data should be stored (necessary for computing fit statistics and using fitted()).

Details

In addition to the families in dfcop_dist(), the following convenience definition from can be used (and combined):

"all"

all families

.

"archimedean"

archimedean families.

"elliptical"

elliptical families.

"bbs"

BB families.

"oneparametric "

one parameter families.

"twoparametric "

two parameter families.

Partial matching is activated. For example, you can write "arch" instead of the full name "archimedean".

Value

An object inherting from dfcop and dfcop_dist.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Sample size, dimension, correlation parameter
n <- 1e3
d <- 1e1
rho <- 0.7

# The model
prob <- runif(d)
dfcop <- dfcop_dist(prob, "gaussian", rho)

# Data
X <- rdfcop(n, dfcop)

# Fit
fit <- dfcop(X)
fit

tvatter/mdmd documentation built on May 13, 2019, 4:11 a.m.