[R] NLME and limits on parameter space

Karsten D Bjerre kdb at kvl.dk
Wed Dec 10 12:16:17 CET 2003


Dear R-users,

How can I impose limits on parameter estimates in NLME as indicated in
the second #'ed line below? 

Can I use the naPattern, some thing like this:  
       nlme(response = yftp(x,ii,cc,b,dd),... , naPattern=
is.na(response) ) ?

yftp<-function(x,ii,cc,b,d){
  tpx<-tpx(ii,cc,b)    # x value for top point of 2nd order polonomial
  tpy<-tpy(ii,cc,b)
  #  if (ii<0 || ii>1 || cc<0|| cc>1|| b<0) {print(NA); return(NA)}
  return( (ii+b*x)*(cc-x)*(x<=tpx) + tpy*(x>tpx)+ d*x)
}

Best whishes,
Karsten




More information about the R-help mailing list