R/scaleThetaFromInf.R

Defines functions scaleThetaFromInf

scaleThetaFromInf <- function(min, max, theta) {
    new <- theta
    for (i in 1:length(theta)) {
        if (theta[i]==Inf) {
            new[i] <- max
        }
        else {
            new[i] <- (max-min)*exp(theta[i])/(1+exp(theta[i]))+min
        }
    }
    return(new)
}
joakimwallmark/PolyOptimalIRT documentation built on Dec. 21, 2021, 1:16 a.m.