reweight

0th

Percentile

Re-fitting Models with New Weights

Generic function for re-fitting a model object using the same observations but different weights.

Keywords
regression
Usage
reweight(object, weights, ...)
Arguments
object
a fitted model object.
weights
a vector of weights.
...
arguments passed to methods.
Details

The method is not unsimilar in spirit to update, but much more narrowly focused. It should return an updated fitted model derived from re-fitting the model on the same observations but using different weights.

Value

  • The re-weighted fitted model object.

See Also

update

Aliases
  • reweight
  • reweight.linearModel
  • reweight.glinearModel
Examples
## fit cars regression
  mf <- dpp(linearModel, dist ~ speed, data = cars)
  fm <- fit(linearModel, mf)
  fm
  
  ## re-fit, excluding the last 4 observations
  ww <- c(rep(1, 46), rep(0, 4))
  reweight(fm, ww)
Documentation reproduced from package party, version 0.9-4, License: GPL

Community examples

Looks like there are no examples yet.