Fit a new response while reusing the geometry or operators in a supported
fitted object. R selects the method from the class of object.
Arguments
- object
A fitted MALPS, local polynomial lifting trend filter, synchronized lifting trend filter, metric graph low-pass, quadratic Hessian-energy, or Hessian L1 model.
- y
New response. MALPS and the two lifting trend filters accept a vector; Hessian L1 accepts one response; metric graph low-pass and quadratic Hessian methods also accept a matrix with one response per column. MALPS and both Hessian methods reuse the stored response when
yis omitted orNULL. The other methods requirey.- ...
Method-specific controls, described in the linked method help. Unrecognized arguments are errors.
Details
Refitting does not automatically repeat the original model selection:
malpsrefit.malpsreuses supports and averaging weights; accepts observationweights. Robust local residual weights, if used, are recomputed for the new response.lpl_tfrefit.lpl_tfreuses the residual operator and penalty, or accepts a new fixedlambda.slpl_tfrefit.slpl_tfreuses both operators and penalties, or accepts fixedlambda1andlambda2.metric.graph.lowpass.fitrefit.metric.graph.lowpass.fitreuses the spectral basis and smoothing parameter. Setper.column.gcv = TRUEto select a parameter for each response column.ssrhe.hessian.fitrefit.ssrhe.hessian.fitreuses the Hessian operator and fixed penalties, with optionallambda1,lambda2,weights, andridge. This also handles CV- and GCV-selected fits, retaining their selected penalties by default.ssrhe.hessian.l1.fitrefit.ssrhe.hessian.l1.fitreuses the derivative operator with fixed or CV-selected penalties; acceptslambda.grid,lambda.selection, and solver controls.
Use the original fitted object for repeated metric graph low-pass or quadratic Hessian refits: their refit results are summaries, not reusable input fits. Other supported families return reusable fitted objects.
Migration
The six former exported refit.*() functions are replaced by
refit(object, y, ...). Replace named fitted.model and
y.new arguments with object and y, respectively.
Method-specific controls and return classes are preserved. Call the
generic rather than an individual S3 method; the former help names remain
available for navigation.