s-news
[Top] [All Lists]

Re: Bootstrapping nls stops

To: "Ilouga, Pierre" <Pierre.Ilouga@evotec.com>
Subject: Re: Bootstrapping nls stops
From: Tim Hesterberg <TimHesterberg@gmail.com>
Date: Sun, 01 Feb 2009 18:31:02 -0800
Cc: <s-news@lists.biostat.wustl.edu>
In-reply-to: <98BC938D4C400844A6AC00C6952BD5230EE45E@Pegasus.germany.evotecoai.com> (Pierre.Ilouga@evotec.com)
References: <98BC938D4C400844A6AC00C6952BD5230EE45E@Pegasus.germany.evotecoai.com>
Reply-to: TimHesterberg@gmail.com (Tim Hesterberg)
Yes, you could use try().  Roughly:

boot.nLS <- bootstrap(DATA,  {
  result <- try(coef(eval(nLS.Object$call)))
  if(it was an error)
    rep(NA, the right length for a coef vector)
  else
    result
  })

Tim Hesterberg

>Dear all,
>
>I didn't  find an useful answer neither in the handbooks nor in the
>archive. The Problem I have is the following: How can I force the
>function "bootstrap" to calculate the statistic for ALL  B resamples
>even if a given bootstrap sample doesn't provide successfully a solution
>by using nls()?
>
>nLS.Object <- nls(...., data = DATA, start = list( .... ))
>was successfully calculated.
>boot.nLS <- bootstrap(DATA,  coef(eval(nLS.Object$call)), B=1000)
>stops after a few bootstrap samples.
>
>Is there something like try( .... )    which can be used in this
>situation?     
>
>
>Dr. Pierre Ilouga
>Screening Operations/Discovery Informatics
>EVOTEC AG
>Schnackenburgallee 114
>22525 Hamburg
>Germany
>
>
>S-PLUS : Copyright (c) 1988, 2002 Insightful Corp.
>S : Copyright Lucent Technologies, Inc.
>Version 6.1.2 Release 2 for Linux 2.2.12 : 2002
>
>S-PLUS : Copyright (c) 1988, 2007 Insightful Corp.
>S : Copyright Insightful Corp.
>Version 8.0.4  for Linux 2.4.21-37.EL, 64-bit : 2007
>
>
>Evotec AG Hamburg. Amtsgericht Hamburg HRB 68223
>Vorstand: Dr. Klaus Maleck und Dr. Mario Polywka
>Aufsichtsratsvorsitzender: Dr. Flemming Ornskov

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Bootstrapping nls stops, Tim Hesterberg <=