R/trans.par.norm.r

Defines functions trans.par.norm

trans.par.norm = function(p1, p2, v1, v2, cr, Z1, Z2, a){
  mu1 = Z1 %*% as.matrix(p1)
  mu2 = Z2 %*% as.matrix(p2)
  sd1 = exp(v1)
  sd2 = exp(v2)
  a  = logrob(a, tol=1e-300)
  m  = mu1 + sd1/sd2*cr*(a-mu2)
  v  = sqrt( (1-cr^2)*sd1^2 )
  cbind(m,v)
}

Try the BayesPIM package in your browser

Any scripts or data that you put into this service are public.

BayesPIM documentation built on April 12, 2025, 1:59 a.m.