oprobit_dist: Ordinal Probit Models

oprobit_distR Documentation

Ordinal Probit Models

Description

Fits and evaluates the ordinal probit model.

Usage

#---- ordinal probit model
doprobit(x, thresh, max_val=99)

fit_oprobit(x, par_init=NULL, weights=NULL)
## S3 method for class 'fit_oprobit'
coef(object, ...)
## S3 method for class 'fit_oprobit'
logLik(object, ...)
## S3 method for class 'fit_oprobit'
summary(object, digits=4, file=NULL, ...)
## S3 method for class 'fit_oprobit'
vcov(object, ...)

Arguments

x

Numeric vector

thresh

Vector of thresholds

max_val

Maximum value for computing thresholds

par_init

Optional vector of initial parameters

weights

Optional vector of sampling weights

object

Object of class fit_yjt_scaled or fit_t_scaled

digits

Number of digits used for rounding in summary

file

File name for the summary to be sunk into

...

Further arguments to be passed

Value

Vector or an object of fitted distribution depending on the called function

See Also

See oprobit_regression for fitting a regression model in which the response variable follows an ordinal probit model.

Examples

#############################################################################
# EXAMPLE 1: Fit an ordinal probit distribution
#############################################################################

#-- simulate data
set.seed(987)
N <- 1500
# define thresholds
thresh <- c(0,.3, .7, 1.6)
# latent continuous data
yast <- stats::rnorm(N)
# discretized ordinal data
x <- as.numeric( cut( yast, c(-Inf,thresh,Inf) ) ) - 1

#-- fit ordinal probit distribution
mod <- mdmb::fit_oprobit(x=x)
summary(mod)
logLik(mod)
vcov(mod)

mdmb documentation built on March 7, 2023, 6:58 p.m.