singer, Reid; r-help@stat.math.ethz.ch
Subject: RE: [R] using integrate with optimize nested in the integration
Thanks for the prompt reply.
Your right, that was a weak example.
Consider this one though:
f <- function(n,x) (x-2.5)^2*n
g <- function(y) optimize(f,c(0,15), maximum=TRUE,x=
is the x-value at which the function f(x,t) (over x in (0,5))
> reaches its maximum for this fixed t. That could then be integrated.
>
> Reid Huntsinger
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Gregory Gentlemen
> Sent: Thurs
h.ethz.ch
Subject: [R] using integrate with optimize nested in the integration
Hi guys
im having a problem getting R to numerically integrate for some function,
say f(bhat)*optimize(G(bhat)), over bhat. Where id like to integrate this
over some finite range, so that here as we integrate over bhat opti
Gregory Gentlemen wrote:
> Hi guys
> im having a problem getting R to numerically integrate for some function,
> say f(bhat)*optimize(G(bhat)), over bhat. Where id like to integrate this
> over some finite range, so that here as we integrate over bhat optimize would
> return a different optimu
ly 28, 2005 3:58 PM
To: r-help@stat.math.ethz.ch
Subject: [R] using integrate with optimize nested in the integration
Hi guys
im having a problem getting R to numerically integrate for some function,
say f(bhat)*optimize(G(bhat)), over bhat. Where id like to integrate this
over some finite ran
Hi guys
im having a problem getting R to numerically integrate for some function,
say f(bhat)*optimize(G(bhat)), over bhat. Where id like to integrate this over
some finite range, so that here as we integrate over bhat optimize would return
a different optimum.
For instance consider this simpl