X.order: function to estimate generalized ordered choice model

Description Usage Arguments Author(s)

View source: R/X.order.R

Description

estimate ordered choice model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
X.order(
  data,
  choice,
  rate,
  attrs,
  attr_coding = NULL,
  attr_level = NULL,
  interact = NULL,
  type = "gologit",
  method = "BFGS",
  estimator = TRUE,
  param_fixed = NULL,
  param_start = NULL
)

Arguments

data

A tibble, input data.

choice

A character, name of column indicating individuals' rate.

rate

A vector of characters, the scale that used ot rate an alternative.

attrs

A list contains only one slice, whose elements have to be positive integers. The only one slice is a tibble, named "attrs_alts", indicating the all attributes (including context variables). The column names in the tibbles represent the name of attributes. All have same numbers of rows (elements) with the length of argument "rate" minus one. The element in the tibble indicates if the attribute is alternative-specific: if some elements in one column have a same value, then the corresponding segments share a generic parameter in terms of this attribute.

attr_coding

A vector of character, names of categorical attributes. Default = NULL, which means all attributes are continuous.

attr_level

A list of vector of character, representing the levels of all categorical attributes. The first element of a vector is set as base level, others are set as 1, 2, 3...in sequence. This argument is only relevant when argument "attr_coding" is not NULL. Default = NULL.

interact

A vector of character, name of attributes' interaction, connected by "*". Default = NULL.

type

A character, indicating which type of ordered model is used, either "gologit" or "goprobit". Default = "gologit".

method

A character, passed to the function maxLik() in "maxLik" package. It indicates the method used in maximum likelihood estimation. Default = "BFGS".

estimator

A argument in the function maxLik() from "maxLik" package. Here this argument could only be either TRUE or "BHHH"/"bhhh". Default = TRUE.

param_fixed

A vector of characters, passed to the function maxLik() in "maxLik" package. It indicates which parameters are fixed. Default = NULL.

param_start

A vector of numbers, passed to the function maxLik() in "maxLik" package. It indicages the initial values of parameters. Default = NULL.

Author(s)

X.PAN


xf-pan/dicmo documentation built on Jan. 25, 2021, 3:04 p.m.