[18694] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] nlregb() error message

daemon@ATHENA.MIT.EDU (Edit_2_Kurali@sbphrd.com)
Wed Jul 21 17:04:53 1999

From: Edit_2_Kurali@sbphrd.com
To: s-news@wubios.wustl.edu
Message-Id: <802567B5.00734752.00@uksmtp01.ha.uk.sbphrd.com>
Date: Wed, 21 Jul 1999 16:59:43 -0400
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


Dear SPLUS users,

This is my first attempt to use the nlregb() function to fit the 4
parameter logistic model
Y = D + (A-D)/(1+10^(B*(X-C)) with bounds on the A and D parameters.
The model should converge for the test data I'm using.
However, I get an error from nlregb():

Error in .Fortran("n2b1",: subroutine n2b1: 2 missing value(s) in argument
3
Dumped

Does anybody know what this error message means? Any hints would be
appreciated and will be summarized to the list.

This is my code:

test.data <- data.frame(LOGCONC=c(1.69897, 1.39794, 1.09691, 0.79588,
   0.49485, 0.19382, -0.10721, -0.4082344,
                    -0.7092755, -1.010283, -1.311313),
               VALUE=c(640, 3360, 16270, 33505, 56685, 65510, 66430, 76165,
   68700, 72055, 71775))

nlin.res <- function(par, y, x)    #residual function
        {denom <- 1+10^(par[2]*(x-par[3]))
          y - par[4] - (par[1]-par[4])/denom            }

nlin.jac <- function(par, y, x)    #jacobian function
        {temp <- 10^(par[2]*(x-par[3]))
         temp1 <- 1 + temp
         der.A <- 1/temp1
         der.B <- (par[4]-par[1])*temp*(x-par[3])*log(10)/temp1^2
         der.C <-   (par[1]-par[4])*temp*par[2]*log(10)/temp1^2
         der.D <- 1-1/temp1
         jac <- -cbind(der.A, der.B, der.C, der.D)
         dimnames(jac)[[2]] <- LETTERS[1:4]
         jac   }

init.vals <- c(2000, -1.166775, 0.2011877, 74110); names(init.vals <-
   LETTERS[1:4]

low.A <- .7*init.A; high.A <- 1.3*init.A
low.D <- .7*init.D; high.D <- 1.3*init.D
lower <- c(low.A, NA, NA, low.D); names(lower) <- LETTERS[1:4]
upper <- c(high.A, NA, NA, high.D); names(upper) <- LETTERS[1:4]

test.nl <- nlregb(nres=nrow(cmpd), start=init.vals, residuals = nlin.res,
   jacobian=nlin.jac,
             lower <- lower, upper=upper, y=test.data$VALUE,
   x=test.data$LOGCONC)

# Error in .Fortran("n2b1",: subroutine n2b1: 2 missing value(s) in
   argument 3
# Dumped

Best wishes,


Edit Kurali  <Edit_2_Kurali@sbphrd.com>
SmithKline Beecham Pharmaceuticals


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post