A batch utility for the fitBB
function, to fit the model for each group in a dataframe.
fitBBs(data, group, ...)
data | Input dataframe, containing all variables needed to fit the model. |
---|---|
group | Name of the grouping variable in the dataframe (quoted), the model will be fit for each group defined by this variable. |
… | Further parameters passed to |
# NOT RUN { # If you have a factor variable in your dataset called 'species', and you # want to fit the Ball-Berry model for each of the species: myfits <- fitBBs(mydata, "species", model="BallBerry") # A dataframe with coefficients is returned by coef() coef(myfits) # }