Re: [R] optim function

From: R Granell, Medicine <Raquel.Granell_at_bristol.ac.uk>
Date: Thu 11 May 2006 - 22:25:18 EST

Thanks, Dimitris! I think it will help

Raquel

--On 11 May 2006 13:06 +0200 Dimitris Rizopoulos <dimitris.rizopoulos@med.kuleuven.be> wrote:

> probably you want to look at ?try; I hope it helps.
>
> Best,
> Dimitris
>
> ----
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School of Public Health
> Catholic University of Leuven
>
> Address: Kapucijnenvoer 35, Leuven, Belgium
> Tel: +32/(0)16/336899
> Fax: +32/(0)16/337015
> Web: http://www.med.kuleuven.be/biostat/
> http://www.student.kuleuven.be/~m0390867/dimitris.htm
>
>
>
> ----- Original Message ----- From: "R Granell, Medicine"
> <Raquel.Granell@bristol.ac.uk>
> To: <r-help@stat.math.ethz.ch>
> Sent: Thursday, May 11, 2006 12:18 PM
> Subject: [R] optim function
>
>
>> Hello,
>>
>> I want to use optim with simulated data.
>> My program generates a sample and then calls optim to optimise a
>> function
>> that depends on the generated sample.
>>
>> I want to do this with 100 samples. But optim does not 'work' for
>> the 100
>> samples, sometimes I get a message saying that sigma matrix was not
>> invertible and therefore the optimisation was not carried out, and
>> then my
>> program breaks.
>>
>> Is there any way to implement a condition to avoid this? I mean, how
>> can I
>> specify that if this is the case, ignore such sample and try with
>> the next
>> one.
>>
>> Many thanks for your help
>>
>> Raquel
>>
>> ______________________________________________
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>



Raquel Granell, Research Statistician

ALSPAC - Avon Longitudinal Study Parents and Children Department of Community Based Medicine
University of Bristol



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 11 22:29:58 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 12 May 2006 - 00:10:04 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.