

nordr(gnlm)                                  R Documentation

_N_o_n_l_i_n_e_a_r _O_r_d_i_n_a_l _R_e_g_r_e_s_s_i_o_n

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

     `nordr' fits arbitrary nonlinear regression functions
     (with logistic link) to ordinal response data by pro-
     portional odds, continuation ratio, or adjacent cate-
     gories.

     Nonlinear regression models can be supplied as formulae
     where parameters are unknowns. Factor variables cannot
     be used and parameters must be scalars. (See `fin-
     terp'.)

_U_s_a_g_e_:

     nordr(y, distribution="proportional", mu, linear=NULL, pmu,
             pintercept, wt=NULL, envir=sys.frame(sys.parent()),
             print.level=0, ndigit=10, gradtol=0.00001,
             steptol=0.00001, fscale=1, iterlim=100, typsiz=abs(p),
             stepmax=10*sqrt(p%*%p))

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

       y: A vector of ordinal responses, integers numbered
          from one to the maximum value.

distribution: The ordinal distribution: proportional odds,
          continuation ratio, or adjacent categories.

      mu: User-specified function of `pmu', and possibly
          `linear', giving the logistic regression equation.
          This must contain the first intercept. It may con-
          tain a linear part as the second argument to the
          function. It may also be a formula beginning with
          ~, specifying a logistic regression function for
          the location parameter, either a linear one using
          the Wilkinson and Rogers notation or a general
          function with named unknown parameters. If none is
          supplied, the location is taken to be constant
          unless the linear argument is given.

  linear: A formula beginning with ~, specifying the linear
          part of the logistic regression function.

     pmu: Vector of initial estimates for the regression
          parameters, including the first intercept. If `mu'
          is a formula with unknown parameters, their esti-
          mates must be supplied either in their order of
          appearance in the expression or in a named list.

pintercept: Vector of initial estimates for the contrasts
          with the first intercept parameter (difference in
          intercept for successive categories): two less
          than the number of different ordinal values.

      wt: Weight vector for use with contingency tables.

   envir: Environment in which model formulae are to be
          interpreted or a data object of class, repeated,
          tccov, or tvcov.  If `y' has class `repeated', it
          is used as the environment.

  others: Arguments controlling `nlm'.

_V_a_l_u_e_:

     A list of class nordr is returned.  The printed output
     includes the -log likelihood (not the deviance), the
     corresponding AIC, the maximum likelihood estimates,
     standard errors, and correlations. A list is returned
     that contains all of the relevant information calcu-
     lated, including error codes.

_A_u_t_h_o_r_(_s_)_:

     J.K. Lindsey

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

     # McCullagh (1980) JRSS B42, 109-142
     # Tonsil size: 2x3 contingency table
     y <- c(1:3,1:3)
     carrier <- c(rep(0,3),rep(1,3))
     carrierf <- gl(2,3,6)
     wt <- c(19,29,24,497,560,269)
     pmu <- c(-1,0.5)
     mu <- function(p) c(rep(p[1],3),rep(p[1]+p[2],3))
     # proportional odds
     # with mean function
     nordr(y, dist="prop", mu=mu, pmu=pmu, wt=wt, pintercept=1.5)
     # using Wilkinson and Rogers notation
     nordr(y, dist="prop", mu=~carrierf, pmu=pmu, wt=wt, pintercept=1.5)
     # using formula with unknowns
     nordr(y, dist="prop", mu=~b0+b1*carrier, pmu=pmu, wt=wt, pintercept=1.5)
     # continuation ratio
     nordr(y, dist="cont", mu=mu, pmu=pmu, wt=wt, pintercept=1.5)
     # adjacent categories
     nordr(y, dist="adj", mu=~carrierf, pmu=pmu, wt=wt, pintercept=1.5)

