check_df | R Documentation |
Checks if non-empty groups have enough data for spline fit degrees of freedom.
check_df(group, loss, data, maxdf)
group |
An integer vector of group membership for each id. |
loss |
A matrix with rows of computed loss values of each id across all models as columns. |
data |
A data.table with data. See |
maxdf |
Fitting parameters. See |
When a group has insufficient data for maxdf
, its nearest model loss
values are set to Inf
, and new nearest model is assigned. The check
repeats until all groups have sufficient data.
Returns the vector of group membership of id's either unchanged or changed to have sufficient data in non-zero groups.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.