Displaying 1 result from an estimated 1 matches for "cumpr".
Did you mean:
compr
2007 Jul 25
0
Function polr and discrete ordinal scale
...<- model.matrix(Terms, m, contrasts = object$contrasts)
xint <- match("(Intercept)", dimnames(X)[[2]], nomatch=0)
if(xint > 0) X <- X[, -xint, drop=F]
n <- nrow(X)
q <- length(object$zeta)
eta <- drop(X %*% object$coef)
cumpr <- matrix(plogis(matrix(object$zeta, n, q, byrow=T) - eta), , q)
Y <- t(apply(cumpr, 1, function(x) diff(c(0, x, 1))))
dimnames(Y) <- list(dimnames(X)[[1]], object$lev)
}
if(!is.null(object$na.action)) Y <- napredict(object$na.action, Y)
switch(type, class={...