#' A function rather aimed at developers
#' @noRd
getProb = function(inscore, groupMeans, groupSds){
### assume groupMeans contain 2 values for 2 group, and the 1st one is for positive group
### assume groupSds contain 2 values for 2 group, and the 1st one is for positive group
#### d1 and d0 are density value for the given observed score under normal assumption
d1 = dnorm(inscore,mean = groupMeans[1], sd= groupSds[1])
d0 = dnorm(inscore,mean = groupMeans[2], sd= groupSds[2])
return(d1/(d1+d0))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.