CD_A: Cobb-Douglas Demand Structure Matrix

Description Usage Arguments Value Author(s) References Examples

View source: R/CD_A.R

Description

This function computes the Cobb-Douglas demand structure matrix.

Usage

1
CD_A(alpha, Beta, p)

Arguments

alpha

a nonnegative numeric m-vector or m-by-1 matrix.

Beta

a nonnegative numeric n-by-m matrix whose each column sum equals 1.

p

a nonnegative numeric n-vector or n-by-1 matrix.

Value

A demand coefficient n-by-m matrix is computed which indicates the demands of agents (firms or consumers) for obtaining unit product or utility with Cobb-Douglas production functions or utility functions under the price vector p.

Author(s)

LI Wu <liwu@staff.shu.edu.cn>

References

LI Wu (2019, ISBN: 9787521804225) General Equilibrium and Structural Dynamics: Perspectives of New Structural Economics. Beijing: Economic Science Press. (In Chinese)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
CD_A(1, c(0.5, 0.5), c(1, 2))

#####
alpha <- c(5, 3, 1)
Beta <- matrix(c(
  0.6, 0.4, 0.2,
  0.1, 0.4, 0.7,
  0.3, 0.2, 0.1
), 3, 3, TRUE)
p <- 1:3
CD_A(alpha, Beta, p)

Example output

          [,1]
[1,] 1.4142136
[2,] 0.7071068
           [,1]      [,2]      [,3]
[1,] 0.43892821 0.6293917 0.8085158
[2,] 0.03657735 0.3146958 1.4149026
[3,] 0.07315470 0.1048986 0.1347526

CGE documentation built on July 8, 2020, 5:16 p.m.

Related to CD_A in CGE...