Many thanks Ellison
I have modified it as you suggested but I have this error message <<>> 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 <- qt((1-p),df=df1,ncp=ncp1)*(1/sqrt(2))
return(test)
}
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
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.
Hi all
Dear all,
I need to compute boundaries for 3 stages group sequential design with 2
variables using Simpson’s integration method.
There is a r program written by Michael A. Proschant et Al. (2006)
(Statistical Monitoring of Clinical Trials: A Unified Approach) – see file
attached – to calc
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 fu
5 matches
Mail list logo