# \donttest{
g1 = function(psi){
w = sum(psi[6:10])/5
theta = c(psi[1], psi[2], psi[3], psi[4], psi[5],
w, w-psi[7], w-psi[8], w-psi[9], w-psi[10])
return(theta)
}
ginv1 = function(theta){
w = sum(theta[6:10])
psi = c(theta[1], theta[2], theta[3], theta[4], theta[5],
w, theta[6]-theta[7], theta[6]-theta[8],
theta[6]-theta[9], theta[6]-theta[10])
return(psi)
}
g2 = function(psi){
theta = psi
return(theta)
}
ginv2 = function(theta){
psi = theta
return(psi)
}
out = rjmcmc_func(g1, ginv1, g2, ginv2, or_alt = c(1.4,1.4,1.4,1.4,1.4), sd = 0.2,
pro_ctr = c(0.58,0.05,0.17,0.03,0.04,0.13),
n = 100, U = c(100,80,65,25,10,0))
# }
Run the code above in your browser using DataLab