Learn R Programming

EconDemand (version 1.0)

DemandQuantity: Quantity and General Propeties Given Price

Description

Finds the quantities (outputs) and returns general propeties when prices are given of various economics demand systems including Linear, Translog, CES, LES and CREMR.

Usage

DemandQuantity(p, parameter, method, Plot, message)

Arguments

p
the price vector
parameter
the parameters of the economics demand system. When choosing CREMR demand, it should be three dimensional, otherwise it should be two dimensional.
method
the demand function used, can be one of Linear, Translog, CES, LES and CREMR
Plot
a logical value indicating whether the manifold should be plotted
message
a logical value indicating whether an important message about the computed quantity should be printed

Value

quantity
the computed quantity
sales
the total sales (revenues)
elasticity
the elasticity of demand
convexity
the convexity of demand
marginal.revenue
the marginal revenues

Examples

Run this code
#Set price vector
price<-c(1,1.1,1.2)
#Use Linear Demand Function
X<-DemandQuantity(price,c(10,0.5), "Linear", Plot=TRUE, message=TRUE)
#Return the quantities
X$quantity
#Return the marginal revenues
X$marginal.revenue

Run the code above in your browser using DataLab