Displaying 1 result from an estimated 1 matches for "zeta3".
Did you mean:
beta3
2010 Nov 18
0
On efficiency, Vectorize and loops
...(which is a iiN(0,I_d) vector process)
# Time varies columnwise
Z<-matrix(rnorm(10*n),nrow=10,ncol=n)
# Defining the deterministic base functions 'zeta'
zeta<-function(u,i){
sqrt(2)+sin(pi*i*u)
}
zeta2<-function(i){force(i);
function(u){
sqrt(2)+sin(pi*outer(i,u))
}
}
zeta3<-function(u,i){
sqrt(2)+sin(pi*outer(i,u))
}
# Building the random functional process 'epsilon'
epsilon<-lapply(1:n, function(t)local({force(t);
function(u){
epsilon<-0
for (j in 1:10){
epsilon<-epsilon+2^(1-j)*Z[j,t]*zeta(u,j)
}
epsilon<-epsilon
}
}))
e...