Coder Social home page Coder Social logo

mortfit's Introduction

mortfit

Fit mortality hazard models, with special attention to humans at old ages.

NOTES

  • 20160526 - this depends on the version of RcppFaddeeva that is on github and not the CRAN version. (The github version exports the Rcpp headers properly.) So it's necessary to

    install_github("baptiste/RcppFaddeeva@5fb5c32")

    in order to build this version

(NB: The issue opened by Tim Riffe on github has a solution)

To add a hazard function

Example steps used to create the Beard hazard object:

  • create mortalityhazard-beard.R

    • include code to create new mortalityHazard object
  • calculate

    1. hazard to probability function
    2. gradients
  • Using Sage, I produced C++ code to calculate (1) and (2) above. I put the results in mortalityhazard-beard.cpp. The function names are:

    • mortalityhazard_beard_cpp - calculates the mortality hazard, given params
    • mortalityhazard_to_prob_beard_cpp - given params and ages, calculates cond prob of death
    • mortalityhazard_beard_binomial_grad_cpp - calculates the gradient of the binomial likelihood
    • beard_partial_alpha_partI - calculates first part of gradient wrt alpha
    • beard_partial_alpha_partII - calculates second part of gradient wrt alpha
    • similar functions to calculate gradient wrt other params

mortfit's People

Contributors

dfeehan avatar

Stargazers

Josephbkt avatar  avatar Ugofilippo Basellini avatar Tim Riffe avatar

Watchers

 avatar

Forkers

yizigui vdilego

mortfit's Issues

add Remotes to DESCRIPTION

Hi! Looking forward to checking this out.

You can handle the github package dependency issue by adding to your DESCRIPTION file:
Remotes: baptiste/RcppFaddeeva
or similar (maybe the commit too if necessary).

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.