[R] sporadic errors with nlrq() / optim()

About this list Date view Thread view Subject view Author view Attachment view

From: Rogers, James A [PGRD Groton] (James_A_Rogers@groton.pfizer.com)
Date: Fri 07 May 2004 - 07:04:05 EST


Message-id: <C735670CCC69D61193DA0002A58EE9900D7F51B5@groexmb07.pfizer.com>

Dear List,

Apologies if this is a known problem ... I wasn't able to find it on the bug
list, but it is a problem that does not seem to occur with a MAC build of R
2.0, so perhaps this problem has already been addressed for the future.

I am getting *sporadic* errors when refitting the same model to the same
data set, using nlrq() in the nlrq package. The algorithm is not stochastic,
so I would expect to get errors either every time, or never.

###

library(stats) # or library(nls) if using R < 1.9.0
library(nlrq)

test <- data.frame(x = c(7.60090245954208, 6.90775527898214,
6.21460809842219, 5.52146091786225, 4.60517018598809, 3.91202300542815,
3.2188758248682 , 2.52572864430826, 1.83258146374831, 7.60090245954208,
6.90775527898214, 6.21460809842219, 5.52146091786225, 4.60517018598809,
3.91202300542815, 3.2188758248682 , 2.52572864430826, 1.83258146374831,
6.21460809842219, 6.21460809842219),
                   y = c( 11.0161506644269, 9.84267541313937,
8.66146668057266, 7.48099216286952, 6.50578406012823, 6.24027584517077,
5.63121178182137, 5.71702770140622, 5.64190707093811, 10.8983676287705,
9.91857318995417, 8.74608021735751, 7.58120982619635, 6.361302477573 ,
5.91889385427315, 5.63835466933375 , 5.80211837537706, 5.64897423816121,
8.6195692580331 , 8.70367275835886)
                   )

i <- 1
while(i < 500) { # I usually hit an error within 50 iterations
  cat(i, "\n")
  nlrq(y ~ SSfpl(x, A, B, xmid, scal), data = test)
  i <- i + 1
}

###

Errors occur with version 1.8.1 and 1.9.0 on both Windows (two different
machines) and UNIX, but not on version 2.0 on a MAC (these are the only R
version - OS permutations I was able to get reports on easily).

Anyone understand what is happening here?

Thanks,
Jim

LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:08 EST