polr                  package:MASS                  R Documentation

_P_r_o_p_o_r_t_i_o_n_a_l _O_d_d_s _L_o_g_i_s_t_i_c _R_e_g_r_e_s_s_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Fits a proportional odd logistic regression model to an ordered
     factor response.

_U_s_a_g_e:

     polr(formula, data = NULL, weights, start, ..., subset,
          na.action = na.fail, contrasts = NULL, Hess = FALSE)

_A_r_g_u_m_e_n_t_s:

 formula: a formula expression as for regression models, of the form
          'response ~ predictors'. The response should be a factor
          (preferably an ordered factor), which will be interpreted as
          an ordinal response, with levels ordered as in the factor.  A
          proportional odds model will be fitted. The model must have
          an intercept: attempts to remove one will lead to a warning
          and be ignored. An offset may be used. See the documentation
          of 'formula' for other details. 

    data: an optional data frame in which to interpret the variables
          occurring in 'formula'. 

 weights: optional case weights in fitting.  Default to 1. 

   start: initial values for the parameters. 

     ...: additional arguments to be passed to 'optim', most often a
          'control' argument. 

  subset: expression saying which subset of the rows of the data should
           be used in the fit. All observations are included by
          default. 

na.action: a function to filter missing data. 

contrasts: a list of contrasts to be used for some or all of the
          factors appearing as variables in the model formula. 

    Hess: logical for whether the Hessian (the observed information
          matrix) should be returned. 

_V_a_l_u_e:

     A object of class '"polr"'.

coefficients: the coefficients of the linear predictor. 

    zeta: the intercepts for the class boundaries. 

deviance: the residual deviance. 

fitted.values: a matrix, with a column for each level of the response. 

     lev: the names of the response levels. 

   terms: the 'terms' structure describing the model. 

df.residual: the number of residual degrees of freedoms, calculated
          using the weights. 

     edf: the (effective) number of degrees of freedom used by the
          model 

       n: the (effective) number of observations,  calculated using the
          weights 

    call: the matched call. 

convergence: the convergence code returned by 'optim'. 

   niter: the number of function and gradient evaluations used by
          'optim'. 

 Hessian: (if 'Hess' is true). 

_R_e_f_e_r_e_n_c_e_s:

     Venables, W. N. and Ripley, B. D. (2002) _Modern Applied
     Statistics with S._ Fourth edition.  Springer.

_S_e_e _A_l_s_o:

     'optim', 'glm', 'multinom'.

_E_x_a_m_p_l_e_s:

     options(contrasts = c("contr.treatment", "contr.poly"))
     house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
     house.plr
     summary(house.plr)
     predict(house.plr, housing, type = "p")
     addterm(house.plr, ~.^2, test = "Chisq")
     house.plr2 <- stepAIC(house.plr, ~.^2)
     house.plr2$anova

