Last data update: 2014.03.03

R: Input validation for one-sided markets
roommate.validateR Documentation

Input validation for one-sided markets

Description

This function parses and validates the arguments for the function roommate. It returns the validates arguments. This function is called as part of roommate. Only one of the arguments needs to be provided.

Usage

roommate.validate(utils = NULL, pref = NULL)

Arguments

utils

is a matrix with cardinal utilities for each individual in the market. If there are n individuals, then this matrix will be of dimension n-1 by n. Column j refers to the payoff that individual j receives from being matched to individual 1, 2, ..., j-1, j+1, ...n. If a square matrix is passed as utils, then the main diagonal will be removed.

pref

is a matrix with the preference order of each individual in the market. This argument is only required when utils is not provided. If there are n individuals, then this matrix will be of dimension n-1 by n. The i,jth element refers to j's ith most favorite partner. Preference orders can either be specified using R-indexing (starting at 1) or C++ indexing (starting at 0). The matrix pref must be of dimension n-1 by n. Otherwise, the function will throw an error.

Value

The validated preference ordering using C++ indexing.

Results