Displaying 1 result from an estimated 1 matches for "binprob".
Did you mean:
binpref
2005 Nov 09
2
help with legacy R code
...seundermean / wrongper
fitmean <- -1
fitsd <- 0
fitnfalse <- initnfalse
fitshape <- wrongshape
fitrate <- wrongrate
curve((fitnfalse*dgamma(x,fitshape,fitrate))/totalx, add=T, col="red",
lwd=2)
breaksllength <- length(goodhist$breaks)
endi = breaksllength - 1
binprob = c(1)
for (i in 1:endi) {
expnegative <- fitnfalse * (pgamma(goodhist$breaks[i+1],wrongshape,
wrongrate)-pgamma(goodhist$breaks[i],wrongshape, wrongrate))
if (goodhist$counts[i] == 0)
binprob[i] = 0
else
binprob[i] = (goodhist$counts[i] - expnegative) / goodhist$counts[i]
}
result = da...