[R] Need Help To Solve An Equation In R
Bert Gunter
bgunter.4567 at gmail.com
Sat May 27 20:54:50 CEST 2017
Then:
1. Always cc the list;
2. Read and follow the posting guide: no HTML, plain text only.
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, May 27, 2017 at 11:05 AM, Neetu Shah <nshah.0452 at gmail.com> wrote:
> Dear Sir,
>
> It is not homework. I am trying to develop a library in R as my project. My
> mentor said to ask this doubt on R forum. As I am not able to solve that
> equation in R. I need to know the alternative for uniroot function. Please
> help me regarding this.
>
>
> --
> With Regards,
> Neetu Shah,
> B.Tech.(CS),
> 3rd Year,
> IIIT Vadodara.
>
>
> On Sat, May 27, 2017 at 11:11 PM, Bert Gunter <bgunter.4567 at gmail.com>
> wrote:
>>
>> Homework? We generally don't do homework here.
>>
>> Cheers,
>> Bert
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>>
>> On Sat, May 27, 2017 at 9:16 AM, Neetu Shah <nshah.0452 at gmail.com> wrote:
>> > Dear Sir/Ma'am,
>> >
>> > I am trying to make a function to solve an equation that is given below:
>> > findH <- function(p_star, k){
>> > fun <- function(y){
>> > (pnorm(y+h))^(k-1)*dnorm(y)
>> > }
>> > lhs <- integrate(fun, -Inf, Inf)$value
>> > return(uniroot(lhs, lower = -10, upper = 10,
>> > tol = p_star)$root)
>> > }
>> > In lhs, I integrated a function with respect to y and there would be an
>> > unknown h that I need to find.
>> > I need to equate this lhs to p_star value in order to find h. Which
>> > function should I use to solve this equation?
>> > Please guide me regarding this.
>> > Thank you.
>> >
>> > --
>> > With Regards,
>> > Neetu Shah,
>> > B.Tech.(CS),
>> > 3rd Year,
>> > IIIT Vadodara.
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > 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.
>
>
>
>
>
More information about the R-help
mailing list