Re: [R] Uniroot error message with in intergration

2012-06-23 Thread jeka12386
Many thanks Ellison I have modified it as you suggested but I have this error message Error in f(lower, ...) : unused argument(s) (N = 54) I am not sure which arguments I have missed? *y - function(t,n){ diff - 0.5 df1 - 2*n-2 ncp1 - sqrt((diff^2*n)/2) p - 1- pt(t,df=df1) test -

[R] Uniroot error message with in intergration

2012-06-22 Thread jeka12386
Dear all I am trying to calculate the value of n using uniroot. Here is the message I am having: Error in uniroot(integ, lower = 0, upper = 1000, n) : 'interval' must be a vector of length 2 Please would you be able to give me an indication on why I am having this error message. Many

Re: [R] Uniroot error message with in intergration

2012-06-22 Thread R. Michael Weylandt
On Fri, Jun 22, 2012 at 4:00 PM, jeka12386 jeka12...@hotmail.co.uk wrote: Dear all I am trying to calculate the value of n using uniroot.  Here is the message I am having: Error in uniroot(integ, lower = 0, upper = 1000, n) :  'interval' must be a vector of length 2 Please  would you

Re: [R] Uniroot error message with in intergration

2012-06-22 Thread jeka12386
I have defined t at the beginning of my query. I have added n on uniroot below and still getting the same error message uniroot(integ,lower=0,upper=1000,n) -- View this message in context: http://r.789695.n4.nabble.com/Uniroot-error-message-with-in-intergration-tp4634247p4634264.html Sent

Re: [R] Uniroot error message with in intergration

2012-06-22 Thread S Ellison
Error in uniroot(integ, lower = 0, upper = 1000, n) : 'interval' must be a vector of length 2 Please would you be able to give me an indication on why I am having this error message. Because uniroot has a second parameter called 'interval' which overrides lower and upper and you have

[R] Uniroot error

2012-04-07 Thread jeka12386
Dear All I am trying to find a uniroot of a function within another function (see example) but I am getting an error message (f()values at end points not of opposite sign). I was wondering if you would be able to advise how redefine my function so that I can find the solution. In short my first

Re: [R] Uniroot error

2012-04-07 Thread Berend Hasselman
On 07-04-2012, at 19:48, jeka12386 wrote: Dear All I am trying to find a uniroot of a function within another function (see example) but I am getting an error message (f()values at end points not of opposite sign). I was wondering if you would be able to advise how redefine my function so

[R] Uniroot - error

2011-05-06 Thread CarJabo
Hi, I have tried to use uniroot to solve a value (value a in my function) that gives f=0, and I repeat this process for 1 times(stimulations). However error occures from the 4625th stimulation - Error in uniroot(f, c(0, 2), maxiter = 1000, tol = 0.001) : f() values at end points not of

Re: [R] Uniroot - error

2011-05-06 Thread Duncan Murdoch
You should ask your instructor or teaching assistant for help. R-help is not for doing homework. Duncan Murdoch On 06/05/2011 9:00 AM, CarJabo wrote: Hi, I have tried to use uniroot to solve a value (value a in my function) that gives f=0, and I repeat this process for 1

Re: [R] Uniroot - error

2011-05-06 Thread CarJabo
sorry I am not asking someone to do my homework, as I have finished all the procedure. I am just wondering why this technical error occurs, so I can fix it myself. By the way i don't have any instructor or teaching assistant for help, so any suggestion for the error will be appreciated. Thanks

Re: [R] Uniroot - error

2011-05-06 Thread Joshua Wiley
On Fri, May 6, 2011 at 6:33 AM, CarJabo carly_...@hellokitty.com wrote: sorry I am not asking someone to do my homework, as I have finished all the procedure. I am just wondering why this technical error occurs, so I can fix it myself. My guess would be it has something to do with the random