# [R] (no subject)

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Wed Aug 8 03:06:07 CEST 2018

Hi malika,
You don't seem to have defined your functions correctly. For example:

H<-function(u,x1)

would define an empty function H if that command worked, but it doesn't

Jim

On Tue, Aug 7, 2018 at 3:51 PM, malika yassa via R-help
<r-help using r-project.org> wrote:
> 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 using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help