Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for survreg/summary.survreg #218

Merged
merged 1 commit into from Aug 10, 2015

Conversation

RomanTsegelskyi
Copy link
Contributor

Short demo:

> x <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist="exponential")
> pander(x)

Call:
survreg(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian, dist = "exponential")


------------------------------
 (Intercept)   ecog.ps    rx  
------------- --------- ------
    6.962      -0.4331  0.5815
------------------------------

Table: Coefficients


Scale fixed at 1 

----------------------------------------
 Loglik.model.   Loglik.intercept.only. 
--------------- ------------------------
     -97.2               -98.03         
----------------------------------------

Chisq= 1.668 on 2 degrees of freedom, p= 0.43 
n= 0 
> pander(summary(x, coefficients = TRUE))

Call:
survreg(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian, dist = "exponential")


--------------------------------------------------------
     &nbsp;        Value   Std. Error     z        p    
----------------- ------- ------------ ------- ---------
 **(Intercept)**  6.9618     1.322     5.2666  1.390e-07

   **ecog.ps**    -0.4331    0.587     -0.7379 4.606e-01

     **rx**       0.5815     0.587     0.9906  3.219e-01
--------------------------------------------------------

Table: Model statistics


Scale= 1 

----------------------------------------
 Loglik.model.   Loglik.intercept.only. 
--------------- ------------------------
     -97.2               -98.03         
----------------------------------------

Chisq= 1.668 on 2 degrees of freedom, p= 0.43 
Number of Newton-Raphson Iterations: _4_ 
n= 0 

@codecov-io
Copy link

Current coverage is 76.87%

Merging #218 into master will increase coverage by +0.31% as of 0b8fec5

Powered by Codecov. Updated on successful CI builds.

@@ -59,7 +59,7 @@ repChar <- function(x, n, sep = '')
#' @export
#' @author Aleksandar Blagotic
#' @references This function was moved from \code{rapport} package: \url{http://rapport-package.info}.
p <- function(x, wrap = panderOptions('p.wrap'), sep = panderOptions('p.sep'), copula = panderOptions('p.copula'), limit = Inf, keep.trailing.zeros = panderOptions('keep.trailing.zeros'), missing = panderOptions('missing')){ #nolint
p <- function(x, wrap = panderOptions('p.wrap'), sep = panderOptions('p.sep'), copula = panderOptions('p.copula'), limit = Inf, keep.trailing.zeros = panderOptions('keep.trailing.zeros'), missing = panderOptions('missing'), digits = panderOptions('digits'), round = panderOptions('round')){ #nolint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update, much cleaner

RomanTsegelskyi added a commit that referenced this pull request Aug 10, 2015
Added support for survreg/summary.survreg
@RomanTsegelskyi RomanTsegelskyi merged commit 32e81ad into Rapporter:master Aug 10, 2015
@RomanTsegelskyi RomanTsegelskyi deleted the survreg branch August 10, 2015 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants