Displaying 1 result from an estimated 1 matches for "lengthbiasexampl".
Did you mean:
lengthbiasexample
2008 Jan 11
1
Adding weights to ecdf
...class(rval) <- c("ecdf", "stepfun", class(rval))
attr(rval, "call") <- sys.call()
rval
}
and as a particular example, to see how the E.C.D.F. behaves
in the length--biased framework consider running the following
function with different values for n
lengthBiasExample <- function(n=100)
{
distFun <- function(x) pgamma(x,shape=1,rate=1)
##lenght biased version of a gamma(shape=1,rate=1)
x <- rgamma(n,shape=2,rate=1)
par(ask=T)
Fx <- ecdf(x)
newFx <- newEcdf(x,1/x)
plot(Fx,pch="+")
curve(distFun,from=0,to=10,add=T,col="re...