Hi everyone
During run a special package, I encounter this error
Error in if (func.lambda(lower, X2, df, b = bb) * func.lambda(l.upper, :
missing value where TRUE/FALSE needed
main Code is
RMSEAfun <- function (X2, df, N, CI)
{
bb <- (1 - CI)/2
lower <- 0
l.upper <- X2
u.upper <- max(N, X2 * 5)
if (func.lambda(lower, X2, df, b = bb) * func.lambda(l.upper,
X2, df, b = bb) > 0) {
l.lambda <- 0
}
else {
l.lambda <- uniroot(f = func.lambda, lower = lower, upper = l.upper,
X2 = X2, b = bb, df = df)$root
}
if (func.lambda(lower, X2, df, b = CI + bb) * func.lambda(u.upper,
X2, df, b = CI + bb) > 0) {
u.lambda <- 0
}
else {
u.lambda <- uniroot(f = func.lambda, lower = lower, upper = u.upper,
X2 = X2, b = CI + bb, df = df)$root
}
return(c(sqrt(l.lambda/(N * df)), sqrt(u.lambda/(N * df))))
}
How can i save my life?