[R] Program with indicatrix function

MarcioRibeiro mestat at pop.com.br
Fri Sep 18 03:38:54 CEST 2009


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.




More information about the R-help mailing list