QL_demand: Quasilinear Demand Functions

View source: R/QL_demand.R

QL_demandR Documentation

Quasilinear Demand Functions

Description

Some quasilinear demand functions. The corresponding utility functions are as follows:
power: x1 + alpha * x2^beta, wherein alpha>0, 0<beta<1.
log: x1 + alpha * log(x2), wherein alpha>0.
quadratic1: x1 + alpha * x2 - 0.5 * beta * x2^2, wherein alpha>0, beta>0.
quadratic2: x1 + beta * (alpha * x2 - 0.5 * x2^2), wherein alpha>0, beta>0.
min: x1 + alpha * min(x2, beta), wherein alpha>0, beta>0.
CRRA: x1 + alpha * (x2^(1 - beta) - 1) / (1 - beta), wherein alpha>0, beta>0. If beta==1, the function becomes x1 + alpha * log(x2).

Usage

QL_demand(
  w,
  p,
  alpha,
  beta,
  type = c("power", "log", "quadratic1", "quadratic2", "min", "CRRA")
)

Arguments

w

a scalar indicating the income.

p

a 2-vector indicating the prices.

alpha

a scalar.

beta

a scalar.

type

a character string specifying the type of the function. The default type is "power". Other possible values are "log", "quadratic1", "quadratic2" and "min".

Value

A 2-by-1 matrix indicating demands.

Examples


QL_demand(w = 0.5, p = c(1, 1), alpha = 1, type = "log")
QL_demand(w = 2, p = c(1, 1), alpha = 1, type = "log")

QL_demand(w = 1, p = c(1, 5), alpha = 2, beta = 0.5)



GE documentation built on Nov. 8, 2023, 9:07 a.m.

Related to QL_demand in GE...