scaleFit {profileModel} | R Documentation |
Scales the estimates of a fitted object. Each column of the model matrix is divided by the maximum absolute value of the column and the model is re-fitted using the new model matrix.
scaleFit(fitted)
fitted |
a glm -like fitted object with linear
predictor that supports the method model.matrix . |
scale.fit
should only be used when the inferences using the
model that fitted
corresponds to, are invariant on the scale
of the parameters (e.g. a GLM). In other words, scaleFit
should
only affect the estimated parameters and not the fit and the
inferences made.
An object of the same class as fitted
.
Causes creation of the matrix .the.scaled.
and the vector
.the.offs.
in the global environment if they do not already
exist, otherwise their values are updated. This is done in order to
ensure that the fitting procedure that resulted fitted
will
find these quantities.
Ioannis Kosmidis <I.Kosmidis@warwick.ac.uk>
## Begin Example y <- rpois(100,1) x <- rnorm(100,0,0.2)*1e+6 m1 <- glm(y ~ -1 + x, family = poisson) m2 <- scaleFit(m1) ## m1 and m2 are the same fits but on a different scale sum(abs(m1$fitted-m2$fitted)) ## End Example