hellothis is my programmeyou can help me, i cann't found a solution for H  and 
this  function i calculate for all value for x1thank you 


x<-rexp(N,2)

z<-rnorm(0,1,n)

g<rexp(2,n)

h=max(x)-min(x)

n1=n^0.17

h1=h/n1

k=2

x1<-seq(from=-2,to=2,by=0.1)

s[i]=(x[i]+x[i+1])/2

for(i in 1:N)

fkS<-function(m,k){fkm=-m*(abs(Z-m)<k)+k*(Z-m>=k)-k*(Z-m<=-k)}

k1<-function(u,x1){-1/(2*pi)exp((x1-u)/h1}

for (i in 1:n)

{k1(u,x1)=integrate(-1/(2*pi)exp((x1-u)/h1,lower=s[i-1],upper=s[i])}

 

 

H<-function(u,x1)

for (i in 1:n)

{H(u,x1)=sum(g[i]*fkS*integrate(k1,lower=s[i-1],upper=s[i])

}


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to