bws.sp: Calculating shares of preference

View source: R/bws.sp.R

bws.spR Documentation

Calculating shares of preference

Description

This function calculates shares of preference for each item based on the conditional logit model choice rule.

Usage

bws.sp(object, base, coef = NULL, order = FALSE, decreasing = FALSE, ...)

Arguments

object

An output from the function clogit in survival or vector/matrix/data frame containing estimates.

base

A character showing the base item.

coef

A vector containing the names of item variables used in the model.

order

A logical value denoted by TRUE when the resultant shares are sorted or FALSE when not doing so.

decreasing

A logical value denoted by TRUE when the sort order is decreasing, or FALSE when it is increasing.

...

Arguments passed to a function used internally.

Details

This function calculates a share of preference for item i. For details on the shares of preference, refer to support.BWS-package. Althoug this function is developed for the function clogit in the survival, it may be available for other functions regarding discrete choice models. This function assumes a simple model without covariates.

Value

A vector or data frame containing the calculated shares of preference for each item is returned.

Author(s)

Hideo Aizaki

See Also

support.BWS-package, bws.dataset, clogit

Examples

## See examples in bws.dataset()

support.BWS documentation built on March 31, 2023, 8:12 p.m.