{"action":"created","issue":{"url":"https://api.github.com/repos/dgrtwo/broom/issues/30","repository_url":"https://api.github.com/repos/dgrtwo/broom","labels_url":"https://api.github.com/repos/dgrtwo/broom/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/dgrtwo/broom/issues/30/comments","events_url":"https://api.github.com/repos/dgrtwo/broom/issues/30/events","html_url":"https://github.com/dgrtwo/broom/issues/30","id":59350154,"number":30,"title":"tidy output for rms models","user":{"login":"sumprain","id":6816906,"avatar_url":"https://avatars.githubusercontent.com/u/6816906?v=3","gravatar_id":"","url":"https://api.github.com/users/sumprain","html_url":"https://github.com/sumprain","followers_url":"https://api.github.com/users/sumprain/followers","following_url":"https://api.github.com/users/sumprain/following{/other_user}","gists_url":"https://api.github.com/users/sumprain/gists{/gist_id}","starred_url":"https://api.github.com/users/sumprain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumprain/subscriptions","organizations_url":"https://api.github.com/users/sumprain/orgs","repos_url":"https://api.github.com/users/sumprain/repos","events_url":"https://api.github.com/users/sumprain/events{/privacy}","received_events_url":"https://api.github.com/users/sumprain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dgrtwo","id":994718,"avatar_url":"https://avatars.githubusercontent.com/u/994718?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrtwo","html_url":"https://github.com/dgrtwo","followers_url":"https://api.github.com/users/dgrtwo/followers","following_url":"https://api.github.com/users/dgrtwo/following{/other_user}","gists_url":"https://api.github.com/users/dgrtwo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrtwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrtwo/subscriptions","organizations_url":"https://api.github.com/users/dgrtwo/orgs","repos_url":"https://api.github.com/users/dgrtwo/repos","events_url":"https://api.github.com/users/dgrtwo/events{/privacy}","received_events_url":"https://api.github.com/users/dgrtwo/received_events","type":"User","site_admin":false},"assignees":[{"login":"dgrtwo","id":994718,"avatar_url":"https://avatars.githubusercontent.com/u/994718?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrtwo","html_url":"https://github.com/dgrtwo","followers_url":"https://api.github.com/users/dgrtwo/followers","following_url":"https://api.github.com/users/dgrtwo/following{/other_user}","gists_url":"https://api.github.com/users/dgrtwo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrtwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrtwo/subscriptions","organizations_url":"https://api.github.com/users/dgrtwo/orgs","repos_url":"https://api.github.com/users/dgrtwo/repos","events_url":"https://api.github.com/users/dgrtwo/events{/privacy}","received_events_url":"https://api.github.com/users/dgrtwo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2015-02-28T17:39:44Z","updated_at":"2016-06-30T00:30:55Z","closed_at":null,"body":"It will be nice if broom functions can be applied to rms class models from frank harrell's [rms](http://cran.r-project.org/package=rms) package.  It is a pivotal package providing fantastic summary functions in the field of clinical prediction modelling.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/dgrtwo/broom/issues/comments/229528589","html_url":"https://github.com/dgrtwo/broom/issues/30#issuecomment-229528589","issue_url":"https://api.github.com/repos/dgrtwo/broom/issues/30","id":229528589,"user":{"login":"nutterb","id":1848445,"avatar_url":"https://avatars.githubusercontent.com/u/1848445?v=3","gravatar_id":"","url":"https://api.github.com/users/nutterb","html_url":"https://github.com/nutterb","followers_url":"https://api.github.com/users/nutterb/followers","following_url":"https://api.github.com/users/nutterb/following{/other_user}","gists_url":"https://api.github.com/users/nutterb/gists{/gist_id}","starred_url":"https://api.github.com/users/nutterb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nutterb/subscriptions","organizations_url":"https://api.github.com/users/nutterb/orgs","repos_url":"https://api.github.com/users/nutterb/repos","events_url":"https://api.github.com/users/nutterb/events{/privacy}","received_events_url":"https://api.github.com/users/nutterb/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T00:30:55Z","updated_at":"2016-06-30T00:30:55Z","body":"Before I submit this pull request, I want to ask an intelligent question this time:\r\n\r\nI put together tidiers for `ols`, `lrm`, `cph`, `summary.rms`, and `validate`.  I also have a `glance.rms` method defined (all located in my fork)\r\n\r\nIf you use the code below for an example of the `summary.rms` output, I'm not sure that the way I've constructed it is particularly palatable (and arguably not tidy).  Do you have any feedback on how this should look in the summaries when there are Hazard Ratios (or Odds Ratios) present? My source of dissatisfaction is the `term` column.  I have similar misgivings about the `tidy.anova.rms` output.\r\n\r\n```r\r\nlibrary(rms)\r\nn <- 1000\r\nset.seed(731)\r\nDF <- data.frame(\r\n    age = 50 + 12*rnorm(1000),\r\n    sex = factor(sample(c('Male','Female'), 1000, \r\n                        rep=TRUE, prob=c(.6, .4))),\r\n    cens = 15*runif(1000)\r\n)\r\n\r\nh <- .02*exp(.04*(DF$age-50)+.8*(DF$sex=='Female'))\r\nDF$dt = -log(runif(1000) / h)\r\nDF$e <- ifelse(DF$dt <= DF$cens,1,0)\r\nDF$dt <- pmin(DF$dt, DF$cens)\r\n\r\nfit <- cph(Surv(dt, e) ~ rcs(age,4) + sex, data = DF, \r\n           x=TRUE, y=TRUE, surv = TRUE)\r\ntidy(fit)\r\ntidy(anova(fit))\r\nglance(fit)\r\n\r\ndd <- datadist(DF)\r\noptions(datadist = 'dd')\r\ntidy(summary(fit))\r\n```\r\n\r\n### Output of tidied summary object\r\n\r\n```\r\n                            term      low     high     diff     effect\r\n1                            age 40.87213 57.38464 16.51252 -0.3966150\r\n2               age-Hazard Ratio 40.87213 57.38464 16.51252  0.6725929\r\n3              sex - Female:Male  2.00000  1.00000       NA -0.6759644\r\n4 sex - Female:Male-Hazard Ratio  2.00000  1.00000       NA  0.5086656\r\n   std.error   conf.low  conf.high type\r\n1 0.08479186 -0.5628040 -0.2304260    1\r\n2         NA  0.5696096  0.7941952    2\r\n3 0.06612014 -0.8055575 -0.5463713    1\r\n4         NA  0.4468387  0.5790472    2\r\n```"}}
{"actor":{"display_login":"nutterb"}}