R/predict.TML.r

Defines functions predict.TML

Documented in predict.TML

predict.TML <- function(object, newdata = NULL, ...) 
{
    beta <- object$th1
    if (missing(newdata) || is.null(newdata))
        pred <- fitted.values(object)
    else {
        if (is.vector(newdata))
            X <- newdata
        else X <- as.matrix(newdata)
        pred <- X %*% beta
    }
    pred
}


    
    

Try the RobustAFT package in your browser

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

RobustAFT documentation built on Aug. 21, 2023, 5:13 p.m.