jzs_corSD(V1, V2, SDmethod = c("fit.st", "dnorm", "splinefun", "logspline"), alternative = c("two.sided", "less", "greater"), n.iter=10000,n.burnin=500, standardize=TRUE)two.sided, greater than zero, or less than zero.
R2jags). Defaults to 10000.
R2jags). Defaults to 500.
fit.st will fail to converge. If so, another optimization method is used, using different starting values. If the other optimization method does not converge either or gives you a negative Bayes factor (which is meaningless), you could try one of the other SDmethod options or see jzs_cor.Liang, F., Paulo, R., Molina, G., Clyde, M. A., & Berger, J. O. (2008). Mixtures of g priors for Bayesian variable selection. Journal of the American Statistical Association, 103(481), 410-423.
Nuijten, M. B., Wetzels, R., Matzke, D., Dolan, C. V., & Wagenmakers, E.-J. (2014). A default Bayesian hypothesis test for mediation. Behavior Research Methods. doi: 10.3758/s13428-014-0470-2
Wetzels, R., & Wagenmakers, E.-J. (2012). A Default Bayesian Hypothesis Test for Correlations and Partial Correlations. Psychonomic Bulletin & Review, 19, 1057-1064.
jzs_cor, jzs_partcorSD
## Not run:
# # generate correlational data
# X <- rnorm(100)
# Y <- .4*X + rnorm(100,0,1)
#
# # run jzs_cor
# result <- jzs_corSD(X,Y)
#
# # inspect posterior distribution
# plot(result$alpha_samples)
#
# # print a traceplot of the chains
# plot(result$jagssamples)
#
# ## End(Not run)
Run the code above in your browser using DataLab