soda_cost: Compute soda cost points

View source: R/prices_scores.R

soda_costR Documentation

Compute soda cost points

Description

This function takes in the cost of healthier and regular soda and compares them to return a NEMS-S score for the cost.

Usage

soda_cost(diet_soda_price, regular_soda_price)

Arguments

diet_soda_price

The price of regular soda.

regular_soda_price

The price of healthier soda.

Details

This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Diet soda" has 0 kcal per serving.

Value

The NEMS_S points associated with soda price.

Examples

diet_soda_price <- rnorm(10,4.1,.5)
regular_soda_price <- rnorm(10,4.1,.3)

byu-transpolab/nemsr documentation built on Feb. 10, 2023, 11:24 p.m.