R/gdm_inits_b.R

Defines functions gdm_inits_b

## File Name: gdm_inits_b.R
## File Version: 0.04


gdm_inits_b <- function( dat0, dat.resp0, I, K )
{
    b <- matrix( 0, nrow=I, ncol=K )
    for (ii in 1:K){    # ii <- 1
        cm1 <- colMeans( ( dat0 >=ii )*dat.resp0 )
        b[,ii] <-  stats::qlogis( ( cm1 + .01 ) / 1.02 )
    }
    #--- output
    return(b)
}

Try the CDM package in your browser

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

CDM documentation built on Aug. 25, 2022, 5:08 p.m.