R/betaparametw.R

Defines functions betaparametw

Documented in betaparametw

betaparametw <-
    function(xn,a,b){	
        n=length(xn)
        w<-rep(0,n)
        W<-rep(0,n)
        for(i in seq(n)){
            w[i]<-(a+b)*xn[i]/(a+b+xn[i])
        }
        for(i in seq(n)){ 
            if(!is.na(sum(w))){
                W[i]<-w[i]/sum(w) 
            }
        } 
        return(W)	
    }

Try the NBBttest package in your browser

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

NBBttest documentation built on May 30, 2022, 1:05 a.m.