All functions

apply.bias.corrections()

Apply bias corrections to model outputs

assign.sigma.Q()

Assign observational errors to observed demand quantities

calc.elas.actual()

Calculate actual elasticities using numerical derivatives.

calc.hicks.actual()

Calculate the actual Hicks elasticities using the Slutsky equation.

calc.pop.weight()

Calculate a weight factor based on the population.

calc1eps()

Calculate the exponents in the demand equation.

calc1q()

Calculate demand quantities for a single set of inputs

calculate.ambrosia.params()

Calculates the 11 parameters for ambrosia using data calculated by create.dataset.for.parameter.fit by maximizing log likelihood

compute.bias.corrections()

Compute regional bias corrections.

create.dataset.for.parameter.fit()

Create dataset with observational error for log likelihood calculation using clustering.

eta.constant() eta.s() eta.n()

Generate an income elasticity function with constant income elasticity.

food.dmnd.byincome()

Tabulate food demand by per-capita-income

food.dmnd.byyear()

Tabulate food demand by year for a model.

food.dmnd()

Calculate food demand using the Edmonds, et al. model.

lamks2nu1y0()

Convert the lambda and ks parameters to nu1 and y0

make.byincome.plot()

Plot model results by per-capita income

make.byyear.plot()

Plot model results by year

make.demand.plot()

Plot staple, nonstaple, and total demand output from the model

mc.food.dmnd.byyear()

Compute food demand by year

mc.make.byyear.plot()

Make the by-year plot for a set of monte carlo results by sampling the distribution

mc.setup()

Create a posterior log-pdf function for monte carlo sampling the model parameters.

mcparam.clip.tails()

Filter a Monte Carlo distribution by quantiles

mcparam.density()

Create a density plot for all of the MC variables

mcparam.itercount()

Get the iteration count for a monte carlo dataset.

mcparam.ML()

Get the maximum a-posteriori (MAP) parameters

mcparam.sample()

Sample the MC results using bootstrap sampling.

merge(<trn.tst>)

Create a merged dataset with training and test data, each labeled accordingly

namemc()

Return the list of names for the parameters in the model.

plohi

Recommended parameter limits for the model.

prepare.obs()

Prepare observations for use in the model.

read.mc.data()

Read the Monte Carlo results file

recursive.partition()

Partition input data into clusters with a minimum number of members

runapp()

Launch the interactive GCAM food demand model

y.vals Ps.vals Pn.vals Pm.vals samp.params x1 x0

Sample values for the demand model.

vec2param()

Convert a vector of parameters into a params structure.