Hi listers, First I programmed the calcul of a empirical distribution function given by:
F_hat(y)=(1/n)*Sum[Ind(yi<=y)] I checked the ecdf function and I found out how does it works... A modification of the function would be: n<-6 x<-c(10,12,7,7,5,4) vals<-unique(x) edf<-cumsum(tabulate(match(x, vals)))/n But, what I am really looking for is this: P_hat(y)=Sum[Ind(yi<y)] At this case my indicatrix function has no equality... So, I was tryind to program with IF and ELSE... But it seems kind of complicated... Could anybody give me any clue, like the algorithm idea... Thanks in advance, Marcio -- View this message in context: http://www.nabble.com/Program-with-indicatrix-function-tp25501538p25501538.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.