EstDiscrete {CopulaGAMM} | R Documentation |

## Copula-based estimation of mixed regression models for discrete response

### Description

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

### Usage

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

### Arguments

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

`model` |
margins: "binomial" or "bernoulli","poisson", "nbinom" (Negative Binomial), "geometric", "multinomial". |

`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) |

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

### Value

`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 |

`rot` |
rotation |

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

`model` |
Name of the margins |

`disc` |
Discrete margin number |

### Author(s)

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

### References

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

### Examples

```
data(sim.poisson) #simulated data with Poisson margins
start=c(2,8,3,-1); LB = c(-3, 3, -7, -6);UB=c( 7, 13, 13, 4)
y=sim.poisson$y; clu=sim.poisson$clu;
xc=sim.poisson$xc; xm=sim.poisson$xm
model = "poisson"; family="frank"
out.poisson=EstDiscrete(y,model,family,rot=0,clu,xc,xm,start,LB,UB,nq=31,prediction=TRUE)
```

*CopulaGAMM*version 0.4.1 Index]