bws.sp {support.BWS} | R 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 |
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 |
decreasing |
A logical value denoted by |
... |
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()