R/cdf.mix.LN.R

cdf.mix.LN <-
function(q,pi0,thres0=0,pi1,thres1,mu,sigma){
  n<-length(q)
  pm<-rep(NA,n)
  for(i in 1:n){
    if(q[i]<=thres0){pm[i]<-pi0
    }else if(q[i]>thres0&q[i]<= thres1) {pm[i]<-pi0+pi1*(q[i]-thres0)/(thres1-thres0)
    }else if(q[i]>thres1) pm[i]<-pi0+pi1+(1-pi0-pi1)*pLOGNO(q[i]-thres1,mu,sigma)}  
  return(pm)
}

Try the acid package in your browser

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

acid documentation built on May 1, 2019, 10:14 p.m.