Main function to estimate and validate a CUSH model for ordinal responses, with or without covariates to explain the shelter effect.

1 |

`Formula` |
Object of class Formula. |

`data` |
Data frame from which model matrices and response variables are taken. |

`...` |
Additional arguments to pass to the fitting procedure. Argument X specifies the matrix of subjects covariates to include in the model for explaining the shelter effect (not including intercept). |

The estimation procedure is not iterative, so a null result for CUSH$niter is produced. The optimization procedure is run via "optim". If covariates are included, the variance-covariance matrix is computed as the inverse of the returned numerically differentiated Hessian matrix (option: hessian=TRUE as argument for "optim"). If not positive definite, it returns a warning message and produces a matrix with NA entries.

An object of the class "CUSH" is a list containing the following results:

`estimates` |
Maximum likelihood parameters estimates |

`loglik` |
Log-likelihood function at the final estimates |

`varmat` |
Variance-covariance matrix of final estimates (if X=0, it returns the square of the estimated standard error
for the shelter parameter |

`BIC` |
BIC index for the estimated model |

Capecchi S. and Piccolo D. (2015). Dealing with heterogeneity/uncertainty in sample survey with ordinal data,
*IFCS Proceedings, University of Bologna*

Capecchi S. and Iannario M. (2016). Gini heterogeneity index for detecting uncertainty in ordinal data surveys,
*Metron* - DOI: 10.1007/s40300-016-0088-5

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.