
Transform latent group-level normal distribution (latent-trait MPT) into mean and SD on probability scale.
probitInverse(mu, sigma, fittedModel = NULL)
implied mean and SD on probability scale
latent-probit mean of normal distribution
latent-probit SD of normal distribution
optional: fitted traitMPT model. If provided, the
bivariate inverse-probit transform is applied to all MCMC samples (and
mu
and sigma
are ignored).
####### compare bivariate vs. univariate transformation
probitInverse(mu = 0.8, sigma = c(0.25, 0.5, 0.75, 1))
pnorm(0.8)
# full distribution
prob <- pnorm(rnorm(10000, mean = 0.8, sd = 0.7))
hist(prob, 80, col = "gray", xlim = 0:1)
if (FALSE) {
# transformation for fitted model
mean_sd <- probitInverse(fittedModel = fit)
summarizeMCMC(mean_sd)
}
Run the code above in your browser using DataLab