EstDiscrete {CopulaGAMM} | R Documentation |

This function computes the estimation of a copula-based 2-level hierarchical model.

```
EstDiscrete(
y,
disc,
family,
rot = 0,
clu,
xc = NULL,
xm = NULL,
start,
LB,
UB,
nq = 25,
dfC = NULL,
offset = NULL,
adj = 1,
prediction = TRUE
)
```

`y` |
n x 1 vector of response variable (assumed continuous). |

`disc` |
function for margins: 1 (Bernoulli), 2 (Poisson), 3 (Negative Binomial), 4 (Geometric). |

`family` |
copula family: "gaussian" , "t" , "clayton" , "frank" , "fgm", gumbel". |

`rot` |
rotation: 0 (default), 90, 180 (survival), or 270 |

`clu` |
variable of size n defining the clusters; can be a factor |

`xc` |
covariates of size n for the estimation of the copula, in addition to the constant; default is NULL. |

`xm` |
covariates of size n for the estimation of the mean of the margin, in addition to the constant; default is NULL. |

`start` |
starting point for the estimation; could be the ones associated with a Gaussian-copula model defined by lmer. |

`LB` |
lower bound for the parameters. |

`UB` |
upper bound for the parameters. |

`nq` |
number of nodes and weighted for Gaussian quadrature of the product of conditional copulas; default is 25. |

`dfC` |
degrees of freedom for a Student margin; default is 0. |

`offset` |
offset (default is NULL) |

`adj` |
tuning parameter (>= 1) that can be used to prevent overflow when the cluster size n is very large; when n<=100 OR Bernoulli marginals, no adjustment is required; when n>=500 for the Poisson likelihood fails due to overflow problem; adj=3 prevents this in 100% cases |

`prediction` |
logical variable for prediction of latent variables V (default is TRUE). |

`coefficients` |
Estimated parameters |

`sd` |
Standard deviations of the estimated parameters |

`tstat` |
T statistics for the estimated parameters |

`pval` |
P-values of the t statistics for the estimated parameters |

`gradient` |
Gradient of the log-likelihood |

`loglik` |
Log-likelihood |

`aic` |
AIC coefficient |

`bic` |
BIC coefficient |

`cov` |
Covariance matrix of the estimations |

`grd` |
Gradients by clusters |

`clu` |
Cluster values |

`Matxc` |
Matrix of covariates defining the copula parameters, including a constant |

`Matxm` |
Matrix of covariates defining the margin parameters, including a constant |

`V` |
Estimated value of the latent variable by clusters (if prediction=TRUE) |

`cluster` |
Unique clusters |

`family` |
Copula family |

`thC0` |
Estimated parameters of the copula by observation |

`thF` |
Estimated parameters of the margins by observation |

`disc` |
Discrete margin number |

`rot` |
rotation |

`dfC` |
Degrees of freedom for the Student copula |

Pavel Krupskii, Bouchra R. Nasri and Bruno N. Remillard

Krupskii, Nasri & Remillard (2023). On factor copula-based mixed regression models

```
data(poisson) #simulated data with poisson margins
start=c(0,0,0); LB=rep(-10,3);UB=rep(10,3)
y=poisson$y; clu=poisson$clu;xm=poisson$xm
EstDiscrete(y,disc=2,family="clayton",rot=90,clu=clu,xm=xm,start=start,LB=LB,UB=UB)
```

[Package *CopulaGAMM* version 0.3.0 Index]