Question: How can I use calculate the following utility function by using R/Rstudio? A consumer consumes two goods, x and y. She has income R and
How can I use calculate the following utility function by using R/Rstudio?

A consumer consumes two goods, x and y. She has income R and faces prices px and py. Her utility function is given by U(x, y) = = x1- y 1 - 1 1-0 . Assume y = 0.5, 0 = 0.3, and 1 = 2. a) Construct a function that computes the agent's utility for a vector of values (x, y). Find the utility of (x, y) = (2,2). b) Let = 10, px = 1, and py = 2. Plot the consumer's utility for varying levels of x E (0.1; 5), letting y be given by the budget constraint. Find the consumer's demand for the two goods. c) Maintain Px = 1, and py = 2. Draw the Engel curve for good x, i.e. the relationship between demand and income R. d) Let R = 10 and py = 2. Draw the demand curve for good x, i.e. the relationship between demand and the price
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
