Giter Site home page Giter Site logo

cran / btyd Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 37.0 2.01 MB

:exclamation: This is a read-only mirror of the CRAN R package repository. BTYD — Implementing BTYD Models with the Log Sum Exp Patch Report bugs for this package: https://github.com/ghuiber/BTYD/issues

R 19.85% HTML 80.15%

btyd's Introduction

BTYD 2.4.2

A patch for the pnbd.LL() function in the original BTYD package, first proposed by Theo Strinopoulos. Now on CRAN, so you can get it the usual way, with install.packages().

Justification

In its original version the Pareto/NBD (pnbd) part of the BTYD package failed for me, as it did for Theo, for reasons he explained here. So, I implemented his fix, rebuilt from source, and then it worked. This is the short version. The long version is that in the process of implementing the fix I made some changes to the choice of optimization routine (now using optimx as opposed to optim), Gaussian hypergeometric (now you have the option of using the hypergeo package) and I found some opportunities for refactoring functions defined in both the pnbd and the bgnbd (Beta-Geometric Negative Binomial) groups. I explained these changes are explained in separate documentation (fix_pnbd.html). Finally, I rebuilt BTYD and checked that it would return the same numbers as BTYD 2.4 did when running the examples in the original BTYD vignette (see threeway_walkthrough.R).

How to install from here

First git clone.

If you use devtools, then at the R console just call document(); build(); install(build_vignettes = TRUE). Done.

Otherwise, build the standard way in two steps:

  1. At the command line, build and check the source tarball:
R CMD build BTYD
R CMD check BTYD_2.4.2.tar.gz
  1. Then, at the R console, install it:
install.packages("BTYD2_2.4.2.tar.gz", repos = NULL, type = "source")
# works only in RStudio:
.rs.restartR()

btyd's People

Contributors

ghuiber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.