All,

This worked:

mBW <- function( ... ) ...  # matrix-valued function 
BaconWatts <- function(formula,
                       mmf=mBW,    # model matrix function(x, bp, g)
                       data, plot=T, tau=0.5 )
{
  ... 
   m.nl <- nlrq(y ~ b0 + mBW(x,bp,g) %*% c(b1,b2), tau=tau, start=par0, 
trace=T )$m
   ...
} 


For some reason the following reports a failure to find the function mmf()

mBW <- function( ... ) ...

BaconWatts <- function(formula,
                       mmf=mBW,    # model matrix function(x, bp, g)
                       data, plot=T, tau=0.5 )
{
  ... 
   m.nl <- nlrq(y ~ b0 + mmf(x,bp,g) %*% c(b1,b2), tau=tau, start=par0, 
trace=T )$m
   ...
} 

It doesn't help to define functions mmf() or mBW() inside BaconWatts.





	[[alternative HTML version deleted]]

