R/q2.R

#Probability of no sampling
q2 <-
function(i,time,t,l,mu,rho) {
	if (t[i]>time) {res = 0} else{
	ci <- const(i,t,l,mu,rho)
	a<-(ci-1) * exp(-(l[i]-mu[i]) * t[i])
	b<- (mu[i] - ci * l[i]) * exp(-(l[i]-mu[i]) * time) 
	res <- (mu[i] * a +b ) / (l[i] * a + b )
	}
	res
	}
tanja819/TreePar documentation built on May 31, 2019, 2:57 a.m.