R/error.cdfadj.R

error.cdfadj <- function(ban, badj, eps, res.data)
{
    res = as.numeric(res.data)
    data.num = length(res)
    std.res = sd(res)
    epsilon = (res-mean(res))/std.res
    eps.std = (eps-mean(res))/std.res
    tem = tem2 = vector(,length(epsilon))
    for(i in 1:(length(epsilon)))
    {
        tem[i]=(eps.std-epsilon[i])/(ban*(1+badj*abs(res[i])))
        tem2[i]=pnorm(tem[i])
    }
    hatf = sum(tem2)/data.num
    return(hatf)
}

Try the bbefkr package in your browser

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

bbefkr documentation built on May 2, 2019, 3:04 a.m.