[R] (no subject)
malika yassa
y@@@@_m@lik@ @ending from y@hoo@fr
Tue Aug 7 07:51:12 CEST 2018
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]]
More information about the R-help
mailing list