This is the part of the function in my likelihood function
prob<-function(t1,t2,m1,m2,s_r,s_p,s_e,cor_m){
if ((t1==0) & (t2==0))
log_lik<-log(pmvnorm(lower=rep(-Inf, 2),
upper=c(m1/sqrt(s_r+s_p+s_e+1),m2/sqrt(s_r+s_p+s_e+1)),
mean=rep(0,2), corr=cor_m))
else if ((t1==0) & (t2==1))
log_lik<
What distribution's log-likelihood are you using? If sigma is supposed
to be square-rooted, you may have to put a constraint or use of abs()
might suffice -- though, admittedly I'm not sure what that will do to
convergence behavior -- but it's hard to help without seeing the
function at hand.
Mich
2 matches
Mail list logo