Poisson Regression by Asymmetric Maximum Likelihood Estimation
amlpoisson.RdPoisson quantile regression estimated by maximizing an asymmetric likelihood function.
Arguments
- w.aml
Numeric, a vector of positive constants controlling the percentiles. The larger the value the larger the fitted percentile value (the proportion of points below the “w-regression plane”). The default value of unity results in the ordinary maximum likelihood (MLE) solution.
- parallel
If
w.amlhas more than one value then this argument allows the quantile curves to differ by the same amount as a function of the covariates. Setting this to beTRUEshould force the quantile curves to not cross (although they may not cross anyway). SeeCommonVGAMffArgumentsfor more information.- imethod
Integer, either 1 or 2 or 3. Initialization method. Choose another value if convergence fails.
- digw
Passed into
Roundas thedigitsargument for thew.amlvalues; used cosmetically for labelling.- link
See
poissonff.
Details
This method was proposed by Efron (1992) and full details can
be obtained there.
The model is essentially a Poisson regression model
(see poissonff) but the usual deviance is replaced by an
asymmetric squared error loss function; it is multiplied by
\(w.aml\) for positive residuals.
The solution is the set of regression coefficients that minimize the
sum of these deviance-type values over the data set, weighted by
the weights argument (so that it can contain frequencies).
Newton-Raphson estimation is used here.
Value
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm
and vgam.
References
Efron, B. (1991). Regression percentiles using asymmetric squared error loss. Statistica Sinica, 1, 93–125.
Efron, B. (1992). Poisson overdispersion estimates based on the method of asymmetric maximum likelihood. Journal of the American Statistical Association, 87, 98–107.
Koenker, R. and Bassett, G. (1978). Regression quantiles. Econometrica, 46, 33–50.
Newey, W. K. and Powell, J. L. (1987). Asymmetric least squares estimation and testing. Econometrica, 55, 819–847.
Note
On fitting, the extra slot has list components "w.aml"
and "percentile". The latter is the percent of observations
below the “w-regression plane”, which is the fitted values. Also,
the individual deviance values corresponding to each element of the
argument w.aml is stored in the extra slot.
For amlpoisson objects, methods functions for the generic
functions qtplot and cdf have not been written yet.
About the jargon, Newey and Powell (1987) used the name expectiles for regression surfaces obtained by asymmetric least squares. This was deliberate so as to distinguish them from the original regression quantiles of Koenker and Bassett (1978). Efron (1991) and Efron (1992) use the general name regression percentile to apply to all forms of asymmetric fitting. Although the asymmetric maximum likelihood method very nearly gives regression percentiles in the strictest sense for the normal and Poisson cases, the phrase quantile regression is used loosely in this VGAM documentation.
In this documentation the word quantile can often be interchangeably replaced by expectile (things are informal here).
Warning
If w.aml has more than one value then the value returned by
deviance is the sum of all the (weighted) deviances taken over
all the w.aml values.
See Equation (1.6) of Efron (1992).
See also
amlnormal,
amlbinomial,
extlogF1,
alaplace1.
Examples
set.seed(1234)
mydat <- data.frame(x = sort(runif(nn <- 200)))
mydat <- transform(mydat, y = rpois(nn, exp(0 - sin(8*x))))
(fit <- vgam(y ~ s(x), fam = amlpoisson(w.aml = c(0.02, 0.2, 1, 5, 50)),
mydat, trace = TRUE))
#> VGAM s.vam loop 1 : deviance = 1585.1076
#> VGAM s.vam loop 2 : deviance = 1373.0754
#> VGAM s.vam loop 3 : deviance = 1347.0821
#> VGAM s.vam loop 4 : deviance = 1334.2349
#> VGAM s.vam loop 5 : deviance = 1332.5501
#> VGAM s.vam loop 6 : deviance = 1332.1471
#> VGAM s.vam loop 7 : deviance = 1332.0551
#> VGAM s.vam loop 8 : deviance = 1332.0424
#> VGAM s.vam loop 9 : deviance = 1332.0419
#> VGAM s.vam loop 10 : deviance = 1332.0419
#>
#> Call:
#> vgam(formula = y ~ s(x), family = amlpoisson(w.aml = c(0.02,
#> 0.2, 1, 5, 50)), data = mydat, trace = TRUE)
#>
#>
#> Degrees of Freedom: 1000 Total; 975.76 Residual
#> Residual deviance: 1332.042
fit@extra
#> $w.aml
#> [1] 0.02 0.20 1.00 5.00 50.00
#>
#> $M
#> [1] 5
#>
#> $n
#> [1] 200
#>
#> $y.names
#> [1] "w.aml = 0.02" "w.aml = 0.2" "w.aml = 1" "w.aml = 5" "w.aml = 50"
#>
#> $individual
#> [1] TRUE
#>
#> $percentile
#> w.aml = 0.02 w.aml = 0.2 w.aml = 1 w.aml = 5 w.aml = 50
#> 41.5 48.0 62.5 75.0 92.5
#>
#> $deviance
#> w.aml = 0.02 w.aml = 0.2 w.aml = 1 w.aml = 5 w.aml = 50
#> 22.16971 96.51532 211.59585 374.49388 627.26714
#>
if (FALSE) { # \dontrun{
# Quantile plot
with(mydat, plot(x, jitter(y), col = "blue", las = 1, main =
paste(paste(round(fit@extra$percentile, digits = 1), collapse = ", "),
"percentile-expectile curves")))
with(mydat, matlines(x, fitted(fit), lwd = 2)) } # }