Dear Duncan,

thanks a lot for your answer. I was think a was distracted by the FED
rate cut ;)
Now it works.
Have a nice day
Thomas

myfun1<-function(x,pa) {
  return(pa[1]*x^2+pa[2]*x+pa[3])
}
myfun2<-function(x,param,myfunk1,pa) {
  return(param[1]*myfunk1(x,pa)+param[2]*myfunk1(-x,pa))
}
test<-function(pars1,pars2,lo,up){
  
integ=integrate(f=myfun2,lower=lo,upper=up,param=pars2,myfunk1=myfun1,pa=pars1)
  return( integ$value )
}
test(pars1=c(1,2,3),pars2=c(-1,0),lo=1,up=7)

______________________________________________
R-help@r-project.org mailing list
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