muaidsCalculate: Calculate the demand share equations of a AI or QUAI demand...

View source: R/muaidsCalculate.R

muaidsCalculateR Documentation

Calculate the demand share equations of a AI or QUAI demand system, including demographic variable, using point estimates (e.g., mean, median, percentiles).

Description

Calculate the demand share equations of a AI or QUAI demand system, including demographic variable, using point estimates (e.g., mean, median, percentiles).

Usage

muaidsCalculate(
  muPrices = numeric(),
  muBudget = numeric(),
  muDemographics = numeric(),
  Params = matrix(),
  quaids = FALSE,
  m = numeric(),
  t = numeric(),
  dems = FALSE
)

Arguments

muPrices

A matrix of logged muPrices with (1xm) dimensions where n is the number of observations and m the number of shares.

muBudget

A matrix of logged total expenditure/muBudget with (1x1) dimensions where n is the number of observations.

muDemographics

A matrix of demographic variables with (1xt) dimensions where n is the number of observations and t the number of demographic variables.

Params

A vector containing the parameters alpha, beta, gamma, and theta and lambda if elected.

quaids

Logical. Should quadratic form be used instead?

m

Number of shares.

t

Number of demographic variables.

dems

Bolean. Should demographic variables be included?

Value

A matrix of estimated shares with (1xm) dimensions where n is the number of observations and m the number of shares.


censoredAIDS documentation built on April 12, 2025, 1:53 a.m.