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]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.