a data frame, row subsets of which will be used as the
data argument to fitfun.
by
names of columns in x that will be used to define the
subgroups.
fit.on
a logical vector indicating which rows of x are
to be used to fit the model (like the subset argument in a
lot of other functions). Can be
given in terms of variables in x
fitfun
a model fitting function (e.g. lm, nls). More
specifically, a function that expects at least a formula object (as the
first argument) and a data.frame object (passed as an argument named
data) and
returns a model object for which a coef method
has been defined (e.g. coef.lm, coef.nls) to extract fit values of
model parameters.
keep.unused.levels
Include rows in output for all unique values
of by, even those which were excluded by
fit.on. The default value TRUE should be left alone
if you are going to go on to pass the result to backFit.
byvar.sep
passed to frameApply, used to form the
subsets of the data.
...
other arguments to pass to fitfun.
Value
a data frame with a row for each unique row of x[by], and
column for each model paramter, as well as columns specified in by.