~ubuntu-branches/ubuntu/trusty/r-cran-rms/trusty-proposed

« back to all changes in this revision

Viewing changes to R/rmsMisc.s

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2014-01-22 14:16:13 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20140122141613-frc51dglkjfisik0
Tags: 4.1-1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
  if(missing(lp)) return(fit$deviance[length(fit$deviance)])
130
130
  ns <- fit$non.slopes
131
131
  if(ns > 1) stop('ordinal y case not implemented')
132
 
  y <- as.integer(as.category(y)) - 1
 
132
  y <- as.integer(as.factor(y)) - 1
133
133
  s <- !is.na(lp + y)
134
134
  lp <- lp[s];  y <- y[s]
135
135
  p <- plogis(lp)
573
573
      if(length(at$limits))
574
574
        {
575
575
          m <- match(at$limits[[n]], at$parms[[n]])
576
 
          if(is.category(at$limits[[n]]))
 
576
          if(is.factor(at$limits[[n]]))
577
577
            attr(at$limits[[n]],'levels') <- levs
578
578
          else
579
579
            at$limits[[n]] <- levs[m]