Code Monkey home page Code Monkey logo

pthelper_archive's Issues

Change the way the Bounce Criterion is defined

Currently, the bounce criterion calculates the number of items in which price Pn+1 > price Pn. It is this number that is then divided by the total number of items in the purchase task, minus the first item.

However, the Stein et al. criterion states that the subsequent prices should be compared to consumption at the first price (intensity), with only consumption 25% higher than consumption at first price being marked as a 'jump' in consumption.

This means that in some instances, the current bounce criterion was more restrictive than the criterion put forth by Stein et al., as it flagged small increases relative to the price immediately prior as a "jump" in consumption. This also means that individuals with small consumption at intensity who subsequently increase their consumption at higher price points, may be included whereas in the current method, they would not be. This can be altered by changing the formula by Stein et al., to flag any values higher than consumption at first price as a "jump".

Add delta Q calculation to pt_qc() function

The current pt_qc() function allows all participants to pass except those whose consumption at intensity (first price) is equal to consumption at the last price. This is equivalent to setting delta Q to a value that only removes those with a delta Q of 0. However, users of the package may want to set their own delta Q value, or including using the value suggested by Stein et al. which is 0.025.

Calculate reversals in consumption in-house

Currently, the package relies on the {beezdemand} package to calculate reversals. The next update will include our own in-house code for identifying and removing reversals from purchase task data.

Option to choose y-axis units

A request has been made to allow users to choose whether the y-axis is log10 transformed, or is left in its original units.

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.