# Roger Palay copyright 2026-02-24 # Saline, MI 48176 # ptmsd <- function( q, df, mean=0, sd=1, ncp=NULL, lower.tail=TRUE, log.p=FALSE) { ## This is a function that will extend the pt() ## function to allow the user to specify the ## sample mean and/or standard deviation to use. new_q <- (q-mean)/sd if( is.null( ncp) ) {pt( new_q, df, 0, lower.tail, log.p)} else {pt( new_q, df, ncp, lower.tail, log.p)} }