R/doprobit.R

Defines functions doprobit

Documented in doprobit

## File Name: doprobit.R
## File Version: 0.05

doprobit <- function(x, thresh, max_val=99)
{
    thresh <- thresh[ order(thresh) ]
    thresh_upp <- c( thresh, max_val )
    thresh_low <- c( - max_val, thresh )
    res <- stats::pnorm( thresh_upp[ x + 1 ]) - stats::pnorm( thresh_low[ x + 1 ] )
    return(res)
}

Try the mdmb package in your browser

Any scripts or data that you put into this service are public.

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