R/predict.R

#'predict
#'
#'Predicts the values of given model of psychometric function based on level of stimulation.
#'@param object
#'@param x the vector of level values
#'@return vector of model values
#'@export
predict.PF <- function(object, x=c(), ...){
            if(!is.numeric(x)){ warning("x must be numeric"); return(NULL) }

            result <- PsyMetFuns:::PFunction(
                                object$sigmoid,
                                object$core,
                                x,
                                object$gamma,
                                object$lambda,
                                object$params
            )
            return(result)
}
LuchTiarna/PsyMetFuns documentation built on May 5, 2019, 2:43 a.m.