Giter Site home page Giter Site logo

trinhdhk / eventglm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sachsmc/eventglm

0.0 0.0 0.0 1.91 MB

Regression Models for Event History Outcomes

Home Page: https://sachsmc.github.io/eventglm

License: GNU General Public License v3.0

C 6.18% R 83.52% TeX 10.30%

eventglm's Introduction

CRAN Status Travis build status

eventglm: Regression Models for Event History Outcomes

A user friendly, easy to understand way of doing event history regression for marginal estimands of interest, including the cumulative incidence and the restricted mean survival, using the pseudo observation framework for estimation. The interface uses the well known formulation of a generalized linear model and allows for features including plotting of residuals, the use of sampling weights, and corrected variance estimation.

Development status

This package is in stable development. The interface is unlikely to have major changes at this time. New features may be added or changed over time.

Installation

install.packages("eventglm")
remotes::install_github("sachsmc/eventglm")

Usage

The main functions users will use are cumincglm and rmeanglm. These are generalized linear regression models for the cumulative incidence and restricted mean of a censored time to event outcome, with or without competing risks. The models are specified just like glm, but the outcome must be a call to Surv (like in coxph), and you must specify the time argument (the fixed time at which the cumulative incidence or restricted mean is computed).

library(eventglm)

colon.cifit <- cumincglm(Surv(time, status) ~ rx, time = 2500, data = colon)
summary(colon.cifit)
se.ci <- sqrt(diag(vcov(colon.cifit, type = "robust")))
b.ci <- coefficients(colon.cifit)

Check out the vignettes for more examples and details.

References

Sachs MC, Gabriel EE (2022). “Event History Regression with Pseudo-Observations: Computational Approaches and an Implementation in R.” Journal of Statistical Software, 102(9), 1-34. doi: 10.18637/jss.v102.i09 (URL: https://doi.org/10.18637/jss.v102.i09).

Per Kragh Andersen and Maja Pohar Perme. Pseudo-observations in survival analysis. Statistical Methods in Medical Research, 19(1):71–99, February 2010. doi: 10.1177/0962280209105020 (URL: http://journals.sagepub.com/doi/10.1177/0962280209105020)

eventglm's People

Contributors

sachsmc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.