Description Usage Arguments Value Author(s) References See Also Examples
Evaluate the weights for a given GLM model
1 2 3 4 5 | wle.glm.weights(y, x, fitted.values, family = gaussian(),
dispersion = 1, raf = "GKL", tau = 0.1, smooth = NULL,
asy.smooth=0.031, window.size = NULL, use.asymptotic = NULL,
use.smooth=TRUE, tol=10^(-6), dist.method = "euclidean",
cutpoint = 0, powerdown = 1)
|
y |
|
x |
|
fitted.values |
the fitted mean values, obtained by transforming the linear predictors
by the inverse of the link function. Often obtain as a result of
|
family |
a description of the error distribution and link
function to be used in the model. This can be a character string
naming a family function, a family function or the result of a call
to a family function. (See |
dispersion |
value of the dispersion parameter. Used only in the Gamma family for now. |
raf |
type of Residual adjustment function to be used:
|
tau |
positive real. Used in selecting the member of the RAF family in the
case of |
smooth |
the value of the smoothing parameter; used in the case of continuous models. |
asy.smooth |
the value of the smoothing parameter; used in the evaluation of asymptotic weights. |
window.size |
positive real or |
use.asymptotic |
interger or |
use.smooth |
if |
tol |
the tolerance used in the numerical calculations. For now, the option is used only for the Gamma family. |
dist.method |
distance method passed to |
cutpoint |
a value in the interval [0,1]. |
powerdown |
a non negative number. |
A list with two components
weights |
the weights associated to the observations. |
asy |
logical. If |
Claudio Agostinelli and Fatemah Al-quallaf
Agostinelli, C. and Al-quallaf, F. (2009) Robust inference in Generalized Linear Models. Manuscript in preparation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # tau=0.1
wgr.D93 <- extractRoot(wle.glm.D93)
# tau=0.2
w1wgr.D93 <- wle.glm.weights(y = wgr.D93$y, x = wgr.D93$x,
fitted.values = wgr.D93$fitted.values, family = wgr.D93$family,
raf = "GKL", tau = 0.2, smooth = 0.031, window.size = NULL,
use.asymptotic = NULL, dist.method = "euclidean")
# tau=0.3
w2wgr.D93 <- wle.glm.weights(y = wgr.D93$y, x = wgr.D93$x,
fitted.values = wgr.D93$fitted.values, family = wgr.D93$family,
raf = "GKL", tau = 0.3, smooth = 0.031, window.size = NULL,
use.asymptotic = NULL, dist.method = "euclidean")
plot(wgr.D93$wle.weights, ylim=c(0,1), ylab='Weights')
points(w1wgr.D93$weights, col=2)
points(w2wgr.D93$weights, col=3)
legend('bottomright', legend=expression(tau==0.1, tau==0.2, tau==0.3),
pch=rep(1,3), col=1:3, inset=0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.