[R] how to restrict a parameter in optim()

2008-10-30 Thread Luis SAGAON TEYSSIER
Dear all, I'm trying to estimate some parameters with the optim() function but I need to restrict one parameter and I have not found how to do it. Could you help me please? my program is basically fn<-function(s) initial<-function(r) { cst<-r[1] cst1<-r[2] beta<-r[3] rho<-r[4] p1<-r[5] return

Re: [R] how to restrict a parameter in optim()

2008-10-29 Thread Ben Bolker
Luis SAGAON TEYSSIER etumel.univmed.fr> writes: > > Dear all, > > I'm trying to estimate some parameters with the optim() function but I > need to restrict one parameter and I have not found how to do it. > Could you help me please? Thought someone else would answer by now. use the arg

[R] how to restrict a parameter in optim()

2008-10-29 Thread Luis SAGAON TEYSSIER
Dear all, I'm trying to estimate some parameters with the optim() function but I need to restrict one parameter and I have not found how to do it. Could you help me please? my program is basically fn<-function(s) initial<-function(r) { cst<-r[1] cst1<-r[2] beta<-r[3] rho<-r[4] p1<-r[5] r