Re: [R] Query on finding root

2023-08-28 Thread Ben Bolker
(I mean pdavies) On Mon, Aug 28, 2023, 7:52 AM Ben Bolker wrote: > I would probably use the built in qdavies() function... > > On Mon, Aug 28, 2023, 7:48 AM Leonard Mada via R-help < > r-help@r-project.org> wrote: > >> Dear R-Users, >> >> Just out of curiosity: >> Which of the 2 methods is the b

Re: [R] Query on finding root

2023-08-28 Thread Ben Bolker
I would probably use the built in qdavies() function... On Mon, Aug 28, 2023, 7:48 AM Leonard Mada via R-help wrote: > Dear R-Users, > > Just out of curiosity: > Which of the 2 methods is the better one? > > The results seem to differ slightly. > > > fun = function(u){((26104.50*u^0.03399381)/((

Re: [R] Query on finding root

2023-08-28 Thread Leonard Mada via R-help
Dear R-Users, Just out of curiosity: Which of the 2 methods is the better one? The results seem to differ slightly. fun = function(u){((26104.50*u^0.03399381)/((1-u)^0.107)) - 28353.7} uniroot(fun, c(0,1)) # 0.6048184 curve(fun(x), 0, 1) abline(v=0.3952365, col="red") abline(v=0.6048184,

Re: [R] Query on finding root

2023-08-27 Thread Ben Bolker
This doesn't look like homework to me -- too specific. The posting guide says that the list is not intended for "Basic statistics and classroom homework" -- again, this doesn't seem to fall into that category. tl;dr, I think the difference b

Re: [R] Query on finding root

2023-08-27 Thread Rolf Turner
On Fri, 25 Aug 2023 22:17:05 +0530 ASHLIN VARKEY wrote: > Sir, Please note that r-help is a mailing list, not a knight! 😊️ > I want to solve the equation Q(u)=mean, where Q(u) represents the > quantile function. Here my Q(u)=(c*u^lamda1)/((1-u)^lamda2), which is > the quantile function of Dav

Re: [R] Query on finding root

2023-08-26 Thread J C Nash
Homework? On 2023-08-25 12:47, ASHLIN VARKEY wrote: Sir, I want to solve the equation Q(u)=mean, where Q(u) represents the quantile function. Here my Q(u)=(c*u^lamda1)/((1-u)^lamda2), which is the quantile function of Davies (Power-pareto) distribution. Hence I want to solve , *(c*u^lamda1)/((1

[R] Query on finding root

2023-08-26 Thread ASHLIN VARKEY
Sir, I want to solve the equation Q(u)=mean, where Q(u) represents the quantile function. Here my Q(u)=(c*u^lamda1)/((1-u)^lamda2), which is the quantile function of Davies (Power-pareto) distribution. Hence I want to solve , *(c*u^lamda1)/((1-u)^lamda2)=28353.7(Eq.1)* where lamda1=0.03399381,