lqnorm                 package:VGAM                 R Documentation

_M_i_n_i_m_i_z_i_n_g _t_h_e _L-_q _n_o_r_m _F_a_m_i_l_y _F_u_n_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Minimizes the L-q norm of residuals in a linear model.

_U_s_a_g_e:

     lqnorm(qpower=2, link="identity", earg=list(),
            method.init=1, imu=NULL, shrinkage.init=0.95)

_A_r_g_u_m_e_n_t_s:

  qpower: A single numeric, must be greater than one, called q below.
          The absolute value of residuals are raised to the power of
          this argument, and then summed. This quantity is minimized
          with respect to the regression coefficients.

link, earg: Link function applied to the `mean' mu, and extra argument
          optionally used by the link function. See 'Links' for more
          details.

method.init: Must be 1, 2 or 3. See 'CommonVGAMffArguments' for more
          information. Ignored if 'imu' is specified.

     imu: Numeric, optional initial values used for the fitted values.
          The default is to use 'method.init=1'.

shrinkage.init: How much shrinkage is used when initializing the fitted
          values. The value must be between 0 and 1 inclusive, and a
          value of 0 means the individual response values are used, and
          a value of 1 means the median or mean is used. This argument
          is used in conjunction with 'method.init=3'.

_D_e_t_a_i_l_s:

     This function minimizes the objective function

                 sum_{i=1}^n    w_i (|y_i -  mu_i|)^q

     where q is the argument 'qpower', eta_i = g(mu_i) where g is the
     link function, and eta_i is the vector of linear/additive
     predictors. The prior weights w_i can be inputted using the
     'weights' argument of 'vlm'/'vglm'/'vgam' etc.; it should be just
     a vector here since this function handles only a single vector or
     one-column response.

     Numerical problem will occur when q is too close to one. Probably
     reasonable values range from 1.5 and up, say. The value q=2
     corresponds to ordinary least squares while q=1 corresponds to the
     MLE of a double exponential (Laplace) distibution. The procedure
     becomes more sensitive to outliers the larger the value of q.

_V_a_l_u_e:

     An object of class '"vglmff"' (see 'vglmff-class'). The object is
     used by modelling functions such as 'vglm', and 'vgam'.

_W_a_r_n_i_n_g:

     Convergence failure is common, therefore the user is advised to be
     cautious and monitor convergence!

_N_o_t_e:

     This 'VGAM' family function is an initial attempt to provide a
     more robust alternative for regression and/or offer a little more
     flexibility than least squares. The '@misc' slot of the fitted
     object contains a list component called 'objectiveFunction' which
     is the value of the objective function at the final iteration.

_A_u_t_h_o_r(_s):

     Thomas W. Yee

_R_e_f_e_r_e_n_c_e_s:

     Yee, T. W. and Wild, C. J. (1996) Vector generalized additive
     models. _Journal of the Royal Statistical Society, Series B,
     Methodological_, *58*, 481-493.

_S_e_e _A_l_s_o:

     'gaussianff'.

_E_x_a_m_p_l_e_s:

     set.seed(123)
     d = data.frame(x = sort(runif(n <- 10 )))
     realfun = function(x) 4 + 5*x
     d = transform(d, y = realfun(x) + rnorm(n, sd=exp(1)))
     # Make the first observation an outlier
     d = transform(d, y = c(4*y[1], y[-1]), x=c(-1, x[-1]))
     fit = vglm(y ~ x, fam = lqnorm(qpower=1.2), data=d)
     coef(fit, matrix=TRUE)
     head(fitted(fit))
     fit@misc$qpower 
     fit@misc$objectiveFunction 

     ## Not run: 
     # Graphical check
     with(d, plot(x, y, main=paste("LS=red, lqnorm=blue (qpower = ",
                  fit@misc$qpower, "), truth=black", sep=""), col="blue"))
     it = lm(y ~ x, data=d)
     with(d, lines(x, fitted(fit), col="blue"))
     with(d, lines(x,   it$fitted, col="red"))
     with(d, lines(x, realfun(x),  col="black"))
     ## End(Not run)

